[jboss-user] [Clustering/JBoss] - Re: Load Balancing in Jboss 5.1 , not able to test it !

Leonets do-not-reply at jboss.com
Thu Jun 25 11:18:18 EDT 2009


"bstansberry at jboss.com" wrote : Leonets: is your webapp continuing to use the same connection to the JMS server? Or are you closing connections and creating new ones?
  | 
  | Per JBoss Messaging docs[1] connection creation is load balanced, but once a connection is created it will stick to one server (unless failover happens).
  | 
  | [1] http://www.jboss.org/file-access/default/members/jbossmessaging/freezone/docs/userguide-1.4.4.GA/html/configuration.html#conf.connectionfactory.attributes.supportsloadbalancing

Hi brian, I am using this code inside a servlet


  | ConnectionFactory cf = (QueueConnectionFactory)ServiceLocator.getService("JmsConnectionFactory");
  | Connection conn = cf.createConnection();
  | session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
  | 			
  | Message textMessage = Session.createTextMessage(messaggioXml);			
  | 	
  | ServiceLocator.getService("JmsPosizioneDebitoriaInput");
  | producer = session.createProducer(dest);			
  | producer.send(textMessage);
  | 

I don't have any conn.close() really !!

Anyway Connection conn is an istance variable in the doGet servlet method, so I don't see anything that could be a sort of 'jms connection pool'

I'll add this conn.close() and try again



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

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



More information about the jboss-user mailing list