org.objectweb.jonas_jms
Class JTopicConnectionFactory

java.lang.Object
  extended by org.objectweb.jonas_jms.JConnectionFactory
      extended by org.objectweb.jonas_jms.JTopicConnectionFactory
All Implemented Interfaces:
java.io.Serializable, javax.jms.ConnectionFactory, javax.jms.TopicConnectionFactory, javax.naming.Referenceable

public class JTopicConnectionFactory
extends JConnectionFactory
implements javax.jms.TopicConnectionFactory

JTopicConnectionFactory wraps a XATopicConnectionFactory.

Author:
Laurent Chauvirey, Frederic Maistre, Nicolas Tachker Contributor(s): Philippe Durieux Jeff Mesnil connection anonymous
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jonas_jms.JConnectionFactory
jms, name, xacf
 
Constructor Summary
JTopicConnectionFactory(java.lang.String name)
          Constructor.
 
Method Summary
 javax.jms.TopicConnection createTopicConnection()
          Create a topic connection for an anonymous user.
 javax.jms.TopicConnection createTopicConnection(java.lang.String userName, java.lang.String password)
          Create a topic connection with specified user identity.
 
Methods inherited from class org.objectweb.jonas_jms.JConnectionFactory
createConnection, createConnection, freeJConnection, getJConnection, getJConnection, getReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.ConnectionFactory
createConnection, createConnection
 

Constructor Detail

JTopicConnectionFactory

public JTopicConnectionFactory(java.lang.String name)
Constructor. The underlaying XATopicConnectionFactory is found in the JmsManager.

Method Detail

createTopicConnection

public javax.jms.TopicConnection createTopicConnection()
                                                throws javax.jms.JMSException
Create a topic connection for an anonymous user.

Specified by:
createTopicConnection in interface javax.jms.TopicConnectionFactory
Returns:
a newly created topic connection.
Throws:
javax.jms.JMSException - - if JMS Provider fails to create a Topic Connection due to some internal error.
JMSSecurityException - - if client authentication fails due to invalid user name or password.

createTopicConnection

public javax.jms.TopicConnection createTopicConnection(java.lang.String userName,
                                                       java.lang.String password)
                                                throws javax.jms.JMSException
Create a topic connection with specified user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.

Specified by:
createTopicConnection in interface javax.jms.TopicConnectionFactory
Parameters:
userName - - the caller's user name
password - - the caller's password
Throws:
javax.jms.JMSException - - if JMS Provider fails to create Topic Connection due to some internal error. required resources for a Topic Connection.
JMSSecurityException - - if client authentication fails due to invalid user name or password.