Top Description Methods
javax.jms

public Interface TopicConnectionFactory

extends ConnectionFactory
Known Direct Subinterfaces
javax.jms.XATopicConnectionFactory

A client uses a TopicConnectionFactory object to create TopicConnection objects with a publish/subscribe JMS provider.

ATopicConnectionFactory can be used to create a TopicConnection, from which specialized topic-related objects can be created. A more general, and recommended approach is to use the ConnectionFactory object.

The TopicConnectionFactory object should be used to support existing code.

Since
JMS 1.0
Version
JMS 2.0
See Also
javax.jms.ConnectionFactory

Method Summary

Modifier and TypeMethod and Description
public TopicConnection

Returns:

a newly created topic connection
createTopicConnection
()

Creates a topic connection with the default user identity.

public TopicConnection

Returns:

a newly created topic connection
createTopicConnection
(String
the caller's user name
userName
,
String
the caller's password
password
)

Creates a topic connection with the specified user identity.

Inherited from javax.jms.ConnectionFactory:
createConnectioncreateConnectioncreateContextcreateContextcreateContextcreateContext

Method Detail

createTopicConnectionback to summary
public TopicConnection createTopicConnection() throws JMSException

Creates a topic 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.

Returns:TopicConnection

a newly created topic connection

Exceptions
JMSException:
if the JMS provider fails to create a topic connection due to some internal error.
JMSSecurityException:
if client authentication fails due to an invalid user name or password.
createTopicConnectionback to summary
public TopicConnection createTopicConnection(String userName, String password) throws JMSException

Creates a topic connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Parameters
userName:String

the caller's user name

password:String

the caller's password

Returns:TopicConnection

a newly created topic connection

Exceptions
JMSException:
if the JMS provider fails to create a topic connection due to some internal error.
JMSSecurityException:
if client authentication fails due to an invalid user name or password.