Hi,
I'm trying to instantiate Datsource object directly ,that is using only JNDI
and no beans.
I do get a reference but i'm not able to cast it into Datasource object it is
throwing ClassCast exception.
source code :
Properties h=new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.rmi.registry.RegistryContextFactory");
h.put(Context.PROVIDER_URL,"rmi://MACHINE_NAME:1099");
Context ctx = new InitialContext(h);
Datasource ds=(Datasource)ctx.lookup("myDataSource");
Connection conn = ds.getConnection();
Thanks in advance
Subodh
----
This list is cross-posted to two mail lists. To unsubscribe,
follow the instructions below for the list you subscribed to.
For objectweb.org: send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe ejb-container-group".
For enhydra.org: send email to [EMAIL PROTECTED] and include
in the body of the message "unsubscribe ejb-container-group".