Oracle® Streams Advanced Queuing Java API Reference
10g Release 2 (10.2)

B14291-01


oracle.jms
Class AQjmsConnectionFactory

java.lang.Object
  extended byoracle.jms.AQjmsConnectionFactory

All Implemented Interfaces:
ConnectionFactory, javax.naming.spi.ObjectFactory, javax.naming.Referenceable, java.io.Serializable
Direct Known Subclasses:
AQjmsQueueConnectionFactory, AQjmsTopicConnectionFactory, AQjmsXAConnectionFactory

public class AQjmsConnectionFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory, ConnectionFactory, javax.naming.Referenceable, java.io.Serializable

This is an Oracle class which implements javax.jms.ConnectionFactory and javax.naming.spi.ObjectFactory.

See Also:
Serialized Form

Method Summary
Connection createConnection()
Creates a connection with the default user identity.
Connection createConnection(java.lang.String userName, java.lang.String password)
Creates a connection using the specified user identity.
java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
Creates a connection factory.
javax.naming.Reference getReference()
Creates a JMS connection factory reference suitable for passing to getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable).

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable environment)
                                   throws JMSException
Creates a connection factory. The connection factory is created using database connection attributes obtained using name and nameCtx.
Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Parameters:
obj - a javax.naming.Reference indicating the connection factory class
name - the location containing the database connection attributes
nameCtx - a javax.naming.directory.DirContext containing the above location
environment - (not used - parameter required by javax.naming.spi.ObjectFactory interface)
Returns:
a new connection factory object, or null if obj is invalid or looking up the provided name in the provided nameCtx returns a null result
Throws:
JMSException - if a connection factory is not created for any reason other than those listed above (which result in a null return value)

createConnection

public Connection createConnection()
                            throws JMSException
Creates a connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.
Specified by:
createConnection in interface ConnectionFactory
Returns:
a newly created connection
Throws:
JMSException - if the connection is not created due to some error.
JMSSecurityException - if client authentication fails due to an invalid user name or password.
Since:
1.1

createConnection

public Connection createConnection(java.lang.String userName,
                                   java.lang.String password)
                            throws JMSException
Creates a connection using the specified user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.
Specified by:
createConnection in interface ConnectionFactory
Parameters:
userName - the caller's user name
password - the caller's password
Returns:
a newly created connection
Throws:
JMSException - if the connection is not created due to some error.
JMSSecurityException - if client authentication fails due to an invalid user name or password.
Since:
1.1

getReference

public javax.naming.Reference getReference()
Creates a JMS connection factory reference suitable for passing to getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable).
Specified by:
getReference in interface javax.naming.Referenceable
Returns:
a connection factory reference with object and factory class names set

Oracle® Streams Advanced Queuing Java API Reference
10g Release 2 (10.2)

B14291-01


Copyright © 2003, 2005, Oracle. All rights reserved.