1 Reply Latest reply on Aug 30, 2007 4:53 AM by adrian.brock

    Scopes and MetaData in the Deployers

      http://jira.jboss.com/jira/browse/JBMICROCONT-196

      I've added the basic api for this (obviously there's no deployer that actually
      uses it yet, but that is implementation detail :-)

      The scopes (access and mutation) for deployments and comments can be set on the
      DeploymentUnit - this is similar to the ScopeInfo I refactored in the MC.

      get/setScope()
      get/setMutableScope()

      More likely they will come from the new ScopeBuilder.
      The ScopeBuilder can be set on the DeployersImpl or there is a DefaultScopeBuilder
      which makes scopes based on:
      APPLICATION = top-level deployment
      DEPLOYMENT = this deployment
      INSTANCE = component name

      The only reason I can see to change the scope would be for instance to
      assign datasources to the additional scope SUBSYSTEM=JCA.

      Similarly the repository to use can be set on the DeployersImpl
      by default it will self bootstrap from the MC's repository.

      There is a getMetaData() and getMutableMetaData() that will
      use contexts automatically populated in the repository.

      This will be most useful if a deployer wants to add some contextual
      metadata for use by the runtime.

      e.g. If EJB3 were to be updated to use the scoped metadata then
      the EARDeployer could add things like a default transaction timeout
      from jboss-app.xml to the APPLICATION scope.

      In reality, I anticipate writing a seperate deployer that can be used to
      populate contextual metadata from a jboss-metadata.xml
      Ales already started on the "policy" xml in the microcontainer project.

        • 1. Re: Scopes and MetaData in the Deployers

          While doing this, I reinstated the "cleanup" method on the DeploymentContext
          since the only clear point to remove any metadata from the repository
          is during undeployment.

          I also added a getComponents() to the DeploymentUnit which was missing
          and I needed for the test.