|
Novell exteNd Web Services SDK API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.messaging.ProviderConnectionFactory
A factory for creating connections to a particular messaging provider.
A ProviderConnectionFactory
object can be obtained in two
different ways.
ProviderConnectionFactory.newInstance
method to get an instance of the default ProviderConnectionFactory
object.ProviderConnection
object that connects to the default provider implementation.
ProviderConnectionFactory pcf = ProviderConnectionFactory.newInstance(); ProviderConnection con = pcf.createConnection();
ProviderConnectionFactory
object
that has been registered with a naming service based on Java Naming and
Directory InterfaceTM (JNDI) technology.ProviderConnectionFactory
object is an
administered object that was created by a container (a servlet or Enterprise
JavaBeansTM container). The
ProviderConnectionFactory
object was configured in an implementation-
specific way, and the connections it creates will be to the specified
messaging provider.
Registering a ProviderConnectionFactory
object with a JNDI naming service
associates it with a logical name. When an application wants to establish a
connection with the provider associated with that
ProviderConnectionFactory
object, it does a lookup, providing the
logical name. The application can then use the
ProviderConnectionFactory
object that is returned to create a connection to the messaging provider.
The first two lines of the following code fragment use JNDI methods to
retrieve a ProviderConnectionFactory
object. The third line uses the
returned object to create a connection to the JAXM provider that was
registered with "ProviderXYZ" as its logical name.
Context ctx = new InitialContext(); ProviderConnectionFactory pcf = (ProviderConnectionFactory)ctx.lookup( "ProviderXYZ"); ProviderConnection con = pcf.createConnection();
Constructor Summary | |
ProviderConnectionFactory()
|
Method Summary | |
abstract ProviderConnection |
createConnection()
Creates a ProviderConnection object to the messaging provider that
is associated with this ProviderConnectionFactory
object. |
static ProviderConnectionFactory |
newInstance()
Creates a default ProviderConnectionFactory object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProviderConnectionFactory()
Method Detail |
public abstract ProviderConnection createConnection() throws JAXMException
ProviderConnection
object to the messaging provider that
is associated with this ProviderConnectionFactory
object.
ProviderConnection
object that represents
a connection to the provider associated with this
ProviderConnectionFactory
object
JAXMException
- if there is an error in creating the
connectionpublic static ProviderConnectionFactory newInstance() throws JAXMException
ProviderConnectionFactory
object.
ProviderConnectionFactory
JAXMException
- if there was an error creating the
default ProviderConnectionFactory
|
Novell exteNd Web Services SDK API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |