apusic连接weblogic错误,请教!!!

04-05-29 linmin
我把war部署在apusic里,想连接部署在weblogic里的ejb,可apusic老提示错误,请问apusic能否提供连接weblogic???

war里连接weblogic的简单代码为:

String url ="t3://redwood:7003";

String user = "linmin";

String password = "88888888";

Properties properties = null;

try {

properties = new Properties();

System.out.println("000000");

properties.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");

properties.put(Context.PROVIDER_URL, url);

System.out.println("222222");

if (user != null) {

properties.put(Context.SECURITY_PRINCIPAL, user);

properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password);

}

return new InitialContext(properties);

}

可老是提示环境初始化失败,apusic容器不提供初始化webloic的环境吗????

猜你喜欢