1 Reply Latest reply on Mar 11, 2009 6:01 PM by Ales Justin

    Making the classloader of one deployment the delegate of ano

    Bastian Brandt Newbie

      Hi,

      I am currently trying to integrate an Execution Environment for BDI Agents into Jboss. I have a problem making classreloading work properly.

      I am deploying a ExecutionEnvironment using a jboss-beans.xml. The AgentApplications are described by two types of xml files. I wrote deployers to deploy AgentApplications packed in a jar.

      During the deployment process agent models are loaded. Then agents are started. This means that a concrete agent is created on the base of a loaded agent model. This concrete agent is then marked active and gets executed by an execution service.

      The problem is that the execution service is using the BaseClassLoader which has been created during the deployment of the execution environment. Therefore the changed classes never get reloaded, because the classloader of the ExecutionEnvironment always remains the same.

      I think a solution would be to make the classloader, which was created for the deployment of the agent application, a delegate of the classloader of the execution environment. How could I do this? But maybe there are alternative solutions.

      Thx

      Bastian

        • 1. Re: Making the classloader of one deployment the delegate of
          Ales Justin Master

          Let me try to understand this. :-)
          ExecutionEnvironment = EE
          Agents = A
          AgentApplications deployer = AAD

          So, you (first) deploy EE, and then number of As?
          Or the order doesn't matter since As are only picked up by AAD?

          And then you try to re-deploy EE, but As still see the old one?

          If my assumptions are correct, then what you're looking for is what OSGi does.
          And we already have that. ;-)

          You need to add proper dependency metadata.
          It can be either jboss-classloading.xml (CL dependencies) or
          jboss-dependency.xml (generic dependency).

          The CL dep is more correct, but it's more complex.
          Apart from defining dependency on the EE's package(s)
          you would also need to define others possibly used by As.