getDataSource(String name, Context ctx) This method returns a DataSource object from JNDI.
Parameters: name - Name of the DataSource object Parameters: ctx - JNDI Context.
getInitialContext(String url, String username, Object credentials) This method allows client code to specify URL and credentials with which
to connect.
Field Detail
DEFAULT_DATA_SOURCE
final public static String DEFAULT_DATA_SOURCE(Code)
This method returns a DataSource object from JNDI.
Parameters: name - Name of the DataSource object Parameters: ctx - JNDI Context. DataSource object from JNDI throws: NamingException -
This method returns a DataSource object from JNDI. This method will open
and close a temporary JNDI context.
Parameters: name - Name of the DataSource object DataSource object from JNDI throws: NamingException -
This method allows access to different URLs, but with the default
username.
Parameters: url - Server URL. A JNDI InitialContext object. throws: NamingException -
This method is used on the server when a new username is needed for the
JNDI context.
Parameters: username - Parameters: credentials - Context throws: NamingException -
This method allows client code to specify URL and credentials with which
to connect. N.B. The caller must close the returned context. Parameters: url - Parameters: username - Parameters: credentials - A InitialContext object. throws: NamingException -