Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

home.create and ejbCreate
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.




Report this thread to moderator Post Follow-up to this message
Old Post
dolphinn
03-20-04 01:46 AM


Re: home.create and ejbCreate
dolphinn wrote:

> 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?

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

Report this thread to moderator Post Follow-up to this message
Old Post
Marek Lange
03-20-04 01:46 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:46 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.