dcsimg
Accessing JNDI services in VAJ
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Parag_Lonhari
Posted On:   Wednesday, April 3, 2002 01:27 AM

Hello I am trying to use JNDI services from within a servlet. I am binding an object from one servlet and trying to access the same object from another servlet by getting its reference from JNDI. But I am getting NamingException at the line which rebinds the Object Reference. I am using VAJ 3.5. I have added package com.ibm.ejs.ns.jndi.CNInitialContextFactory in the classpath properties.put (javax.naming.Context.PROVIDER_URL,"iiop:///") ; properties.put (javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory"); Context initial = new InitialCont   More>>

Hello


I am trying to use JNDI services from within a servlet.

I am binding an object from one servlet and trying to
access the same object from another servlet
by getting its reference from JNDI.
But I am getting NamingException at the line
which rebinds the Object Reference.
I am using VAJ 3.5. I have added package
com.ibm.ejs.ns.jndi.CNInitialContextFactory in the classpath


			
properties.put
(javax.naming.Context.PROVIDER_URL,"iiop:///") ;

properties.put
(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.ejs.ns.jndi.CNInitialContextFactory");

Context initial = new InitialContext(properties);
initial.rebind("Thread1",t1);



Thanks in advance.    <<Less
About | Sitemap | Contact