2 Replies Latest reply on Apr 16, 2003 9:58 AM by Kevin Moran

    Resource Placement with JBoss 3.X?

    Kevin Moran Newbie

      Hi,
      I'm in the process of migrating from JBoss 2.X to 3.X. I can't figure out where to put a resource, foo.jar, in JBoss 3.0.6/Jetty's directory structure such that the following call within my EJB will find it:

      URL url = getClass().getClassLoader().getResource("foo.jar");

      With JBoss 2.4.4/Tomcat 4.0.1 I can put foo.jar in $JBOSS_DIST/lib/ext and my EJB finds it. With 3.0.6 I tried putting it in a variety of locations:

      $JBOSS_DIST/server/default/lib
      $JBOSS_DIST/server/default/deploy
      $JBOSS_DIST/lib
      $JBOSS_DIST/bin (a shot in the dark)

      and it doesn't find it. Any ideas? If not, how can I tell where the classloader is looking for things?

      TIA,
      -kevin

      P.S. I also tried the following, but it didn't work either:

      Thread.currentThread().getContextClassLoader().getResource("foo.jar");

        • 1. Re: Resource Placement with JBoss 3.X?
          Adrian Brock Master

          :-)

          You didn't try server/default/conf
          this is one the first things added to the loader
          repository.
          A better place would be inside your application.

          The classloader looks at all deployments.
          The places you mention are not deployments
          but places where things are deployed.
          e.g. the contents of
          server/default/lib/jboss.jar is searched but not
          server/default/lib is not.

          Regards,
          Adrian

          • 2. Re: Resource Placement with JBoss 3.X?
            Kevin Moran Newbie

            That worked like a champ, Adrian. Thank you! Also, I will eventually bundle that Jar with my app. I just found that during development it was quicker to put the 300MB foo.jar somewhere where JBoss could find it than repeatedly bundle it up in an EAR and re-deploy it. Thanks again for your help!