I'm using the SerialInitContextFactory:
System.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
// setup testproperties for accessing glassfish
System.setProperty("org.omg.CORBA.ORBInitialHost", "..");
System.setProperty("org.omg.CORBA.ORBInitialPort", "..");
I also tried to add:
System.setProperty("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
System.setProperty("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
Doesn't make any difference.I've added the .jar files that you have in your sample, i had all of them but the imqjmsra.jar file, not really sure why that files is needed though. I don't have the Derby client either but i'm guessing that i don't need that since i'm using mysql in this case.
Might add that i tried the exact same code using a Oracle datasource and that works like a charm.
[Message sent by forum member 'laban' (laban)]
http://forums.java.net/jive/thread.jspa?messageID=253374