5 Replies Latest reply on Aug 23, 2005 3:22 AM by sboddula

    Clustering EJB3 JBoss 4.0.3

    amenra

      I have a Problem concerning clustering ejbs. Searching did not lead me to a result so I am asking in this Forum:

      I was using the installer and chose the "all" config in the installer to install the AS.

      Now I am trying to experiment a little bit with clustered beans and immediately had a problem which I think I did not have with previous releases + EJB3 .

      When deploying it did not find LoadBalancePolicy:

      [ServiceController] Problem creating service jboss.j2ee:service=EJB3,name=info.seraphim.tests.stateful.CalculatorBean
      java.lang.RuntimeException: java.lang.TypeNotPresentException: Type org.jboss.ha.framework.interfaces.LoadBalancePolicy not present

      The code (Taken from the trail and slightly modified):

      import javax.ejb.*;
      import java.util.*;
      import java.io.Serializable;
      import org.jboss.annotation.ejb.Clustered;
      
      
      @Stateful
      @Clustered
      @Remote(CalculatorRemote.class)
      public class CalculatorBean implements Calculator, CalculatorRemote, Serializable {


      I guess it has something to do with the ejb3 installer's version not beeing fully "cluster-ready". What should I do to get a "clustered" 4.0.3 wit ejb3 support?

      Thank you in advance!

        • 1. Re: Clustering EJB3 JBoss 4.0.3
          amenra

          Does nobody have a quick hint on this issue? Perhaps we should integrate the ejb3 beta into a packaged 4.0.3 JBoss?

          • 2. Re: Clustering EJB3 JBoss 4.0.3
            depl20982

            Hi i´m having the same problem.

            I installed the jboss-4.0.3RC1-installer.jar with the predefined option (all).

            I compiled the example of clustering from the jboss-EJB-3.0_RC1 tutorial, and then I deployed it.

            When I deploy the component, I got this error.

            --- MBeans waiting for other MBeans ---
            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.SessionBean
            State: FAILED
            Reason: java.lang.RuntimeException: java.lang.TypeNotPresentException: Type org.jboss.ha.framework.interfaces.LoadBalancePolicy not present

            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.StatefulBean
            State: FAILED
            Reason: java.lang.RuntimeException: java.lang.TypeNotPresentException: Type org.jboss.ha.framework.interfaces.LoadBalancePolicy not present

            --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.SessionBean
            State: FAILED
            Reason: java.lang.RuntimeException: java.lang.TypeNotPresentException: Type org.jboss.ha.framework.interfaces.LoadBalancePolicy not present

            ObjectName: jboss.j2ee:service=EJB3,name=org.jboss.tutorial.clustering.bean.StatefulBean
            State: FAILED
            Reason: java.lang.RuntimeException: java.lang.TypeNotPresentException: Type org.jboss.ha.framework.interfaces.LoadBalancePolicy not present


            I downloaded the last EJB3 release (from August 4) and patched my JBoss and still got the problem,

            Does anyone know about this problem?
            Do I need to activate any option or download any file?

            Thanks in Advance

            • 3. Re: Clustering EJB3 JBoss 4.0.3
              kabirkhan

              I've not tried the installer myself, but when starting jboss are you sure you start it with the all config?

              $cd jboss-4.0.3RC1/bin
              $run -c all

              Also does the JBOSS/server/all/lib folder contain jboss-ha.jar?

              • 4. Re: Clustering EJB3 JBoss 4.0.3
                depl20982

                Thanks for your help

                The problem is that the autoinstaller jar only includes the "default" configuration for Jboss, and clustering needs the "all" configuration.

                I downloaded the Zip file, and patched it with the last EJB3 distribution.

                After that, my EJBs deploy ok, but now I'm getting problems with the load-balancing and fail-over features, that I couldn't maka them work.

                I started up two Jboss in the same partition, and I ran a single client (clustering example from ejb3 tutorial) and the calls are always handled by a single server, and if I stop it the client fails inmmediately without making fail-over to the other server.

                This is my jndi.properties

                java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
                java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
                java.naming.provider.url=dev-diegop:1100,dev-franciscor:1100


                Thank you in advance

                • 5. Re: Clustering EJB3 JBoss 4.0.3
                  sboddula

                  I am not able find the Clustering example from EJB3 Tutorial . Please anybody give me the URL?