2017-10-29 3 views
0

일부 EJB 자습서를 따르려고했지만 대부분 JNDI에 대한 이야기를 시작했으며 JBoss AS에서 서비스를 실행하는 데 문제가 있습니다.Eclipse의 JBoss EAP에 jndi 서비스가 없습니다.

이클립스에서 JBoss의 커뮤니티 및 EAP 버전을 모두 사용해 보았지만 모두 실패합니다.

이제는 BeanRemote beanRemote = (BeanRemote) context.lookup("somecontext");과 같은 줄을 실행할 때마다 이러한 오류가 발생합니다. 물론

javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]] 
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]] 
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect] 
Caused by: java.net.ConnectException: Connection refused: connect 

잘은이 포트가없는 열 발생,하지만 난 생각 자사의 JBoss 서버가 서비스를 제공하지 않습니다 자사의 웹 포트와 관리 포트 8080 및 9990하지만 잘 작동하기 때문이다.

이클립스 Oxygen 4.7.0을 사용하고 있는데, Red Hat JBoss 개발자 Studio를 다운로드했습니다. "새 서버"마법사를 통해 서버를 추가 한 다음 마법사에서 서버 런타임을 다운로드했습니다. 그러나 jndi를 구성 할 방법이 없으며 다운로드 한 경로에서 jndi 또는 jnp와 관련된 파일을 찾을 수 없습니다. XML 구성에서는 Management 9990 및 Web 8080 포트만 열려 있음을 보여줍니다.

기본적으로이 기능을 사용할 수없는 이유를 알 수 없으며 무엇을해야할지 모르겠습니다. JNDI는 관리 콘솔의 어딘가에서 구성 할 수 있습니까? 이 articles 올바른 방법을 도시

+0

이 오류를 얻고있다로 변경되었습니다 이전 버전의 JBoss AS에서 작동하도록 만들어진 클라이언트를 사용하고있는 것처럼 보입니다. –

+0

@SteveC 그래서 JNDI는 지금 구식 기술과 같은 의미입니까? 아니면 EAP 7.0이 너무 오래 되었습니까? 그리고 예, 저는 EAP 7로 일하고 있습니다. 내가 따르고있는 튜토리얼은 https://www.tutorialspoint.com/ejb/에 있습니다. 그렇다면 지금 EJB3.1에 어떤 기술을 사용하고 있습니까? –

답변

0

는 EAP 5

에서 EAP 7에서 변경된 JNDI에 연결 방법 밝혀 도와주세요.

jndi.properties는 jboss-ejb-client.properties로 변경되었습니다, 표준 설정은 이제

endpoint.name=client-endpoint 
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false 

remote.connections=default 

remote.connection.default.host=yourhostaddress 
remote.connection.default.port = 8080 
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false 

이되고 상황에 맞는 검색 문자열이 ejb:<app-name>/<module-name>/<distinct-name>/<bean-name>!<fully-qualified-classname-of-the-remote-interface>

관련 문제