Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4376

Have deployers implement ManagedObjectCreator

XMLWordPrintable

      A container task for having deployers implement ManagedObjectCreator to provide the deployment management metadata.

      Typically this should be based on annotating the deployer metadata and then implementing the build method along the lines of:

      public void build(DeploymentUnit unit, Map<String, ManagedObject> managedObjects)
      throws DeploymentException
      {
      ManagedConnectionFactoryDeploymentGroup mcfdg = unit.getAttachment(getInput());
      if (mcfdg != null)

      { ManagedObjectFactory factory = ManagedObjectFactoryBuilder.create(); ManagedObject mo = factory.initManagedObject(mcfdg, null, null); if (mo != null) managedObjects.put(mo.getName(), mo); }

      }

      This should be done in the parsing deployers. Any subclass of the AbstractParsingDeployerWithOutput inherits such an implementation, and can enable it by setting the buildManagedObject property true.

      public class ManagedConnectionFactoryParserDeployer extends AbstractVFSParsingDeployer<ManagedConnectionFactoryDeploymentGroup>
      {
      ...
      public ManagedConnectionFactoryParserDeployer()

      { super(ManagedConnectionFactoryDeploymentGroup.class); setBuildManagedObject(true); }

      The http://wiki.jboss.org/wiki/Wiki.jsp?page=ManagedObjects page will document what is needed to annotate the metadata.

            dandread1@redhat.com Dimitrios Andreadis
            starksm64 Scott Stark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: