9 Replies Latest reply on Jul 2, 2006 11:51 AM by jactor

    Creating MBeans using EJB 3.0

      In the trailblaze demo, it is explained how to create mbeans using ejb 3.0. It also states that this is vendor spesific. But it do not state where to find these vendor spesific beans. Which jar you need to use.

      The demo:
      http://trailblazer.demo.jboss.com/EJB3Trail/serviceobjects/lifecycle/index.html

      It states that it covers how to use it ("This trail covers how to use the JBoss EJB 3.0 extension to quickly develop MBean services.") but not where to find the archive needed to run/compile it.

      Where can I find the archive-file needed?

        • 1. Re: Creating MBeans using EJB 3.0
          peterj

          There are two ways to get EJB 3 support in JBoss.

          First, download and run the installer jar file. One of the installation opitons will be EJB3 support (I think selecting 'all' also installs EJB3 support).

          Second, download the source tar.gz file and build JBoss using JVM 5.0 (go to the build directory and run build.sh or build.bat). This results in two builds of JBoss, one with EJB3 support, and the other without.

          • 2. Re: Creating MBeans using EJB 3.0

            This I know and am running jboss-4.0.3SP1, but I am wondering which archive (jar-file) I must use when I want to import the annotations...

            • 3. Re: Creating MBeans using EJB 3.0
              alesj

              Look at the jars in ejb3.deployer.

              • 4. Re: Creating MBeans using EJB 3.0

                After a bit of jar searching, I found the classes in the jar file named jboss-annotations-ejb3.jar localed in JBOSS_SERVER\deploy\ejb3.deployer folder. However; I get a compilation error:

                [javac] Compiling 1 source file to C:\Data\mine\hjemme\bin
                 [javac] C:\Data\mine\hjemme\src\<src.folder>\<MBean>.java:14: cannot find symbol
                 [javac] symbol : method value()
                 [javac] location: @interface org.jboss.annotation.ejb.Management
                 [javac] @Management (<interface>.class)
                 [javac] ^
                 [javac] 1 error

                In the JBoss Eclipse IDE, I get the error message 'The attribute value is undefined for the annotation type Management.' This is located in the source

                @Management (<interface>.class)


                The interface is implemented without any errors and I do not know what might be wrong. Please help me solve this.

                Thanx

                • 5. Re: Creating MBeans using EJB 3.0
                  bdecoste

                  Can you make sure you have the latest jboss-annotations.ejb3.jar? I suspect you have an old version that did not have the 'value' attribute in the annotation. In older versions, this annotation was only allowed on the interface, not on the Service class, so there was no value attribute used to specify the interface class.

                  • 6. Re: Creating MBeans using EJB 3.0

                    Sure I can make sure that I have the latest release... But HOW?

                    My jar file is dated the 23 october 2005 (23:57 hours). How do I check if this is the latest?

                    • 7. Re: Creating MBeans using EJB 3.0
                      alesj

                      Try running against the latest JBossAS 4.0.4.GA.
                      Or look hiw this diff's from last EJB3 embeddable.

                      • 8. Re: Creating MBeans using EJB 3.0

                        Thanx!

                        I was worried for a second since it was not present in the 4.0.4 all release, but I found it in the ejb3 release... I hope it works on jboss-4.0.3SP1 all...

                        • 9. Re: Creating MBeans using EJB 3.0

                          Thanx for the info, but after a brainstorm the mbean must be "general" mbean which has made me create a "regular" mbean and discovering other problems:

                          http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3954895#3954895