• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Need help on EJB2.0 Local interfaces

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry. I was supposed to post this under SCBCD. Can somebody move this post to that forum?

Thank you.
 
Popeye has his spinach. I have this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic