• Post Reply Bookmark Topic Watch Topic
  • New Topic

mock exam question

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q: Invoking javax.ejb.EJBHome.remove(java.lang.Object primaryKey) on a session bean results in java.rmi.RemoteException been thrown.



I think the above is false as the session bean will get javax.ejb.remove exception.

But the answer says the above statement is correct.

thanks
Trupti
 
Ramesh Aiyappan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too would say that it should be a RemoteException as the javax.ejb.EJBHome.remove(java.lang.Object primaryKey) is NOT A VALID operation on a session bean.

Please correct me if I am wrong.

Njoy,
Ramesh.
 
Vitaliy Geraymovych
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramesh Aiyappan:
I too would say that it should be a RemoteException as the javax.ejb.EJBHome.remove(java.lang.Object primaryKey) is NOT A VALID operation on a session bean.

Please correct me if I am wrong.

Njoy,
Ramesh.


Here is what spec says. Page 59.

"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 results in the javax.ejb.RemoveException."

Vitaliy
 
Kaarthik Sivashanmugam
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page 559 in HFEJB says the same.. (Client Scenario #2)
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!