bas4.51:
Context ctx = new InitialContext();
Object ref = ctx.lookup("ejbbean");webshere我没用过,没必要都知道吧,服务器多呢
Context ctx = new InitialContext();
Object ref = ctx.lookup("ejbbean");webshere我没用过,没必要都知道吧,服务器多呢
解决方案 »
- fusioncharts x轴间距
- Maven错误“'cmd' is not recognized as an internal or external command
- java 字符串问题是否能在简化
- 文本框设置系统默认的时间
- 使用jimi把jpg转换成tif
- 怎么不让hibernate生成的sql语句不输出到tomcat的stdout.log文件里
- 要学习j2ee,请教推荐图书
- 关于用ANT编译的时候出现的问题。急
- jb7+sql server2000+ weblogic7出现weblogic/version 错误??
- SAX解析根结点问题(附上通俗易懂的代码)
- 好像大家都说在网页中最好不用applet直接访问数据库,那现在正在用Java开发的兄弟们是不是都通过EJB去访问数据库还是用其他方法
- 虽然ejb好像很火,但是似乎只有在那些很拉稀的项目中才会有人去尝试用ejb.有人真的在什么重要的项目中用了ejb吗?要说话的小朋友们举手!
p.put(Context.PROVIDER_URL,
“iiop://192.168.2.7:900”);
p.put(Context.INITIAL_CONTEXT_FACTORY,
“com.ibm.ejs.ns.jndi.CNInitialContextFactory”);
//192.168.2.7为服务器IP,900为端口号
roamer请问webshere支持ejb1.1吗?我记得好象只支持1.0,
不过听说新出的websphere4.0支持ejb1.1,不过没见过.
weblogic6支持ejbql,
websphere4可以吗
,哈,被你一逼,只有出手了。
String sProviderURL= "iiop://localhost:8080";//这是bas45本地开发的地址,实际过程中与你的配置有关 //String sJNDIFactory= "com.ibm.ejs.ns.jndi.CNInitialContextFactory";
//0.
//Bas Factory
String sJNDIFactory= "com.inprise.j2ee.jndi.CtxFactory";
//JNDI的制造者;
System.out.println("ProviderURL : "+sProviderURL);
try
{
// Get an InitialContext
Properties h= new Properties();
//WebLogic6.0
//h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
//WebSphere
h.put(Context.INITIAL_CONTEXT_FACTORY, sJNDIFactory);
//Borland Application Server
h.put(Context.PROVIDER_URL, sProviderURL);
return new InitialContext(h);
}
catch (NamingException ne)
{
System.out.println(ne);
System.out.println(
"We were unable to get a connection to the WebLogic server at " + sProviderURL);
System.out.println("Please make sure that the server is running.");
//throw ne;
return null;
}
String sProviderURL= "iiop://localhost:14000";
实际格式是 iiop://bas安装机器的IP:Bas的port