1 Reply Latest reply on Nov 21, 2005 8:03 PM by dirk.koehler

    wars outside of an ear

    echon

      Hi,

      i want to have a behaviour similar to portlets but with standard web apps.

      I have some basic elements like ejbs, pojos for hibernate and some mbeans deployed inside of an ear. Now i want to hotdeploy wars (for example with a StrutsServlet inside) which have to access the classes inside of this ear.

      I don´t want to share session or anything. Problem is that if I call a EJB from this webapp and the method returns a Hibernate POJO i get a classnotfoundexception for this Hibernate POJO.

      If i deploy the war inside of the ear it all works nice, but for this solution i have to edit the application.xml and deploy the whole ear what i exactly tried to avert. I only want that the war (un)register itself to the ear (by a ContextListener or MBean) and can access the EJBs.


      So my questions:
      1) Is it possible to hotdeploy modules of an ear without redeploy the whole ear and without editing config files (at runtime)?
      2) Or is there a chance to deploy the wars outside of the ear but access classes which are located inside of the ear?

      I hope someone can help me or give me a hint.

      Regards


      Peter

        • 1. Re: wars outside of an ear
          dirk.koehler

          hi,

          to 2) there is one way i can think of but don't know if this would meet your requirements, it's actually more of a hack:

          by putting your jars in your jboss root lib folder all of your business classes become available from all deployed apps. this means you're moving your jars (classes) out of the war/ear itself to the lib folder of jboss and you are just deploying an "empty" war/ear containing your ejb-jar/web.xml/META-INF/etc... files - all class loaders will find your classes though.

          to 1) my guess is hotdeployment is not designed in a way that you can re-deploy just a war as part of your ear...anybody an idea?

          Dirk