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(Collectionconnections
) throws JAXRException; // L0 (optional) public abstract Properties getProperties( ) throws JAXRException; // L0 public abstract void setProperties(Propertiesproperties
) 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.ConnectionFactoryClass
in 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. ...
Get Java Web Services in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.