Activate and Passivate Methods in Servicing Instance Strategy.

Enterprise Java
Connection Strategies in EntityBeans

Prakash Malani
Listing 7. Activate and Passivate Methods in Servicing Instance Strategy.


public void ejbActivate () {
    super.ejbActivate();
    mConnection = ConnectionTemplate.
    obtainConnection(DATA_SOURCE_NAME);
}

public void ejbPassivate () {
    super.ejbPassivate();
    ConnectionTemplate.releaseConnection(mConnection);
}

About the Author

Prakash Malani is principal engineer at eBuilt Inc., Irvine, CA. Mr. Malani can be contacted at pmalani@ebuilt.com.

Featured

Most   Popular
Upcoming Events

AppTrends

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.