ProviderConnectionFactory

   
ProviderConnectionFactory javax.xml.messaging

JAXM 1.1; JWSDP 1.0
 public abstract class ProviderConnectionFactory {  // Public Constructors  public ProviderConnectionFactory(  );  // Public Class Methods  public static ProviderConnectionFactory newInstance( ) throws JAXMException;  // Public Instance Methods  public abstract ProviderConnection createConnection( ) throws JAXMException; 
} 

ProviderConnectionFactory is an abstract class that can be used to create ProviderConnection objects for the purpose of obtaining a connection to a JAXM provider. In a container-based environment, a JAXM client uses a JNDI lookup to obtain a preconfigured ProviderConnectionFactory that results in the message that it subsequently created being sent to a JAXM provider chosen by an administrator.

An alternative way to obtain an instance of this class is to call the static newInstance( ) method. This method locates a concrete implementation of ProviderConnectionFactory as follows , stopping when a suitable class is found:

  1. Looks in the system properties for a property called javax.xml.messaging.ProviderConnectionFactory . If this property is defined, its value is assumed to be the class name of a concrete implementation of ProviderConnectionFactory .

  2. Looks for the same property in a file called ${JAVA_HOME}/lib/jaxm.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.messaging.ProviderConnectionFactory 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.

  4. Finally, an implementation-dependent default class is used. In the case of the reference implementation, this class is called com.sun.xml.messaging.jaxm.client.remote.ProviderConnectionFactoryImpl .

The createConnection( ) method returns a ProviderConnection object that allows a client to communicate with a JAXM provider. The means by which the provider is located is implementation-dependent. In the case of the reference implementation, the provider's address is configured in a file called client.xml , which must be accessible as a resource in the classpath of the client. For a description of the content of this file, refer to Chapter 4.

Returned By

ProviderConnectionFactory.newInstance( )


   
   
ProviderMetaData javax.xml.messaging

JAXM 1.1; JWSDP 1.0
 public interface ProviderMetaData {  // Public Instance Methods  public abstract int getMajorVersion(  ); 
    public abstract int getMinorVersion(  ); 
    public abstract String getName(  ); 
    public abstract String[ ] getSupportedProfiles(  ); 
} 

ProviderMetaData provides information about a JAXM provider. An instance of this object can be obtained by calling the getMetaData( ) method of a ProviderConnection object.

The getName( ) method can be used to obtain an identifier for the JAXM provider to which the client is connected, while getMajorVersion( ) and getMinorVersion( ) return version information. These methods may be useful for logging purposes. The getSupportedProfiles( ) method returns the names of the SOAP profiles that the provider supports. The names themselves are provider-specific and can be passed to the ProviderConnection createMessageFactory( ) method to obtain a factory that can create messages built according to the rules of the named profile.

Returned By

ProviderConnection.getMetaData( )