Package org.jboss.jca.common.api.metadata.common

Examples of org.jboss.jca.common.api.metadata.common.TransactionSupportEnum


   private OutboundResourceAdapter parseOutboundResourceadapter(XMLStreamReader reader) throws XMLStreamException,
         ParserException
   {
      Boolean reauthenticationSupport = null;
      TransactionSupportEnum transactionSupport = null;
      ArrayList<ConnectionDefinition> connectionDefinition = new ArrayList<ConnectionDefinition>();
      ArrayList<AuthenticationMechanism> authenticationMechanism = new ArrayList<AuthenticationMechanism>();
      //getting attributes
      String id = reader.getAttributeValue(null, OutboundResourceAdapter.Attribute.ID.getLocalName());
      String tsId = null;
View Full Code Here


      Boolean backgroundValidation = Defaults.BACKGROUND_VALIDATION;
      Long backgroundValidationMillis = null;
      Boolean useFastFail = Defaults.USE_FAST_FAIL;
     
      TransactionSupportEnum transactionSupport = TransactionSupportEnum.LocalTransaction;
      Boolean noTxSeparatePool = Defaults.NO_TX_SEPARATE_POOL;
      Boolean interleaving = Defaults.INTERLEAVING;

      String securityDomainManaged = "";
      String securityDomainAndApplicationManaged = "";
View Full Code Here

         else
            out.println("No");
        
         String classname = "";
         Map<String, String> raConfigProperties = null;
         TransactionSupportEnum transSupport = TransactionSupportEnum.NoTransaction;
         List<CommonAdminObject> adminObjects = null;
         List<CommonConnDef> connDefs = null;

         CommonSecurityImpl secImpl = new CommonSecurityImpl("", "", true);
         CommonPoolImpl poolImpl = new CommonPoolImpl(0, 10, Defaults.PREFILL, Defaults.USE_STRICT_MIN,
               Defaults.FLUSH_STRATEGY);
         CommonXaPoolImpl xaPoolImpl = new CommonXaPoolImpl(0, 10, Defaults.PREFILL, Defaults.USE_STRICT_MIN,
               Defaults.FLUSH_STRATEGY, Defaults.IS_SAME_RM_OVERRIDE, Defaults.INTERLEAVING,
               Defaults.PAD_XID, Defaults.WRAP_XA_RESOURCE, Defaults.NO_TX_SEPARATE_POOL);

         if (connector.getVersion() != Version.V_10)
         {
            ResourceAdapter1516 ra1516 = (ResourceAdapter1516)ra;
            if (ra1516.getResourceadapterClass() != null && !ra1516.getResourceadapterClass().equals(""))
            {
               out.println();
               out.println("Resource-adapter:");
               out.println("-----------------");
               out.println("Class: " + ra1516.getResourceadapterClass());
            }
           
            Map<String, String> introspected =
               getIntrospectedProperties(ra1516.getResourceadapterClass(), rarFile, cps);

            if (ra1516.getConfigProperties() != null)
            {
               raConfigProperties = new HashMap<String, String>();
               for (ConfigProperty cp : ra1516.getConfigProperties())
               {
                  raConfigProperties.put(cp.getConfigPropertyName().toString(),
                        getValueString(cp.getConfigPropertyValue()));

                  removeIntrospectedValue(introspected, cp.getConfigPropertyName().toString());

                  out.println("  Config-property: " + cp.getConfigPropertyName() + " (" +
                        cp.getConfigPropertyType() + ")");
               }
            }

            if (!introspected.isEmpty())
            {
               for (Map.Entry<String, String> entry : introspected.entrySet())
               {
                  out.println("  Introspected Config-property: " + entry.getKey() + " (" +
                              entry.getValue() + ")");
               }
            }
           
            int line = 0;
            Set<String> sameClassnameSet = new HashSet<String>();
            boolean needPrint = true;

            if (ra1516.getOutboundResourceadapter() != null)
            {
               out.println();
               out.println("Managed-connection-factory:");
               out.println("---------------------------");
              
               if (ra1516.getOutboundResourceadapter().getConnectionDefinitions() != null)
                  connDefs = new ArrayList<CommonConnDef>();
              
               transSupport = ra1516.getOutboundResourceadapter().getTransactionSupport();
               for (ConnectionDefinition mcf : ra1516.getOutboundResourceadapter().getConnectionDefinitions())
               {
                  classname = mcf.getManagedConnectionFactoryClass().toString();
                  if (!sameClassnameSet.contains(classname))
                  {
                     sameClassnameSet.add(classname);
                     if (line != 0)
                     {
                        out.println();
                     }
                     line++;
                     out.println("Class: " + classname);
                     needPrint = true;
                  }
                  else
                  {
                     needPrint = false;
                  }
                 
                  Map<String, String> configProperty = null;
                  if (mcf.getConfigProperties() != null)
                     configProperty = new HashMap<String, String>();

                  introspected = getIntrospectedProperties(classname, rarFile, cps);

                  for (ConfigProperty cp : mcf.getConfigProperties())
                  {
                     configProperty.put(cp.getConfigPropertyName().toString(),
                           getValueString(cp.getConfigPropertyValue()));

                     removeIntrospectedValue(introspected, cp.getConfigPropertyName().toString());

                     if (needPrint)
                        out.println("  Config-property: " + cp.getConfigPropertyName() + " (" +
                           cp.getConfigPropertyType() + ")");
                  }

                  if (!introspected.isEmpty())
                  {
                     for (Map.Entry<String, String> entry : introspected.entrySet())
                     {
                        if (needPrint)
                           out.println("  Introspected Config-property: " + entry.getKey() + " (" +
                                    entry.getValue() + ")");
                     }
                  }

                  String poolName = mcf.getConnectionInterface().toString().substring(
                        mcf.getConnectionInterface().toString().lastIndexOf('.') + 1);
                  CommonPool pool = null;
                  if (transSupport.equals(TransactionSupportEnum.XATransaction))
                  {
                     pool = xaPoolImpl;
                  }
                  else
                  {
                     pool = poolImpl;
                  }
                  CommonConnDefImpl connImpl = new CommonConnDefImpl(configProperty, classname,
                                                                     "java:jboss/eis/" + poolName, poolName,
                                                                     Defaults.ENABLED, Defaults.USE_JAVA_CONTEXT,
                                                                     Defaults.USE_CCM, Defaults.SHARABLE,
                                                                     pool, null, null, secImpl, null);
                  connDefs.add(connImpl);
               }

            }

            line = 0;
            sameClassnameSet.clear();

            if (ra1516.getAdminObjects() != null && ra1516.getAdminObjects().size() > 0)
            {
               out.println();
               out.println("Admin-object:");
               out.println("-------------");
               adminObjects = new ArrayList<CommonAdminObject>();
            }
            for (AdminObject ao : ra1516.getAdminObjects())
            {
               String aoClassname = ao.getAdminobjectClass().toString();
               if (!sameClassnameSet.contains(aoClassname))
               {
                  sameClassnameSet.add(aoClassname);
                  if (line != 0)
                  {
                     out.println();
                  }
                  line++;
                  out.println("Class: " + aoClassname);
                  needPrint = true;
               }
               else
               {
                  needPrint = false;
               }

               String poolName = aoClassname.substring(aoClassname.lastIndexOf('.') + 1);
               Map<String, String> configProperty = null;
               if (ao.getConfigProperties() != null)
                  configProperty = new HashMap<String, String>();
              
               introspected = getIntrospectedProperties(aoClassname, rarFile, cps);

               for (ConfigProperty cp : ao.getConfigProperties())
               {
                  configProperty.put(cp.getConfigPropertyName().toString(),
                        getValueString(cp.getConfigPropertyValue()));

                  removeIntrospectedValue(introspected, cp.getConfigPropertyName().toString());

                  if (needPrint)
                     out.println("  Config-property: " + cp.getConfigPropertyName() + " (" +
                        cp.getConfigPropertyType() + ")");
               }

               if (!introspected.isEmpty())
               {
                  for (Map.Entry<String, String> entry : introspected.entrySet())
                  {
                     if (needPrint)
                        out.println("  Introspected Config-property: " + entry.getKey() + " (" +
                                 entry.getValue() + ")");
                  }
               }

               CommonAdminObjectImpl aoImpl = new CommonAdminObjectImpl(configProperty, aoClassname,
                     "java:jboss/eis/ao/" + poolName, poolName, Defaults.ENABLED, Defaults.USE_JAVA_CONTEXT);
               adminObjects.add(aoImpl);
            }
           
            line = 0;
            sameClassnameSet.clear();

            if (ra1516.getInboundResourceadapter() != null &&
               ra1516.getInboundResourceadapter().getMessageadapter() != null)
            {
               out.println();
               out.println("Activation-spec:");
               out.println("----------------");
               for (MessageListener ml :
                  ra1516.getInboundResourceadapter().getMessageadapter().getMessagelisteners())
               {
                  String asClassname = ml.getActivationspec().getActivationspecClass().toString();
                  if (!sameClassnameSet.contains(asClassname))
                  {
                     sameClassnameSet.add(asClassname);
                     if (line != 0)
                     {
                        out.println();
                     }
                     line++;
                     out.println("Class: " + asClassname);

                     introspected = getIntrospectedProperties(asClassname, rarFile, cps);

                     if (ml.getActivationspec() != null &&
                         ml.getActivationspec().getRequiredConfigProperties() != null)
                     {
                        for (RequiredConfigProperty cp :  ml.getActivationspec().getRequiredConfigProperties())
                        {
                           removeIntrospectedValue(introspected, cp.getConfigPropertyName().toString());
                       
                           out.println("  Required-config-property: " + cp.getConfigPropertyName());
                        }
                     }

                     if (!introspected.isEmpty())
                     {
                        for (Map.Entry<String, String> entry : introspected.entrySet())
                        {
                           out.println("  Introspected Config-property: " + entry.getKey() + " (" +
                                       entry.getValue() + ")");
                        }
                     }
                  }
               }
            }
         }
         else
         {
            out.println("Managed-connection-factory:");
            out.println("---------------------------");

            ResourceAdapter10 ra10 = (ResourceAdapter10)ra;
            out.println("Class: " + ra10.getManagedConnectionFactoryClass());
           
            classname = ra10.getManagedConnectionFactoryClass().toString();
            transSupport = ra10.getTransactionSupport();
           
            Map<String, String> configProperty = null;
            if (ra10.getConfigProperties() != null)
               configProperty = new HashMap<String, String>();

            Map<String, String> introspected =
               getIntrospectedProperties(classname, rarFile, cps);

            for (ConfigProperty cp : ra10.getConfigProperties())
            {
               configProperty.put(cp.getConfigPropertyName().toString(),
                     getValueString(cp.getConfigPropertyValue()));

               removeIntrospectedValue(introspected, cp.getConfigPropertyName().toString());

               out.println("  Config-property: " + cp.getConfigPropertyName() + " (" +
                     cp.getConfigPropertyType() + ")");
            }
           
            if (!introspected.isEmpty())
            {
               for (Map.Entry<String, String> entry : introspected.entrySet())
               {
                  out.println("  Introspected Config-property: " + entry.getKey() + " (" +
                              entry.getValue() + ")");
               }
            }

            String poolName = classname.substring(classname.lastIndexOf('.') + 1);
            CommonPool pool = null;
            if (transSupport.equals(TransactionSupportEnum.XATransaction))
            {
               pool = xaPoolImpl;
            }
            else
            {
View Full Code Here

//            for (ModelNode property : operation.get(CONFIG_PROPERTIES.getName()).asList()) {
//                configProperties.put(property.asProperty().getName(), property.asProperty().getValue().asString());
//            }
//        }
        String archive = getStringIfSetOrGetDefault(operation, ARCHIVE.getName(), null);
        TransactionSupportEnum transactionSupport = operation.hasDefined(TRANSACTIONSUPPORT.getName()) ? TransactionSupportEnum
                .valueOf(operation.get(TRANSACTIONSUPPORT.getName()).asString()) : null;
        String bootstrapContext = getStringIfSetOrGetDefault(operation, BOOTSTRAPCONTEXT.getName(), null);
        List<String> beanValidationGroups = null;
        if (operation.hasDefined(BEANVALIDATIONGROUPS.getName())) {
            beanValidationGroups = new ArrayList<String>(operation.get(BEANVALIDATIONGROUPS.getName()).asList().size());
View Full Code Here

                streamWriter.writeEndElement();
            }

            TRANSACTIONSUPPORT.marshallAsElement(ra, streamWriter);
            writeNewConfigProperties(streamWriter, ra);
            TransactionSupportEnum transactionSupport = ra.hasDefined(TRANSACTIONSUPPORT.getName()) ? TransactionSupportEnum
                .valueOf(ra.get(TRANSACTIONSUPPORT.getName()).asString()) : null;
            boolean isXa = false;
            if (transactionSupport == TransactionSupportEnum.XATransaction) {
                isXa = true;
            }
View Full Code Here

      XsdString managedConnectionFactoryClass = NULL_XSDSTRING;
      XsdString connectionFactoryInterface = NULL_XSDSTRING;
      XsdString connectionFactoryImplClass = NULL_XSDSTRING;
      XsdString connectionInterface = NULL_XSDSTRING;
      XsdString connectionImplClass = NULL_XSDSTRING;
      TransactionSupportEnum transactionSupport = null;
      ArrayList<AuthenticationMechanism> authenticationMechanism = new ArrayList<AuthenticationMechanism>();
      ArrayList<ConfigProperty> configProperties = new ArrayList<ConfigProperty>();
      Boolean reauthenticationSupport = null;
      ArrayList<SecurityPermission> securityPermission = new ArrayList<SecurityPermission>();
      String id = reader.getAttributeValue(null, ResourceAdapter1516.Attribute.ID.getLocalName());
View Full Code Here

   private OutboundResourceAdapter parseOutboundResourceadapter(XMLStreamReader reader) throws XMLStreamException,
      ParserException
   {
      Boolean reauthenticationSupport = null;
      TransactionSupportEnum transactionSupport = null;
      ArrayList<ConnectionDefinition> connectionDefinition = new ArrayList<ConnectionDefinition>();
      ArrayList<AuthenticationMechanism> authenticationMechanism = new ArrayList<AuthenticationMechanism>();
      //getting attributes
      String id = reader.getAttributeValue(null, OutboundResourceAdapter.Attribute.ID.getLocalName());
View Full Code Here

      XsdString managedConnectionFactoryClass = NULL_XSDSTRING;
      XsdString connectionFactoryInterface = NULL_XSDSTRING;
      XsdString connectionFactoryImplClass = NULL_XSDSTRING;
      XsdString connectionInterface = NULL_XSDSTRING;
      XsdString connectionImplClass = NULL_XSDSTRING;
      TransactionSupportEnum transactionSupport = null;
      ArrayList<AuthenticationMechanism> authenticationMechanism = new ArrayList<AuthenticationMechanism>();
      ArrayList<ConfigProperty> configProperties = new ArrayList<ConfigProperty>();
      Boolean reauthenticationSupport = null;
      ArrayList<SecurityPermission> securityPermission = new ArrayList<SecurityPermission>();
      String id = reader.getAttributeValue(null, ResourceAdapter1516.Attribute.ID.getLocalName());
View Full Code Here

   private OutboundResourceAdapter parseOutboundResourceadapter(XMLStreamReader reader) throws XMLStreamException,
         ParserException
   {
      Boolean reauthenticationSupport = null;
      TransactionSupportEnum transactionSupport = null;
      ArrayList<ConnectionDefinition> connectionDefinition = new ArrayList<ConnectionDefinition>();
      ArrayList<AuthenticationMechanism> authenticationMechanism = new ArrayList<AuthenticationMechanism>();
      //getting attributes
      String id = reader.getAttributeValue(null, OutboundResourceAdapter.Attribute.ID.getLocalName());
      String tsId = null;
View Full Code Here

      XsdString eisType = null;
      LicenseType license = null;
      List<LocalizedXsdString> displayNames = null;
      List<Icon> icons = null;
      List<AdminObject> adminobjects = null;
      TransactionSupportEnum transactionSupport = null;

      if (connector.getVersion() == Version.V_10)
      {
         if (raConfigProperties != null)
         {
View Full Code Here

TOP

Related Classes of org.jboss.jca.common.api.metadata.common.TransactionSupportEnum

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.