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 Web Component Certification (SCWCD/OCPJWCD) and the fly likes Need help on EJB2.0 Local interfaces 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 » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Need help on EJB2.0 Local interfaces" Watch "Need help on EJB2.0 Local interfaces" New topic
Author

Need help on EJB2.0 Local interfaces

Joshua Masuki
Greenhorn

Joined: Feb 14, 2005
Posts: 8
Hello there,

I am new to EJB and I am trying out Local home and component interfaces. According to the book that I have read, for one EJB, you can expose both local and remote home/component interfaces. Does this mean we would only have one JNDI for this EJB? Whether the local or remote interfaces will be used, will depend if you narrow or downcast? (Please see below code)



But when I do the second one (ordinary type cast) from another EJB to get my bean's local home, I encounter a ClassCastException?

Thank you for your help.

J.M.
SCJP2
Joe Nguyen
Ranch Hand

Joined: Apr 20, 2001
Posts: 161
Your question should be posted in the EJB forum.

Besides <home> and <remote> elements, make sure that you also define <local-home> and <local> elements in your deployment decriptor
Joshua Masuki
Greenhorn

Joined: Feb 14, 2005
Posts: 8
Sorry. I was supposed to post this under SCBCD. Can somebody move this post to that forum?

Thank you.
 
Consider Paul's rocket mass heater.
 
subject: Need help on EJB2.0 Local interfaces
 
Similar Threads
EJB 2.0, WSAD 5, example problem
can you tell me which one is correct???
local interface and local home interface.
SCBCD: InitialContext Lookups On Local Clients
Need help on EJB2.0 Local interfaces