Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / March 2004

Tip: Looking for answers? Try searching our database.

home.create and ejbCreate

Thread view: 
dolphinn - 07 Mar 2004 05:18 GMT
In the book Mastering Enterprise Java Bean 2nd Edition by Ed Roman,
it says the create and remove methods of a Home Object is responsible for
create and remove EJB Object. They are called by clients.
The ejbCreate and ejbRemove methods are implemented in the Bean class,
and called by container. The bean instance will be created or removed
by these two methods.

When a client call create and remove methods on a Home Object, the
bean instances are not necessarily be created or removed, because the
container may caching some method-ready bean instances. The container
will control when these bean instances should be created or reomved.

My question is "is this true"?
Because in all the EJB examples, I saw the ejbCreate or ejbRemove
were always called when client called a Create or Remove home method.
I am wondering if the Home.Create and Home.Remove are actually
bonded with ejbCreate and ejbRemove methods?

Anyone had experience with this?
Thanks.
Marek Lange - 10 Mar 2004 10:03 GMT
> In the book Mastering Enterprise Java Bean 2nd Edition by Ed Roman,
> it says the create and remove methods of a Home Object is responsible for
[quoted text clipped - 13 lines]
> I am wondering if the Home.Create and Home.Remove are actually
> bonded with ejbCreate and ejbRemove methods?

This is container dependant. In general a home.create() call by the
client can cause an ejbCreate() on the bean but there is no must. Bean
configuration issues also influence this behaviour.

-marek


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.