[jboss-user] [JBoss Messaging] - JMS session transaction not managed by container?

aleksander.lech do-not-reply at jboss.com
Fri Dec 12 09:33:54 EST 2008


Hi,
I cant send a JMS message when specyfying transactional attribute when creating session. 

Heres the code, maybe You could help:


  | publicvoid notifyGeofencingMgr() {
  | 		try {
  | 			Connection jmsConn = connectionFactory.createConnection();
  | 			javax.jms.Session jmsSession = jmsConn.createSession(true, javax.jms.Session.AUTO_ACKNOWLEDGE);
  | 			
  | 			TextMessage msg = jmsSession.createTextMessage();
  | 			msg.setText("test");
  | 			MessageProducer sender = jmsSession.createProducer(geofencingMgrQueue);
  | 			
  | 			sender.send(msg);
  | 			jmsSession.close();
  | 		
  | 		} catch (JMSException e) {
  | 			log.error("Unable to send JMS message", e);
  | 			
  | 		}
  | 
  | 

This method is one the session bean bussiness method which is included in UT. The message does not go to MDB when using transactional JMS session (jmsConn.createSession(true, javax.jms.Session.AUTO_ACKNOWLEDGE)). Any ideas?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196258#4196258

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196258



More information about the jboss-user mailing list