-
1. Re: createSession slow under load. (or createQueueSession)
genman Jun 20, 2006 6:21 PM (in response to bviveiros)
Interesting. Are you using the JCA adapter, i.e. "java:/JmsXA"? You should use this to obtain a new JMS connection each time. -
2. Re: createSession slow under load. (or createQueueSession)
bviveiros Jun 20, 2006 7:18 PM (in response to bviveiros)Yes, I'm using the JmsXA to create a connection on each request.
Any idea what the createQueueSession method might be waiting on?
Is there a connection pool setting that I should play with? I tried changing the max-pool-size on the JmsXA resource but it didn't seem to have any effect.
Also, not sure if this matters but to simplify my database setup I have my app tables, jBPM tables, and JMS tables in the same schema. This way they are managed by one local datasource. Not sure that it is best practices but it got me up and running quickly for the proof of concept that I'm building. -
3. Re: createSession slow under load. (or createQueueSession)
bviveiros Jun 20, 2006 7:48 PM (in response to bviveiros)Here's a code snippet:
InitialContext iniCtx = new InitialContext(); Object tmp = iniCtx.lookup("java:/JmsXA"); QueueConnectionFactory qcf = (QueueConnectionFactory) tmp; QueueConnection jmsConn = qcf.createQueueConnection(); jmsConn.start(); Session sess = jmsConn.createQueueSession(true, Session.SESSION_TRANSACTED);
-
4. Re: createSession slow under load. (or createQueueSession)
bviveiros Jun 21, 2006 11:28 AM (in response to bviveiros)Found the problem. I needed to increase the max-pool-size significantly (to 100 for now) to get past that bottleneck. I'll have to play with that number until I find the optimal setup for my app.
Thanks.