O'Reilly logo

Java Web Services in a Nutshell by Kim Topley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. 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 of ConnectionFactory.

  2. 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.

  3. 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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required