• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RemoveException or RemoteException

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From J2EE 1.3 EJB API:
public void remove(java.lang.Object primaryKey) throws java.rmi.RemoteException, RemoveException
Remove an EJB object identified by its primary key. This method can be used only for an entity bean. An attempt to call this method on a session bean will result in a RemoteException.
From EJB 2.0 Specification:
Because session objects do not have primary keys that are accessible to clients, invoking the javax.ejb.EJBHOME.remove(Object primaryKey) method on a session bean result in the javax.ejb.RemoveException
 
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the question here?
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The API addressed entity bean and the spec addressed session bean and both are correct. What is the problem here?
 
Leon Chen
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read it again
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got yeah Mr. Chen:
The issue is actually about RemoteException and RemoveException.
Sorry I jumped in without invitation. I do not think that I am qualified right now to contribute to this topic until I get my HF EJB from Amazon.
Thanks,
Anselm.
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even I was carried away a bit by the question, as it had 2 stmts with no question. I tried to remove a stateless session bean in Sun's RI with the home handle and I obtained on the client side.
javax.ejb.RemoveException: Invalid remove operation.
<<no stack trace available>>
So the EJB2.0 Spec is right. Isn't it?
 
If you look closely at this tiny ad, you will see five bicycles and a naked woman:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic