This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Valentin Crettaz's cheat sheets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Valentin Crettaz Watch "Valentin Crettaz New topic

Valentin Crettaz's cheat sheets

Victor Barcan

Joined: Sep 16, 2002
Posts: 16
Hi Valentin,

I used your cheat sheets and found them very useful
Just a little curiosity (more than a question since I already passed the exam last week ) :
In the file , basically your ejbcreate() , activate().. etc methods from the SessionBean or EntityBean interfaces , declare a RemoteException in their throws clause.
If I remember right , you cannot ever throw a RemoteException from within your Bean code.
Is this correct or I�m missing something ?

Victor Barcan<br />SCJP,SCWCD,SCBCD<br />IBM Certified Solution Developer WSAD
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
Hi Victor,

I'm glad you found my cheat sheets useful. As for the RemoteException thing, only the following methods MUST NOT declare it:
- ejbCreate, ejbPostCreate, ejbHome, ejbSelect and the business methods of entity beans
- ejbCreate, and business methods of session beans

An if you look at the EntityBean and SessionBean API, you'll see that all methods have RemoteException in their throws clause even though their use is deprecated. I will probably remove them on the cheat sheets soon. Thanks for the feedback.

Hope this helps

[Blog] [Blogroll] [My Reviews] My Linked In
Victor Barcan

Joined: Sep 16, 2002
Posts: 16
Thank you Valentin for enlightened me.

Mohammed Eesa

Joined: May 06, 2004
Posts: 17
Can we have ejbActivate & ejbPassivate declared to be throw RemoteException.
I agree. Here's the link:
subject: Valentin Crettaz's cheat sheets
Similar Threads
Deployment Descriptor cheat sheet
do we need a meaningful transaction?
RemoteExceptions in Container Callback methods ? - valoxo cheetsheets
Just came back from the beta
EJB framework/callback methods and transaction contexts