Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help with the local interface

 
xin wen
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • 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 ]
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks, I'll do that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic