Hi all,
In weblogic 8.1, i am creating a application where i need to make an local entity bean.My Client also in the same jvm.
Here are the Entity bean details:
JNDI Name : depttLink
Package name: demo
Ejb name : deptt
Local Home: demo.depttHome
Local : demo.depttLocal
ejb-class : demo.deptt
i am calling JNDI name is like
1. ctx.lookup("local:/ejb/depttLink")
2. ctx.lookup("local:/ejb/ejb/depttLink")
3. ctx.lookup("java:comp/env/depttLink")
4. ctx.lookup("java:comp/depttLink")
5. ctx.lookup("depttLink")
But neither of these is working.Can any one help me. I am trying this from the last two days.
Thanks,
Sachin
-
How to Lookup a local entity bean - Help me out (3 messages)
- Posted by: sachin sisodia
- Posted on: July 06 2004 05:42 EDT
Threaded Messages (3)
- How to Lookup a local entity bean - Help me out by Arun Nair on July 06 2004 09:13 EDT
- How to Lookup a local entity bean - Help me out by samy mohan on July 10 2004 08:46 EDT
- Connect on local way by Henda Sammari on July 16 2004 09:45 EDT
-
How to Lookup a local entity bean - Help me out[ Go to top ]
- Posted by: Arun Nair
- Posted on: July 06 2004 09:13 EDT
- in response to sachin sisodia
Try
You could try this : ctx.lookup("java:comp/env/ejb/depttLink")
But,
I think 'ctx.lookup("java:comp/env/depttLink")' should work.
Did you have <ejb-local-ref> defined for the caller Bean.
If that is the case then use local ref name.
-arun -
How to Lookup a local entity bean - Help me out[ Go to top ]
- Posted by: samy mohan
- Posted on: July 10 2004 08:46 EDT
- in response to sachin sisodia
HI,
I think this piece of code will help you.
Context initialCtx;
EJBLocalHome ejbLocalHome =(EJBLocalHome) PortableRemoteObject.
narrow(initialCtx.lookup(jndiName), homeClass);
Regards
Samy -
Connect on local way[ Go to top ]
- Posted by: Henda Sammari
- Posted on: July 16 2004 09:45 EDT
- in response to sachin sisodia
I did it like this:
InitialContext ctx = new InitialContext();
Object o = ctx.lookup("UserMgrLocal");
//Referring to <local-jndi-name>UserMgrLocal</local-jndi-name>
UserMgrLocalHome home = (UserMgrLocalHome)o;
be.swisslife.mwp.security.ses.UserMgrLocal myBean = home.create();
Hope this help.
Regards,
Henda SAMMARI