• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Q from SCBCD Mock exam.

 
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.
 
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
 
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could refer to:
https://coderanch.com/t/159504/java-EJB-SCBCD/certification/Useful-points-exceptions-ejb

 
Paper beats rock. Scissors beats tiny ad.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic