2012-03-17 14 views
0

Eclipseで2つのプロジェクトが定義されています。 これらのうちの1つはEJB(3.0)プロジェクトであり、もう1つは動的Webプロジェクトです。strutsで定義されたアクションクラスからEJBメソッドにアクセスする

LoginAuthenticatorという名前のステートレスセッションBeanを定義し、ローカルとリモートの2つのインターフェイスを作成しました。私は、私は、JBoss 5.0.0 上のjarファイルを展開することができる午前私は

LoginAuthenticator/remote - EJB3.x Default Remote Business Interface 
LoginAuthenticator/remote-com.SR.enterprise.session.LoginAuthenticatorRemote - EJB3.x Remote Business Interface 
LoginAuthenticator/local - EJB3.x Default Local Business Interface 
LoginAuthenticator/local-com.SR.enterprise.session.LoginAuthenticatorLocal - EJB3.x Local Business Interface 
を展開した後、コンソールに次の出力を取得しています

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory 
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces 
java.naming.provider.url=localhost:1099 

としてJNDI.propertiesファイルを定義している私のEJBプロジェクトで

他のWebプロジェクトから、セッションBeanの公開メソッドにアクセスするアクションクラスLoginActionを定義しました。 は、初期コンテキストは、私はTomcatの6.0上の第二のプロジェクトを実行すると、私は次のエラーメッセージ

javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 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.SocketException: Permission denied: connect]]] 
を取得しています

LoginAuthenticatorRemote loginAuthenticator = (LoginAuthenticatorRemote) context.lookup("LoginAuthenticator/remote"); 

としてリモートメソッドを呼び出しています

props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); 
props.put(javax.naming.Context.PROVIDER_URL,"jnp://localhost:1099"); 
props.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces"); 

として作成されます

jmx-consoleのservice = Namingのポートの値は1099 jmx-consoleのservice = NamingのRmiPortの値は1098です。RmiBindAddress & jmx-consoleのBindAddress =サービス名= 127.0.0.1

エラーの原因は何でしょうか?このために他に何を設定する必要がありますか? ご協力いただければ幸いです。

答えて

0

私はこれに対する解決策を得ました。 私のファイアウォールは、そのJNDIアドレスとポートのリクエストをブロックしています。

関連する問題