有没有尝试过以下方法
private static Context getInitialContext() throws Exception {
String url = "localhost:1099";
String user = null;
String password = null;
Properties properties = null;
try {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, url);
if (user != null) {
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password);
} return new InitialContext(properties);
}
catch(Exception e) {
throw e;
}
}
......
public static void main(String[] args)
{
Context initial = getInitialContext();

解决方案 »

  1.   

    其实这个问题比较简单:就是session bean作为BMP的client,来调用和获取数据中数据,在weblogic中,通过remote interface去获取数据(Remote.getPicsPath),但是同样的代码,在
    BMP已经得到数据的情况之下,通过Remote interface 去获取数据总是放回null
      

  2.   

    liad:
       thank you very much!
       the code that you give me only is to gain the remote interface. in fact,i have get the remote interface and call the remote interface bussiness function successfully.
      

  3.   

    谁有jboss下部署bmp的实例,我的EMAIl : [email protected]
    贴出下载地址也可以
      

  4.   

    看看这个
    http://www.cjsdn.com/post/view?bid=2&id=53912&sty=1&tpg=1&age=0