Forums Register Login

Please help with the local interface

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
I recommend posting this question to the forum for your specific Application Server. You are more likely to get a response.
+Pie Number of slices to send: Send
Thanks, I'll do that.
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 627 times.
Similar Threads
Help with the local interface
Calling a BMP Entity Bean 2.0 From the Web Module
Local EJB lookup problem
Connection Pooling and JDBC lookup.
Calling a BMP Entity Bean 2.0 From the Web Module..WSAD 5.1.1
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:50:48.