Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(connection == null)
- connection = getJmsConnection();
- try {
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- if (isTopic) {
- destination = session.createTopic(destinationName);
- } else {
- destination = session.createQueue(destinationName);
- }
- consumer = session.createConsumer(destination);
- consumer.setMessageListener(listener);
- } catch (JMSException e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement