Creating a Connection object to start a session.

Enterprise Java
Guarantee Inter-Enterprise Message Delivery Using JMS
Gopalan Suresh Raj
Listing 2. Creating a Connection object to start a session.


//  Create and start a topic connection
javax.jms.TopicConnection connection =
                     factory.createTopicConnection(user, password);
connection.start ();
//  Create a topic session on this connection
javax.jms.TopicSession session = connection.createTopicSession
                             (false, Session.AUTO_ACKNOWLEDGE);

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.