Name
ConnectionFactory
Synopsis
public abstract class ConnectionFactory {
// Public Constructors
public ConnectionFactory( );
// Public Class Methods
public static ConnectionFactory newInstance( ) throws JAXRException;
// Public Instance Methods
public abstract javax.xml.registry.Connection createConnection( )
throws JAXRException; // L0
public abstract FederatedConnection createFederatedConnection(Collection connections)
throws JAXRException; // L0 (optional)
public abstract Properties getProperties( )
throws JAXRException; // L0
public abstract void setProperties(Properties properties)
throws JAXRException; // L0
}The abstract ConnectionFactory class can be used
to connect to JAXR registry providers. An instance of
ConnectionFactory may be obtained by calling
newInstance( ) method, which uses a four-step
process to locate a suitable concrete implementation class, as
follows:
Looks in the system properties for a property called
javax.xml.registry.ConnectionFactoryClass. If this property is defined, its value is assumed to be the class name of a concrete implementation ofConnectionFactory.Looks for the same property in a file called
${JAVA_HOME}/lib/jaxr.properties. If the property is found, its value is assumed to be the required class name.Looks for a resource called
META-INF/services/javax.xml.registry.ConnectionFactoryClassin the classpath. If such a resource exists, it is opened and a single line is read from it. If the line is not empty, it is used as the required class name. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access