  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | JSP - A mailing list about Java Server Pages specification and reference | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Removing EJB Business Delegate | Removing EJB Business Delegate 2004-02-25 - By Sean Brydon
Back Hi,
The EJB container maintains controls the lifecycle of session beans, so you do not need to call remove. It will create them and destroy them as needed. This is a nice feature of EJB containers since you are free to focus on the application business logic and let the conainer manage the object lifecycle.
On entity beans you would call remove if you want to remove some data from the database.
hope that helps, Sean
Arzamasov Alexey wrote:
>On Thursday 26 February 2004 09:15, you wrote: > > >>The business delegate works in the web container even it belongs to >>business layer. >>business delegate consider as a client proxy for the enterprise component. >>business delegate has no knowledge about the entity beans at all. >>business delegate uses a service locator to locate a session facade that >>interacts with the entity beans. >>So business delegate is the connection points between the presentation and >>the business layers of the system, also the business delegate is a helper >>java class. >>the purpose of the service locater is to hide technology specific details >>as well as platform. >>So the Clint has nothing to do with the Entity beans and the busiess >>delegate doesn?t state any thing related to the client. >> >> > >Thank you for your reply! >All that you have said is correct, but the one thing is unclear for me: >If business delegate connects to session facade (a session bean) should it >then call remove() on this bean somewhen if the future? >Maybe when user closes the session explictly? But what if the user don't >closes the session? If there will be a resource leak at EJB container because >of the beans got created but never got removed? > >===================================================================>Companion Site: http://www.corej2eepatterns.com >J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns >List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html >Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected) > >
===================================================================Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|
 |