Hello
I am familiar with EJBS and the ENC, whereby Environment entries defined within the deployment descriptor can only be seen by the bean in question.
Thus, when I perfrom the following outside of the EJB (say from a seperate client PC JVM, the environment entry cannot be found.
Context ctx = new InitialContext();
String path = (String) ctx.lookup("java:comp/myentry");
1) How can ?I set up environment entries that can be seen to the "entire application". Where is this done?
Thanks
Paddy
-
JNDI and application environment entries (1 messages)
- Posted by: Paddy Murphy
- Posted on: January 05 2004 07:18 EST
Threaded Messages (1)
- JNDI and application environment entries by Hari Lakshmanan on January 05 2004 13:37 EST
-
JNDI and application environment entries[ Go to top ]
- Posted by: Hari Lakshmanan
- Posted on: January 05 2004 13:37 EST
- in response to Paddy Murphy
Hello
>
> I am familiar with EJBS and the ENC, whereby Environment entries defined within the deployment descriptor can only be seen by the bean in question.
>
> Thus, when I perfrom the following outside of the EJB (say from a seperate client PC JVM, the environment entry cannot be found.
>
> Context ctx = new InitialContext();
> String path = (String) ctx.lookup("java:comp/myentry");
>
>
> 1) How can ?I set up environment entries that can be seen to the "entire application". Where is this done?
>
> Thanks
>
> Paddy
You should be able to lookup using appServer specific JNDI lookup. For example on weblogic, you would do the following
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,"t3://localhost:7001");
Context ctx = new InitialContext(p);
ctx.lookup(<your JNDI name>)
where Your JNDI name is defined in weblogic specific deployment descriptor.
Hope this helps