I have been reading the forums re: datasource config and wanted to make sure I'm not 
making a dumb assumption.

It is recommended that your JBOSS EJB's connect to a datasource at the beginning of 
whatever method you are going to use it with, and close that source at the end of the 
method.  In other words, you shouldn't be caching database connections anywhere - 
correct?

The reason why I ask is that the ejb spec has some recommendations for using 
ejbActivate and ejbPassivate for getting rid of resources like this, but in JBOSS 
using this method gives you the common "close your own connections" message.

Is it OK to use ejbActivate and ejbPassivate to get/close db connections in JBOSS 
(provided of course its a stateful bean), or does the ManagedConnection pool make 
connecting to the DB so fast that its not really worth it?

I have an app that uses CMP but makes a lot of DB calls anyway - just thinking about 
what the best way to set these up is so that it minimizes the load on the server.  Any 
help appreciated.

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

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


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to