• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Q from SCBCD Mock exam.

 
Vijaya laxmi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements regarding session beans are true? [Check all correct answers]


1 Invoking javax.ejb.EJBObject.getPrimaryKey() on a session bean results in javax.ejb.EJBException been thrown.
2 Invoking javax.ejb.EJBLocalObject.getPrimaryKey() on a session bean results in javax.ejb.EJBException been thrown.
3 Invoking javax.ejb.EJBHome.remove(java.lang.Object primaryKey) on a session bean results in javax.ejb.RemoveException been thrown.
4 Invoking javax.ejb.EJBLocalHome.remove(java.lang.Object primaryKey) on a session bean results in javax.ejb.RemoveException been thrown.
5 Invoking javax.ejb.EJBHome.remove(java.lang.Object primaryKey) on a session bean results in java.rmi.RemoteException been thrown.

I feel the answer is 2,3.When we use remove(Object key) on Remote Session Bean it throws javax.ejb.RemoveException & for Local SB it throws EJBException.

Can Some one tell me whether My answer is right or not.I am not sure whether my conclusion about this is right or not because in Mock answers they gave 2 & 5.

Thanx in advance.
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
answer should be 2,3,4

Bottom of spec P59 and p60 explicitly defines the exceptions should be RemoveException but not RemoteException nor EJBException.
 
Vijaya laxmi
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx a lot for Alex
 
Alex Sharkoff
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could refer to:
http://www.coderanch.com/t/159504/java-EJB-SCBCD/certification/Useful-points-exceptions-ejb

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic