3 Replies Latest reply on Jan 3, 2015 5:49 PM by wdfink

    Multiple remote ejb connections problem

    fapinheiro

      I've follow the link below to connect to remote ejb

      EJB invocations from a remote server instance - JBoss AS 7.1 - Project Documentation Editor

       

      I got success to connect to remote ejb. However, I noticed that  one connection is getting be created by every deploy in de container. Every deploy (full publish) I do in my webapp (.war) create a new connection between local and remote server per deploy. I got the evidence by typing 'netstat' command in local and remote server to see network connections statistics. When a stop the webapp (.war) or (remove) from local server the connection doesn't get be closed even when I code the 'InitialContext.close()' method of the context opened.

       

      I´ve spent a lot of hours....

       

      Have you already see this? Can you help me?


      Thanks a lot.

        • 1. Re: Multiple remote ejb connections problem
          wdfink

          The underlying protocol might close the connection later or reuse it, depend on the implementation.

          So it might that the connection gets closed after a full GC.

          1 of 1 people found this helpful
          • 2. Re: Multiple remote ejb connections problem
            fapinheiro

            It´s very strange. Even performing GC via Java VisualVM application like the following link explains http://visualvm.java.net/monitor_tab.html the connection doesn´t get being closed. When I run JUnit test in Eclipse IDE, using config file 'jboss-ejb-client.properties', I see the connection being established and then closed after method execution. But an application (.war) deployed in JBoss 7.1.1 using config file 'jboss-ejb-client.xml' with appropriate configuration doesn´t close the connection after method execution, even when app is removed or disabled from server.

            • 3. Re: Multiple remote ejb connections problem
              wdfink

              If you use a server-side configuration the server might decide to keep the physical connection open if you undeploy the application and close it later if the resource is not used fo a longer time.

               

              There are some enhancements and fixes around ejb and remoting, so I recommend to try a newer version (like WildFly) to check whether the problem is solved. AS7.1.1 is quite old.