1 Reply Latest reply on Feb 14, 2006 1:46 PM by peterj

    Where are all those JAR's    What modules in the JAR JMS....

      I' was not involved in the development of JBOSS nor EJB,
      I see examples and try to execute them , but they require you to include
      tons of different specific JAR files
      I respect I need to include OBJECTS but how the hell can I find whar JAR to USE ???????
      Of coarse it is easy once you have figered ut what JARS and what module
      The default setting helps you a bit but then you need to add one more
      Typing error or ...... NO way to know
      Days fly away looking for the impossible ....

      activationConfig is defened where ??????? JMS ....???
      -------------------
      ProducerObject ??????
      ProducerManager
      nf.format ??????

      environment :: EJB3 POJO

      @Consumer(activationConfig =
      ------------------- {
      @ActivationConfigProperty(propertyName="destinati
      ----------------------------------------------------
      JMS Client

      InitialContext ctx = new InitialContext();
      l dbq = () ctx.lookup(
      .class.getName());
      ProducerObject po = (ProducerObject) cal;
      ProducerManager manager = po.getProducerManager();

      manager.connect(); // internally create a JMS connection
      try {
      result = nf.format(
      } finally {
      manager.close(); // clean up the JMS connection
      }

        • 1. Re: Where are all those JAR's    What modules in the JAR JMS
          peterj

          I sympathize with your plight; I struggled with the same issues when I first started on Java. Of course now, whenever I am forced to do any C/C++ work, I cuss and yell about not knowing which header files and which lib files to include for compiling and linking. That used to be second nature to me.

          I am not sure from your post if you are having compile or runtime problems. So I will briefly cover what I do in each area.

          For compiling, I usually include every jar in ./client and ./server/xxx/lib (where "." Is the JBoss home, and xxx is the particular configuration, usually "all" or "default"). That is usually overkill, but Ant makes it so easy to include every jar that I usually don?t bother with paring the list down to the bare minimum. Of course, if my app also depends on other jar files (such as Spring or Tapestry) I include those also.

          For running, that depends. A web app or EJB app usually is happy with the jar files provided automatically by JBoss in the ./server/xxx/lib directory. Of course, if I used Spring or Tapestry or other library, I include its jar files in my WEB-INF/lib directory. For a client, which is what I think you are trying, I start with ./client/jbossall-client.jar. It usually has everything I need.

          As far as determining what jar file contains what class, I have two suggestions. First, a jar file is like a zip file, and any zip utility can read it. On Windows, I add an Open With entry in Explorer to jar files to open them with WinZip. On Linux, I rename the jar file to .zip and use the built-in zip browsing capabilities. Of course, if you prefer command lines, the jar utility can be used to list the contents of the jar: jar ?tf some.jar. Second, I use a utility like JarFinder from Isocar http://www.isocra.com/articles/jarFinder.php. I can point this utility at a directory and it will tell me which jar file in that directory contains, for example, LongOpt.class. This utility has saved my sanity on countless occasions.

          Hope this helps.