weblogic 中 JNDI的问题
各位大牛,我想在weblogic中JNDI挂一个Object,此对象已经序列化了。我用的在代码中直接
InitialContext ctx = new InitialContext();
Object o=new new Objcet();
ctx.bind("Object",o);
但是一到 InitialContext ctx = new InitialContext();
就报错。我在网上查到是用
Properties env = new Properties();
env.setProperty("java.naming,factory.initial","weblogic.jndi.WLInitialContextFactory");
env.setProperty("java.naming.provider.url", "t3://127.0.0.1:7001");
env.setProperty("java.naming.securiry.principal", "weblogic");
env.setProperty("java.naming.security.principal", "weblogic1");
Context ctx = new InitialContext(env);
ctx.bind("Object",o);
也是在报错;
求大牛们给我指条路撒。