2 Replies Latest reply on Apr 30, 2006 12:06 PM by poojac20

    custom deployment listener / classloader

    poojac20

      This question is two parts:
      1. I want to write a custom deployment listner, for lets say.xdr files or -mydr.xml files. To achieve that, do I need to refer to the code for DeploymentManagementService in jboss and extend it to write my own MBean? How can I tell jboss deploymentservice to ignore my files? Or instead of MBean shall I try to write an interceptor? [I also want a J2ee thing like an EJB to then access stuff from this .xdr]

      2. This .xdr file will actually be a jar with its own folder structure and a lib (containing further jars) and conf files? I want to access stuff from this .xdr from another .xdr, previously present. If I understand correctly, I'll need to write my own classloader. I need a confirmation that this is possible to do with jboss. Isn't it?

      Let's not get into the details of exactly why I need to do this; ans is long. If it makes anyone cringe at the thought of someone needing to do this, and it looks like a bad design decision, pls let me know, but also answer the question if only for the sake of philosophy.

      Also, I couldn't find any, but is there a documentation on custom deployment/classloaders?

      Thanks
      --- Pooja.
      I am unsure if this is the right forum category for this question; this just seemed the closest.

        • 1. Re: custom deployment listener / classloader
          dimitris

          You need to write a new (sub)deployer, either by extending org.jboss.deployment.SubDeployerSupport or org.jboss.deployment.SimpleSubDeployerSupport

          Try listDeployers (or something like that) from the jmx-console on the MainDeployer to find out the names/classes of the various registered subdeployers, then look at their code to understand what they are supposed to do.

          • 2. Re: custom deployment listener / classloader
            poojac20

            Thanks Dimitris, this has given me a good starting point. Subdeployers is the keyword I was missing and calling it a custom deployer.

            I am hoping my question about the classloading will be solved through sub deployers itself; will post results.