Problem in calling methods on EJB3 app from client
llper May 12, 2009 11:51 AMHi,
I'm trying to configure my jboss for a simple ejb3 module which is called from a java client.
I'm using jboss 5.0.1.GA
These are the config files involved:
jbossweb.sar\server.xml:
...
<Service name="jboss.web">
<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"
connectionTimeout="20000" redirectPort="8443"
/>
<!-- Add this option to the connector to avoid problems with
.NET clients that don't implement HTTP/1.1 correctly
restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$"
-->
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"
redirectPort="8443" />
<!-- SSL/TLS Connector configuration using the admin devl guide keystore -->
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/ssl/server.keystore"
keystorePass="123456" sslProtocol = "TLS"
/>
...
jboss.xml in [ejb3project]/META-INF:
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<session>
<ejb-name>forms.FormManager</ejb-name>
<remote-binding>
<jndi-name>forms.FormManager/remote</jndi-name>
<client-bind-url>socket://${jboss.bind.address}:4446</client-bind-url>
</remote-binding>
<remote-binding>
<jndi-name>forms.FormManager/http/private</jndi-name>
<client-bind-url>
http://${jboss.bind.address}:8080/unified-invoker/PrivateEjb3ServerInvokerServlet/?return-exception=true
</client-bind-url>
</remote-binding>
<remote-binding>
<jndi-name>forms.FormManager/http/public</jndi-name>
<client-bind-url>
https://${public.firewall.address}:8080/unified-invoker/PublicEjb3ServerInvokerServlet/?return-exception=true
</client-bind-url>
</remote-binding>
</session>
</enterprise-beans>
</jboss>
As you can see, I've also a configuration used to deploy ejb3 over Http.
The client does the lookup in the following way:
InitialContext ctx = new InitialContext(); formManager = (FormManager) ctx.lookup(FormManager.JNDI_NAME);
with:
public static final String JNDI_NAME = "forms.FormManager/remote"; java.naming.provider.url=192.168.1.116:1099 java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
What is wrong? I've tried several ports instead of 4446 and I do not get best results an exception in StalessContainer.java:445.
Unfortunately I've not found the source of StalessContainer.java, to look at it myself...
somebody could help?