5 Replies Latest reply on Dec 30, 2010 2:14 AM by jaikiran

    Where is the jboss-j2ee.jar file in JBoss 6?

    newguy2010

      This jar file contains some ejb and transactions classes under javax package.

      In JBoss 3 it was called jboss-j2ee.jar, in JBoss 5.1 it was called jboss-javaee.jar but I can't find any jar file similar to that in JBoss 6's client directory. Where is this file? Does it have some other names?

        • 1. Re: Where is the jboss-j2ee.jar file in JBoss 6?
          shelly.mcgowan

          The Java EE APIs are provided in  individual API jars in AS 6 as part of the work for JBEE-15 and an  overview of that change is outlined in the JBoss Java EE API Project wiki .   If you are building using a maven, you can bring in the EE APIs as a single dependency:

           

          <dependency>
             <groupId>org.jboss.spec</groupId>
             <artifactId>jboss-javaee-6.0</artifactId>
             <version>1.0.0.CR1</version>
             <type>pom</type>
             <scope>provided</scope>
          </dependency>

           

          The 1.0.0.Final version will be released soon.

          • 2. Re: Where is the jboss-j2ee.jar file in JBoss 6?
            newguy2010

            This pom reference brings in too many jar files which are not actually needed in the project(at least 10 of them) and those jar files cause conflicts with the existing jar files within jboss' client folder. Is there a way just to import what I want? For instance if I just need "org.jboss.spec.javax.transaction" why do I need to import other libraries?

            • 3. Re: Where is the jboss-j2ee.jar file in JBoss 6?
              nickarls

              You could of course examine the pom of jboss-javaee-6.0 and cherry-pick what you need. I wouldn't recomment hard-linking against stuff found in a particular server lib. What are the conflicts?

              • 4. Re: Where is the jboss-j2ee.jar file in JBoss 6?
                newguy2010

                For example if I include the ejb reference of javaee-6.0 it will throw some errors during deployment. After I exclude the jar file the error is gone. I guess I will have to use <scope>provided</scope> and then other team members have to use exactly the same version of JBoss as I use.

                We don't use libraries found in the Application Server because we are still at a test stage. I am testing my project both on JBoss 5.1 and JBoss 6 to see how it works on both servers so I want to make as least changes as possible to my ear file.

                • 5. Re: Where is the jboss-j2ee.jar file in JBoss 6?
                  jaikiran

                  Sam Tsang wrote:

                   

                  For example if I include the ejb reference of javaee-6.0 it will throw some errors during deployment. After I exclude the jar file the error is gone. I guess I will have to use <scope>provided</scope> and then other team members have to use exactly the same version of JBoss as I use.

                  Yes, Java EE artifacts should have "provided" scope. That way, you ensure that those libraries don't end up in your application packaging. As for choosing the correct version depending on the AS version being used by developers, I guess you can use Maven profiles (see their documentation on that).