[jboss-user] [EJB 3.0] - Re: Problem with stateful session bean and connection

Marcos_APS do-not-reply at jboss.com
Thu Sep 11 14:51:50 EDT 2008

"jaikiran" wrote : 
  | See this http://wiki.jboss.org/wiki/WhatDoesTheMessageDoYourOwnHousekeepingMean

I read the article and understand what was going on with my stateful session bean. Indeed, the problem is very simple to fix. I just have to close the connection after I use it in the same way I'm already doing with my stateless session beans.

I suppose that reading my code you could realize that I was trying to cache a CallableStatement in the stateful session bean in order to avoid getting a connection and preparing the CallableStatement every time the method is called. As the things go, I suppose I'll have to transform the stetaful bean in a stateless bean as there is no point in having a stateful bean if I can't keep state (Connection and CallableStatement) between method calls.

Is there a solution to this or is the solution the stateless session bean?


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

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

More information about the jboss-user mailing list