• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please help with the local interface

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, could anyone help me?
I create an EJB(2.0)project, which contains CMP entity beans and session beans. And also I have a java project, I want to access the entity bean. When I do this:
-------------------------
InitialContext initialContext = new InitialContext();
AliasLocalHome aliasLocalHome = (AliasLocalHome)initialContext.lookup("com/ibm/ejb/entity/AliasLocalHome");
it will give me an error:
NamingException:
"com/ibm/ejb/entity/AliasLocalHome" can not be found.
-----------------------
I added a local EJB reference to ejb.xml
and do this:
--------------------------------
InitialContext initialContext = new InitialContext();
AliasLocalHome aliasLocalHome = (AliasLocalHome)initialContext.lookup(java:comp/env/ejb/Alias);
it gave me an error:
Message='Name ejb not found in context "java:comp/env".'
[5/7/03 10:47:37:937 EDT] 21fc7586 SystemErr R Stack Trace to immediately follow:
[5/7/03 10:47:37:947 EDT] 21fc7586 SystemErr R javax.naming.NameNotFoundException: Name ejb not found in context "java:comp/env".
---------------------------------------
Anybody know how to locate a local home interface from a java project?
Thanks a lot!
[ May 07, 2003: Message edited by: xin wen ]
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recommend posting this question to the forum for your specific Application Server. You are more likely to get a response.
 
xin wen
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I'll do that.
 
reply
    Bookmark Topic Watch Topic
  • New Topic