リモート サーバーにデプロイされたステートレス EJB を呼び出そうとしています。ローカル JBoss 環境から Bean を呼び出すことはできますがremote.connection.default.host
、リモート マシンのホストに変更すると、クライアント コードが機能しません。
これは私の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=SERVERIP/HOSTNAME
remote.connection.default.port=8080
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.default.username=username
remote.connection.default.password=Password
私のクライアントコードは次のようになります。
Properties properties = new Properties();
properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
String jndi = "jndi_name";
Context context = new InitialContext(properties);
obj = context.lookup(jndi);
助けてください。
皆さんありがとう。ジャック。