다른 호스트에서 실행되는 두 개의 Jboss 7.1 최종 인스턴스가 있습니다.EJB 원격 JBOSS 7.1 호출 예외
try {
final Hashtable<String, String> props = new Hashtable<String, String>();
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
// create the InitialContext
final Context context = new javax.naming.InitialContext(props);
CService=(CServiceEJBRemote)context.lookup("ejb:......//(rute)ServiceEJBBean!(rute) ...ServiceEJBRemote");
// invoke on the bean
final boolean resp = CService.verificarUsuario(//some parameters...);
System.out.println("Received greeting: " + resp);
} catch (Exception e) {
throw new RuntimeException(e);
}
내 EJB가 EAR에 포장되고 Webclient에는 WAR로 패키지 :
나는 다음과 같이 다른 호스트에서 하나의 호스트에서 서비스를 호출하려고합니다. EAR ("WEB-INF/classes"디렉토리 아래)에 "jboss-ejb-client.xml"을 넣었습니다.
"CService.verificarUsuario (// some parameters ...);" 처리하기위한
없음 EJB 수신기 가능 : 호출, 나는 예외가 [프로그램 응용 : 글로벌 모듈 이름을 : 핀터, distinctname : 핀터 - EJB] 호출 컨텍스트에 대한 조합 [email protected]
"jboss-ejb-client.xml"을 war (presentation)과 jar (services)가 포함 된 EAR 내에 배치하는 문제가 해결되었습니다. – danivare