2 Replies Latest reply on Mar 1, 2010 3:34 AM by sala223

    EJB3 over SSL doesn't work for remote client

      JBOSS Version: JBoss 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)

      OS: Windows XP

       

      I created a stateless bean in my application and configure it to use SSLSocket.

       

      @Stateless
      @Remote(IHello.class)
      @RemoteBinding(clientBindUrl="sslsocket://0.0.0.0:3843")
      public class Hello implements IHello{

         public String sayHello(){

                return "hello" ;

           }

      }

       

      And I also configured conf/jboss-service.xml file where I added a MBean:

      <mbean code="org.jboss.ejb.plugins.cmp.jdbc.metadata.MetaDataLibrary"
            name="jboss.jdbc:service=metadata"/>
      <mbean code="org.jboss.remoting.transport.Connector"
        name="jboss.remoting:type=Connector,transport=sslsocket3843,handler=ejb3">
        <attribute name="InvokerLocator">sslsocket://${jboss.bind.address}:3843
        </attribute>
        <attribute name="Configuration">
         <config>
          <handlers>
           <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
          </handlers>
         </config>
        </attribute>
      </mbean>

       

      I start jboss with " -b 0.0.0.0 " on windows,

       

      The bean works pretty well when I running the test code on the machine where jboss running.

      However ,when I running the test code on a different machine , an exception is throw,

      Caused by: javax.naming.NamingException: Could not dereference object [Root exception is org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [sslsocket://0.0.0.0:3843/]]    at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504)    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)    at javax.naming.InitialContext.lookup(InitialContext.java:392)    at com.genband.ems.gvu.common.platform.service.BaseServiceLocator.lookupJndi(BaseServiceLocator.java:150)    ... 14 moreCaused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [sslsocket://0.0.0.0:3843/]    at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:776)    at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)    at org.jboss.remoting.Client.invoke(Client.java:1724)    at org.jboss.remoting.Client.invoke(Client.java:629)    at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)    at org.jboss.ejb3.proxy.impl.remoting.IsLocalProxyFactoryInterceptor.invoke(IsLocalProxyFactoryInterceptor.java:72)    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)    at $Proxy16.createProxyBusiness(Unknown Source)    at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:129)    at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)    at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)    at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)    at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)    ... 18 moreCaused by: java.net.ConnectException: Connection refused: connect    at java.net.PlainSocketImpl.socketConnect(Native Method)    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:193)    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)    at java.net.Socket.connect(Socket.java:525)

       

       

      Any one can help me, why the 0.0.0.0 is not replaced?  thanks in advance.