Skip to content

Instantly share code, notes, and snippets.

@d6y
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d6y/194cf56a0f54105f6604 to your computer and use it in GitHub Desktop.
Save d6y/194cf56a0f54105f6604 to your computer and use it in GitHub Desktop.
JDNI check
/**
* can we get a JDBC connection from JNDI using the default connection name?
*/
def jndiJdbcConnAvailable_? : Boolean = jndiJdbcConnAvailable_?(DefaultConnectionIdentifier)
/**
* Is the named connection available via JNDI?
* @param name the connection identifier to check.
* @return true if the JNDI name can be resolved.
*/
def jndiJdbcConnAvailable_?(name: ConnectionIdentifier) : Boolean = jndiConnection(name).isDefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment