• Post Reply Bookmark Topic Watch Topic
  • New Topic

Removing EJBObject  RSS feed

 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I have a question concering the removal of EJBObjects.
Ed Roman says that if you want to remove an EJBObject you have
to invoke the remove method in that instance (see Mastering EJB).
In my opinion this is wrong.
Calling remove on stateless session beans does nothing!
Calling remove on stateful session beans means removing the bean instance and not the EJBObject!
Calling remove on entity beans means removing the dataset in the database and putting the bean instance back in the pool!

In my opinion, there is no explicit way the remove an EJBObject,
beacuse these objects are pure RMI objects and the app server
has the responibility to remove those instances.
Am I wrong?

------------------
Marco Barenkamp
____________________________________________
L M I N T E R N E T S E R V I C E S AG
Senior Trainer & Architect,
BEA Certified Enterprise Developer
Sun Certified Programmer for the Java2 Platform
Sun Certified Web Component Developer for the Java2 Platform
Sun Certified Developer for the Java 2 Platform
Sun Certified Enterprise Architect for the Java 2 Platform Enterprise Edition (PI)
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marco,

The way I see it, removing an EJBObject is like closing a
database connection (as in java.sql.Connection.close()) -- you
are informing the EJB container that you no longer require that
object. I don't think it means that you want the EJB container to
destroy that instance. For a stateful session bean, removing is
not the same as passivating. A passivated stateful bean will be
reassigned to the same client when it is activated
(theoretically) -- similarly for an entity bean too, I would
imagine.


Just my two cents' worth.


Avi.

------------------
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!