2 Replies Latest reply on Apr 25, 2008 7:05 AM by slimamar

    ClientSocketFactory with EJB3 JBoss-5.0.0.Beta4

    slimamar

      Hello,

      We want to use a ClientSocketFactory and after some reads (Remoting guide)
      we have configured this in the file $JBOSS_HOME/server/<my-conf>/deploy/ejb3-connectors-service.xml :

      <?xml version="1.0" encoding="UTF-8"?>
      <!--
      JBoss EJB3Deployer

      $Id: jboss-service.xml 41488 2006-02-25 00:14:09Z dimitris $
      -->



      <!-- socket://${jboss.bind.address}:3873 -->



      1
      303
      2
      ${jboss.bind.address}
      3873
      60000
      myPackage.MyClientSocketFactory
      myPackage.MyClientSocketFactory


      org.jboss.aspects.remoting.AOPRemotingInvocationHandler







      Unfortunately, this does not work and we have an exception in the client side :
      javax.naming.NamingException: Could not dereference object [Root exception is javax.ejb.EJBException: Invalid invocation of local interface]
      cause exception : java.lang.ClassCastException: java.lang.String

      What's wrong ?

      Thank's in advance.

        • 1. Re: ClientSocketFactory with EJB3 JBoss-5.0.0.Beta4
          slimamar

          Sorry, i have had a problem with the message body post.
          The correct message body is :

          We want to use a ClientSocketFactory and after some reads (Remoting guide)
          we have configured this in the file
          $JBOSS_HOME/server/<my-conf>/deploy/ejb3-connectors-service.xml :

          <?xml version="1.0" encoding="UTF-8"?>
          <!--
          JBoss EJB3Deployer

          $Id: jboss-service.xml 41488 2006-02-25 00:14:09Z dimitris $
          -->



          <!-- socket://${jboss.bind.address}:3873
          -->



          1
          303
          2
          ${jboss.bind.address}
          3873
          60000
          myPackage.MyClientSocketFactory
          myPackage.MyClientSocketFactory


          org.jboss.aspects.remoting.AOPRemotingInvocationHandler







          Unfortunately, this does not work and we have an exception in the client
          side :
          javax.naming.NamingException: Could not dereference object [Root exception
          is javax.ejb.EJBException: Invalid invocation of local interface]
          cause exception : java.lang.ClassCastException: java.lang.String

          What's wrong ?

          Thank's in advance.

          • 2. Re: ClientSocketFactory with EJB3 JBoss-5.0.0.Beta4
            slimamar

            Sorry, always the problem with the message body post.
            The final correct message body is :

            We want to use a ClientSocketFactory and after some reads (Remoting guide)
            we have configured this in the file $JBOSS_HOME/server/<my-conf>/deploy/ejb3-connectors-service.xml :

            <?xml version="1.0" encoding="UTF-8"?>
            <!--
             JBoss EJB3Deployer
            
             $Id: jboss-service.xml 41488 2006-02-25 00:14:09Z dimitris $
            -->
            <server>
            
             <mbean code="org.jboss.remoting.transport.Connector"
             name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
             <!-- <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873</attribute> -->
             <attribute name="Configuration">
             <config>
             <invoker transport="rmi">
             <attribute name="numAcceptThreads">1</attribute>
             <attribute name="maxPoolSize">303</attribute>
             <attribute name="clientMaxPoolSize" isParam="true">2</attribute>
             <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
             <attribute name="serverBindPort">3873</attribute>
             <attribute name="timeout" isParam="true">60000</attribute>
             <attribute name="customSocketFactory" isParam="true">myPackage.MyClientSocketFactory</attribute>
             <attribute name="socketFactory" isParam="true">myPackage.MyClientSocketFactory</attribute>
             </invoker>
             <handlers>
             <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
             </handlers>
             </config>
             </attribute>
             </mbean>
            
            </server>


            Unfortunately, this does not work and we have an exception in the client side :
            javax.naming.NamingException: Could not dereference object [Root exception is javax.ejb.EJBException: Invalid invocation of local interface]
            cause exception : java.lang.ClassCastException: java.lang.String

            What's wrong ?

            Thank's in advance.