2 Replies Latest reply on Jan 14, 2009 3:49 PM by Peter Johnson

    jboss 5.0.0.GA and ejb3

    Isaac Peel Newbie

      I have a remote EJB that I use as a pretty basic service hosted on jboss 5.0.0. According to the readme.txt in jbossall-client.jar I have to include the following jar files in my client.

      commons-logging.jar
      concurrent.jar
      ejb3-persistence.jar
      hibernate-annotations.jar
      jboss-aop-client.jar
      jboss-appclient.jar
      jboss-aspect-jdk50-client.jar
      jboss-client.jar
      jboss-common-core.jar
      jboss-deployers-client-spi.jar
      jboss-deployers-client.jar
      jboss-deployers-core-spi.jar
      jboss-deployers-core.jar
      jboss-deployment.jar
      jboss-ejb3-common-client.jar
      jboss-ejb3-core-client.jar
      jboss-ejb3-ext-api.jar
      jboss-ejb3-proxy-client.jar
      jboss-ejb3-proxy-clustered-client.jar
      jboss-ejb3-security-client.jar
      jboss-ha-client.jar
      jboss-ha-legacy-client.jar
      jboss-iiop-client.jar
      jboss-integration.jar
      jboss-j2se.jar
      jboss-javaee.jar
      jboss-jsr77-client.jar
      jboss-logging-jdk.jar
      jboss-logging-log4j.jar
      jboss-logging-spi.jar
      jboss-main-client.jar
      jboss-mdr.jar
      jboss-messaging-client.jar
      jboss-remoting.jar
      jboss-security-spi.jar
      jboss-serialization.jar
      jboss-srp-client.jar
      jboss-system-client.jar
      jboss-system-jmx-client.jar
      jbosscx-client.jar
      jbosssx-as-client.jar
      jbosssx-client.jar
      jmx-client.jar
      jmx-invoker-adaptor-client.jar
      jnp-client.jar
      slf4j-api.jar
      slf4j-jboss-logging.jar
      xmlsec.jar


      I didn't have to do all this in jboss 4.2.2, it seems very wrong. Although everything is working I'm wondering both why I need to include all these jars with jboss 5.0.0. Is there is a better more "clean" way to package a client for my remote EJB?

        • 1. Re: jboss 5.0.0.GA and ejb3
          Andrew Rubinger Master

          The reason for this is because starting in the 5.0.0.Beta releases we moved jbossall-client to a manifest-only JAR. This means that instead of repackaging all of the classes in the JARs you mention into one uber-JAR, jbossall-client contains a ClassPath entry in the manifest to point to the relative location of the JARs listed. Therefore, they're expected to be in the same directory.

          As a workaround, you could write a script that does:

          mkdir mytempdir
          for(each JAR listed)
          { extractContentsInto > mytempdir) }
          JAR(contentsOf mytempdir)


          ...and then use your own JAR.

          If you feel this makes things unusable/unfriendly, address it on the jboss-dev public mailing list. We don't want to add "bloat" to the distro by repackaging classes, but maybe we could look into adding a script so that users have the option of making their own single jbossall-client.

          S,
          ALR

          • 2. Re: jboss 5.0.0.GA and ejb3
            Peter Johnson Master

            ipeel, I think that you are misreading that readme file. That file does not contain instructions for what you have to do, rather it provides information on why the file suddenly shrunk in size.

            For your client app, the only thing you need to include in the classpath is the jbossall-client.jar file. The only caveat is that if you need to copy JAR files to a remote system (where your client is running), you now should copy the full client directory, and not just the jbossall-cleint.jar file.