Hi
     We are using BMP too. We open a connection at the beginning of each
method and close it as soon as we are done with it in the same method. This
is to make sure that unused connections are returned back to the pool after
each function call. Since connections are pooled it is not expensive to get
a connection.
You will also have to take care that all the prepared statements,
statements , result sets etc are also closed after you are done with it. If
this is not done, the connection is not returned back to the pool. (We are
using NAS 4.0)


Regards
Pratima




"Shyam Sankar S." <[EMAIL PROTECTED]>@JAVA.SUN.COM> on 06/22/2000 04:11:55
PM

Please respond to A mailing list for Enterprise JavaBeans development
      <[EMAIL PROTECTED]>

Sent by:  A mailing list for Enterprise JavaBeans development
      <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:

Subject:  Database Connection


Hi all,

We are working on Bean Managed Persistent Entity Beans. We got a mail now
from our DBA that there are around 200 sessions open in the Oracle Server.
This could be because our connection.close statements don't work or maybe
don't get called. Could anyone tell me which is the right place in an
Entity Bean to:
1. Open Connection
2. Close Connection

Presently, Connection is opened in the setEntityContext and closed in
unsetEntityContext. unsetEntityContext is not called explicitly.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to