1 Reply Latest reply on Aug 31, 2007 6:46 PM by alexg79

    Deploying multiple classes easily?

    alexg79

      I'm writing JUnit tests for my EJBs, but I'm having problems deploying the necessary classes. The approach used in the tutorial:

      jar = AssembledContextFactory.getInstance().create("ejbTestCase.jar");
       jar.addClass(Customer.class);
       jar.addClass(CustomerDAOBean.class);
       jar.addClass(CustomerDAOLocal.class);
      

      is fine if only a handful of classes is used, but my project has over 150 deployable classes so adding them one-by-one isn't very practical. The AssembledDirectory class has a method called addResources, but I haven't had much success with it. No matter how I try, it never adds anything to the jar. Could somebody please explain how to recursively add all classes from the given directory?