Package org.jboss.system.metadata

Examples of org.jboss.system.metadata.ServiceConstructorMetaData


      ServiceMetaData md = new ServiceMetaData();
      ObjectName on = buildObjectName(mcfmd);
      md.setObjectName(on);
      String code = getCode(mcfmd);
      md.setCode(code);
      ServiceConstructorMetaData cmd = buildConstructor(mcfmd);
      md.setConstructor(cmd);
      return md;
     
   }
View Full Code Here


  
   public abstract List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md);
  
   public ServiceConstructorMetaData buildConstructor(ManagedConnectionFactoryDeploymentMetaData mcfmd)
   {
      ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
      constructor.setParameters(new Object[]{});
      constructor.setParams(new String[]{});     
      return constructor;
  
   }
View Full Code Here

   }
  
   @Override
   public ServiceConstructorMetaData buildConstructor(ManagedConnectionFactoryDeploymentMetaData mcfmd)
   {
      ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();

      ConnectorMetaData md = repository.getConnectorMetaData(mcfmd.getRarName());
      if( md == null )
         throw new IllegalStateException("No ConnectorMetaData found for mdf rarName: "+mcfmd.getRarName());
      constructor.setParameters(new Object[]{md, mcfmd, getConnectionManager(mcfmd)});
      constructor.setSignature(new String[]{md.getClass().getName(),
                                            ManagedConnectionFactoryDeploymentMetaData.class.getName(),
                                            String.class.getName()});
      return constructor;      
   }
View Full Code Here

         ServiceMetaData rarDeployment = new ServiceMetaData();
         String name = getObjectName(unit, rdmd);
         ObjectName objectName = new ObjectName(name);
         rarDeployment.setObjectName(objectName);
         rarDeployment.setCode(RARDeployment.class.getName());
         ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
         constructor.setSignature(new String[] { RARDeploymentMetaData.class.getName() });
         constructor.setParameters(new Object[] { rdmd });
         rarDeployment.setConstructor(constructor);
        
         List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
         ServiceAttributeMetaData attribute = null;
         if (workManagerName != null)
View Full Code Here

            ": malformed EjbModule name", e);
      }

      ejbModule.setObjectName(moduleObjectName);

      ServiceConstructorMetaData ctor = new ServiceConstructorMetaData();
      ctor.setSignature(
         new String[]{VFSDeploymentUnit.class.getName(), ApplicationMetaData.class.getName()}
      );
      ctor.setParameters(new Object[]{unit, legacyMD});
      ejbModule.setConstructor(ctor);

      // set attributes
      List<ServiceAttributeMetaData> attrs = new ArrayList<ServiceAttributeMetaData>();
      // Transaction manager
View Full Code Here

      return (MetaDataTestDelegate) getDelegate();
   }
  
   protected void assertDefaultConstructor(ServiceMetaData metaData) throws Exception
   {
      ServiceConstructorMetaData constructor = metaData.getConstructor();
      assertNotNull(constructor);
      String[] signature = constructor.getSignature();
      assertNotNull(signature);
      assertEquals(0, signature.length);
      String[] params = constructor.getParams();
      assertNotNull(params);
      assertEquals(0, params.length);
   }
View Full Code Here

      assertEquals(0, params.length);
   }
  
   protected void assertConstructor(String[] expectedSignature, String[] expectedParams, ServiceMetaData metaData) throws Exception
   {
      ServiceConstructorMetaData constructor = metaData.getConstructor();
      assertNotNull(constructor);
      String[] signature = constructor.getSignature();
      assertNotNull(signature);
      assertEquals(expectedSignature, signature);
      String[] params = constructor.getParams();
      assertNotNull(params);
      assertEquals(expectedParams, params);
   }
View Full Code Here

      protected ServiceDeployment getServiceDeployment() throws Exception
      {
         ServiceMetaData metaData = new ServiceMetaData();
         metaData.setObjectName(new ObjectName("jboss.system:service=Tester"));
         metaData.setCode(Tester.class.getName());
         metaData.setConstructor(new ServiceConstructorMetaData());
         ServiceDependencyMetaData o = new ServiceDependencyMetaData();
         o.setIDependOn("somenonexistant");
         metaData.setDependencies(Collections.singletonList(o));

         ServiceDeployment serviceDeployment = new ServiceDeployment();
View Full Code Here

         String name = getObjectName(metaData);
         ObjectName objectName = new ObjectName(name);
         webModule.setObjectName(objectName);
         webModule.setCode(WebModule.class.getName());
         // WebModule(DeploymentUnit, AbstractWarDeployer, AbstractWarDeployment)
         ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
         constructor.setSignature(new String[] { DeploymentUnit.class.getName(), AbstractWarDeployer.class.getName(), AbstractWarDeployment.class.getName() });
         constructor.setParameters(new Object[] { unit, this, deployment });
         webModule.setConstructor(constructor);

         List<ServiceAttributeMetaData> attrs = new ArrayList<ServiceAttributeMetaData>();

         ServiceAttributeMetaData attr = new ServiceAttributeMetaData();
View Full Code Here

         catch (Exception e)
         {
            throw new RuntimeException(e);
         }
         // Provide a constructor for the service bean
         ServiceConstructorMetaData serviceConstructor = new ServiceConstructorMetaData();
         serviceConstructor.setSignature(new String[]{String.class.getName(), getMetaDataClassType().getName()});
         serviceConstructor.setParameters(new Object[]{deploymentName, metaData});
         subjaccPolicy.setConstructor(serviceConstructor);

         ArrayList<ServiceMetaData> services = new ArrayList<ServiceMetaData>();
         services.add(subjaccPolicy);
         unit.addAttachment(JACC_ATTACHMENT_NAME, subjaccPolicy, ServiceMetaData.class);
View Full Code Here

TOP

Related Classes of org.jboss.system.metadata.ServiceConstructorMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.