0 Replies Latest reply on Oct 29, 2003 8:56 AM by arabin

    How to organize my deployment .jar files?

    arabin Novice

      I'd like to know how I need to organize my classes and .jar files.
      I have a startup class A.class, that is used in user-service.xml for automatic startup. That means that I need to put my .jar file containing A.class into jboss-home\server\default\lib directory. Do I ALSO need to put it into jboss-home\server\default\deploy directory? Or just in one place - jboss-home\server\default\lib?
      This class uses class B.class. Where should the .jar file, containing B.class, be located?
      Should it be located in jboss-home\server\default\lib or in jboss-home\server\default\deploy? Or in both?

      Basically, .jar files with what exactly classes should be located in jboss-home\server\default\lib and .jar files with what exactly classes should be located in jboss-home\server\default\deploy?

      Another question. I could have just one combined .jar file with all classes, located in both directories. Can I split it somehow? Am I allowed to have several .jar files under jboss-home\server\default\deploy? Under jboss-home\server\default\lib?
      Can I split it to several .jar files? Where exactly do I put them? In both places?
      For instance, I split it to two .jar files. Do I need to put both into both places?

      Can I put several classes into several different .jar files? Like if I put A.class into both B.jar and C.jar into jboss-home\server\default\deploy, will I have any problems? Like trying to redeploy certain things twice? Like EJBs or Message Driven Beans?

      Can you give me any explanations on those questions? I am definitely doing something wrong. At this point the only way I succeed is to put everything into ONE .jar file, and put it into both directories. I can live with it, but that is not what I want.

      I do not want to duplicated files unnecessarily into two directories, and I do not want conflicts between different files, between EJBs and MDBs. But I want all my EJBs and MDBs to be deployed correctly. At the same time I want to put as small amount of files as possible into jboss-home\server\default\lib directory (moving the rest to jboss-home\server\default\deploy), and I also want to split my .jar file in jboss-home\server\default\deploy directory into several .jar files, related to different packages.

      Please give my some kind of guidelines to do that. Thanks