1 Reply Latest reply on Oct 16, 2007 9:52 AM by Alex Grönholm

    Bootstrap and Classpath deployment

    johan micoud Newbie

      Hello,

      I have the following code. I have more that 100 Entities and would like to pass kind of Classpath to the AssembledDirectory class.
      My POJO are in the package myapplication.domain.*

      Is there a way to specify a package, I would like to avoid creating a jar file only for my POJOs each time I run the program.

      Thanks...

      Sam

       AssembledDirectory jar = AssembledContextFactory.getInstance()
       .create("proto.jar");
      
       jar.addClass(MyPOJO1.class);
       jar.addClass(MyPOJO2.class);
       jar.addClass(MyPOJO3.class);
       jar.addClass(MyPOJO4.class);
       jar.addClass(MyPOJO5.class);
       jar.mkdir("META-INF").addResource("META-INF/persistence.xml",
       "persistence.xml");
      
       Bootstrap.getInstance().bootstrap();
       Bootstrap.getInstance().deploy(jar);
       Bootstrap.getInstance().shutdown();