Package org.jboss.system.metadata

Examples of org.jboss.system.metadata.ServiceAttributeMetaData


   @Override
   public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
   {
      List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
      ServiceAttributeMetaData attribute = null;
     
      attribute = buildSimpleAttribute("JndiName", md.getJndiName());
      attributes.add(attribute);
     
      if (md.getSecurityMetaData() != null &&
          md.getSecurityMetaData().getDomain() != null &&
          !md.getSecurityMetaData().getDomain().equals(""))
      {
         attribute = buildSimpleAttribute("SecurityDomainJndiName", md.getSecurityMetaData().getDomain());
         attributes.add(attribute);
      }
     
      attribute = new ServiceAttributeMetaData();
      attribute.setName("SubjectFactory");
      ServiceInjectionValueMetaData injectionValue = new ServiceInjectionValueMetaData(subjectFactoryName);
      attribute.setValue(injectionValue);     
      attributes.add(attribute);
      

      attribute = buildDependencyAttribute("CachedConnectionManager", ccmJMXName);     
      attributes.add(attribute);
View Full Code Here


   }
  
  
   public ServiceAttributeMetaData buildSimpleAttribute(String name, String value)
   {
      ServiceAttributeMetaData att = new ServiceAttributeMetaData();
      att.setName(name);
      ServiceTextValueMetaData dep = new ServiceTextValueMetaData(value);
      att.setValue(dep);
      return att;
     
   }
View Full Code Here

      return new ArrayList<ServiceDependencyMetaData>();     
   }

   public ServiceAttributeMetaData buildDependencyAttribute(String name, String dependency)
   {
      ServiceAttributeMetaData att = new ServiceAttributeMetaData();
      ServiceDependencyValueMetaData dep = new ServiceDependencyValueMetaData();
      dep.setDependency(dependency);     
        
      if(name != null)
         att.setName(name);
     
      att.setValue(dep);
      return att;
  
   }
View Full Code Here

   {
      // This code uses the MC/JMX bridge to inject MC beans into JMX components

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

      ServiceAttributeMetaData attribute = buildDependencyAttribute("OldRarDeployment", RAR_JMX + deployment.getRarName() + "'");     
      attributes.add(attribute);           

      attribute = new ServiceAttributeMetaData();
      attribute.setName("SubjectFactory");
      ServiceInjectionValueMetaData sf = new ServiceInjectionValueMetaData(SUBJECT_FACTORY);
      attribute.setValue(sf);     
      attributes.add(attribute);

      attribute = new ServiceAttributeMetaData();
      attribute.setName("XAResourceRecoveryRegistry");
      ServiceInjectionValueMetaData xrrr = new ServiceInjectionValueMetaData(RECOVERY_MANAGER);
      attribute.setValue(xrrr);     
      attributes.add(attribute);

      return attributes;
   }
View Full Code Here

         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)
         {
            attribute = new ServiceAttributeMetaData();
            attribute.setName("WorkManager");
            attribute.setValue(new ServiceInjectionValueMetaData(workManagerName));
            attributes.add(attribute);
         }
         if (xaTerminatorName != null)
         {
            attribute = new ServiceAttributeMetaData();
            attribute.setName("XATerminator");
            attribute.setValue(new ServiceInjectionValueMetaData(xaTerminatorName, "XATerminator"));
            attributes.add(attribute);
         }
         if (attributes.isEmpty() == false)
            rarDeployment.setAttributes(attributes);
        
View Full Code Here

  
   @Override
   public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
   {
      List<ServiceAttributeMetaData> poolAttributes = new ArrayList<ServiceAttributeMetaData>();
      ServiceAttributeMetaData poolAttribute = null;

      poolAttribute = buildSimpleAttribute("PoolJndiName", md.getJndiName());
      poolAttributes.add(poolAttribute);
     
      poolAttribute = buildSimpleAttribute("MinSize", String.valueOf(md.getMinSize()));     
View Full Code Here

   @Override
   public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
   {
  
      List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
      ServiceAttributeMetaData attribute = null;
     
      attribute = buildDependencyAttribute("MetadataLibrary", "jboss.jdbc:service=metadata");
      attributes.add(attribute);
     
      String typeMapping = null;
View Full Code Here

  
   @Override
   public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
   {
      List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
      ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
     
      attribute = buildSimpleAttribute("JndiName", md.getJndiName());
      attributes.add(attribute);

      attribute = buildSimpleAttribute("UseJavaContext", String.valueOf(md.isUseJavaContext()));
View Full Code Here

      ejbModule.setConstructor(ctor);

      // set attributes
      List<ServiceAttributeMetaData> attrs = new ArrayList<ServiceAttributeMetaData>();
      // Transaction manager
      ServiceAttributeMetaData attr = new ServiceAttributeMetaData();
      attr.setName("TransactionManagerFactory");
      ServiceDependencyValueMetaData dependencyValue = new ServiceDependencyValueMetaData();
      dependencyValue.setDependency(getTransactionManagerServiceName());
      dependencyValue.setProxyType("attribute");
      attr.setValue(dependencyValue);
      attrs.add(attr);
      // Security management
      attr = new ServiceAttributeMetaData();
      attr.setName("SecurityManagement");
      ServiceInjectionValueMetaData injectionValue = new ServiceInjectionValueMetaData(securityManagementName);
      attr.setValue(injectionValue);
      attrs.add(attr);
      //Policy Registration
      attr = new ServiceAttributeMetaData();
      attr.setName("PolicyRegistration");
      ServiceInjectionValueMetaData prInjectionValue = new ServiceInjectionValueMetaData(policyRegistrationName);
      attr.setValue(prInjectionValue);
      attrs.add(attr);
      // Add injection of the WebServiceName
      String wsName = getWebServiceName();
      if (wsName != null)
      {
         ServiceAttributeMetaData ws = new ServiceAttributeMetaData();
         ws.setName("WebServiceName");
         ServiceDependencyValueMetaData wsDepends = new ServiceDependencyValueMetaData();
         wsDepends.setDependency(wsName);
         ws.setValue(wsDepends);
         attrs.add(ws);
      }
      // Injection of the TimerService
      ServiceAttributeMetaData tms = new ServiceAttributeMetaData();
      ServiceDependencyValueMetaData tmsDepends = new ServiceDependencyValueMetaData();
      tms.setName("TimerService");
      tmsDepends.setDependency(timerServiceName);
      tmsDepends.setProxyType("attribute");
      tms.setValue(tmsDepends);
      attrs.add(tms);

      ejbModule.setAttributes(attrs);

      List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
View Full Code Here

   {
      assertNotNull(metaData);
      List<ServiceAttributeMetaData> attributes = metaData.getAttributes();
      assertNotNull(attributes);
      assertEquals(1, attributes.size());
      ServiceAttributeMetaData attribute = attributes.get(0);
      assertAttributeName(attribute, name);
   }
View Full Code Here

TOP

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

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.