EjbConnectionFactory

public final class EjbConnectionFactory

EjbConnectionFactory is a concrete factory class for creating EjbConnection by using a pre-defined set of properties.

Author:Hugo Y. K. Lam

Methods

configure

public static void configure(URL url)

Configures the EjbConnectionFactory from the configuration located by the specifed URL. Expected to be called before any other methods are called.

Parameters:
  • url – The URL of the configuration file.
Throws:

createConnection

public static EjbConnection createConnection()

Creates a new EjbConnection. The url, username and password will be retrieved from the default properties.

Returns:a new EjbConnection.

createConnection

public static EjbConnection createConnection(String url)

Creates a new EjbConnection. The username and password will be retrieved from the default properties.

Parameters:
  • url – the URL for this connection.
Returns:

a new EjbConnection.

createConnection

public static EjbConnection createConnection(String url, String username, String password)

Creates a new EjbConnection.

Parameters:
  • url – the URL for this connection.
  • username – the username for authentication.
  • password – the password for authentication.
Returns:

a new EjbConnection.