本文介绍了EJB3客户端查找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从独立的Java客户端调用EJB,并收到以下错误.

I am trying to invoke a EJB from a standalone Java client, getting the below error.

查找代码

String localJNDIName = "ejbremote:gcmsnew/gcmsutilbeans.jar/CustomerSurveyManageQstBean#com.smbcgroup.gcms.utility.bl.survey.CustomerSurveyManageQstRemote";
InitialContext ic = new InitialContext();
GCMSBaseRemote bean = (GCMSBaseRemote)ic.lookup(localJNDIName);

例外

环境

RAD 7.5,EJB3. Websphere Application Server 7.0.

RAD 7.5, EJB3. Websphere Application Server 7.0.

推荐答案

ejbremote方案在WebSphere Application Server中不存在(即使确实存在"ejblocal").尝试使用 ejb/前缀而不是 ejbremote:.

The ejbremote scheme does not exist in WebSphere Application Server (even though "ejblocal" does exist). Try using a ejb/ prefix instead of ejbremote:.

有关更多信息,请参见 EJB应用程序绑定概述主题.

For more information, see the EJB application bindings overview topic in the InfoCenter.

这篇关于EJB3客户端查找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-05 05:40