干嘛不用b/s结构???用application也可以呀,方法是一样的...
在你的程序里
Hashtable ht = new Hashtable();
EJBConfig config = EJBConfig.getInstance();
ht.put(ctx.PROVIDER_URL, "t3://ip:7001" );
ht.put(ctx.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
ctx = new InitialContext(ht);
EJBHome anEJBHome = (EJBHome) ctx.lookup("ejb的jnidname"); if(anEJBHome == null){
anEJBHome = (EJBHome) javax.rmi.PortableRemoteObject.narrow (ctx.lookup (homeClass.getName()), homeClass);
}
return anEJBHome;
在你的程序里
Hashtable ht = new Hashtable();
EJBConfig config = EJBConfig.getInstance();
ht.put(ctx.PROVIDER_URL, "t3://ip:7001" );
ht.put(ctx.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
ctx = new InitialContext(ht);
EJBHome anEJBHome = (EJBHome) ctx.lookup("ejb的jnidname"); if(anEJBHome == null){
anEJBHome = (EJBHome) javax.rmi.PortableRemoteObject.narrow (ctx.lookup (homeClass.getName()), homeClass);
}
return anEJBHome;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货