Posted By:
Sanjay_Sharma
Posted On:
Monday, January 19, 2004 03:04 AM
Dear all, my problem is more or less like nitin's problem. but the solution given by him is not working on my end. code is -------------------------------------------------- Properties prop=new Properties(); prop.put(InitialContext.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory"); prop.put(InitialContext.PROVIDER_URL,"iiop://localhost:2809"); InitialContext context=new InitialContext(prop); Object obj=context.lookup("cell/nodes/localhost/servers/server1/jdbc/ds2"); javax.sql.DataSource data=(javax.sql.DataSource) obj; System.out.println(data); -------------------------------------------------------
More>>
Dear all,
my problem is more or less like nitin's problem.
but the solution given by him is not working on my end.
code is
--------------------------------------------------
Properties prop=new Properties();
prop.put(InitialContext.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
prop.put(InitialContext.PROVIDER_URL,"iiop://localhost:2809");
InitialContext context=new InitialContext(prop);
Object obj=context.lookup("cell/nodes/localhost/servers/server1/jdbc/ds2");
javax.sql.DataSource data=(javax.sql.DataSource) obj;
System.out.println(data);
-------------------------------------------------------
at the time of typecasting i am getting class cast exception
hey nitin i didn't get ur last two line can u explain me that
)_______________________________________________________
JRE system library (variable)
WAS_V5_IMPL_FACTORY_PROP (predefined folder)
the above two things i didn't apply
tell me more preceisely if u can
<<Less