在我的问题中SessionBean已经定义为了remote,在这方面没有错的,我的EntityBean定义为了local,会不会有错?

解决方案 »

  1.   

    1.用 java.util.Date
    2.远程调用:
    Hashtable ht = new Hashtable();
        EJBConfig config = EJBConfig.getInstance(); //我自己的类,取得ip和port
        ht.put(ctx.PROVIDER_URL, "t3://" + config.getServer() + ":" + config.getPort() );
        ht.put(ctx.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
        ctx = new InitialContext(ht);   anEJBHome = (EJBHome) javax.rmi.PortableRemoteObject.narrow (ctx.lookup (homeClass.getName()), homeClass);