• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.0 remove ( ) methods in LocalHome and Local interface

 
Ruilin Yang
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not clear about the difference of the two remove methods. One is in the interface EJBLocalHome:
public interface EJBLocalHome {
//remove an EJB object identified by its primary key
void remove(java.lang.Object primaryKey) throws RemoveException,EJBExeption
}
In EJBLocal Object:
public interface EJBLocalObject {
...
//remove the EJB local object
public void remove ( ) throws moveException,EJBExeption
...
Please help clarify.
Thanks
Ruilin
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, actually the impact of this method is the same for EJBHome.remove() and for EJBObject.remove(), both makes the remote references to became invalid and the instance to be released making the remote Object reference to became invalid, notice that for entity beans the data is removed from the storage.

Hi again, I didn�t realize you�re asking about local interfaces so the difference is that for the EJBLocalHome.remove() you have to provide an Object that represents a pk, so it only can be used by entity beans(session beans don�t have a pk) while the EJBLocalObject.remove() you can use to remove session and entity beans.
[ January 09, 2002: Message edited by: Marcos Maia ]
 
Ruilin Yang
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marcos,
Thanks.
This means that we can remove an entity bean from both home (LocalHomeInterface) or remote (LocalInterface).
Thanks again
Ruilin
[ January 09, 2002: Message edited by: Rulin Yang ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!