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

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


         switch (reader.nextTag())
         {
            case END_ELEMENT : {
               if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.RECOVERY)
               {
                  return new Recovery(security, plugin, noRecovery);
               }
               else
               {
                  if (Recovery.Tag.forName(reader.getLocalName()) == Recovery.Tag.UNKNOWN)
                  {
View Full Code Here


      Validation validationSettings = null;
      String urlDelimiter = null;
      String urlSelectorStrategyClassName = null;
      String newConnectionSql = null;
      CommonXaPool xaPool = null;
      Recovery recovery = null;

      String xaDataSourceClass = null;
      String driver = null;

      //attributes reading
View Full Code Here

      HashMap<String, String> configProperties = new HashMap<String, String>();
      CommonSecurity security = null;
      CommonTimeOut timeOut = null;
      CommonValidation validation = null;
      CommonPool pool = null;
      Recovery recovery = null;

      //attributes reading
      boolean useJavaContext = true;
      String className = null;
      boolean enabled = true;
View Full Code Here

      Validation validationSettings = null;
      String urlDelimiter = null;
      String urlSelectorStrategyClassName = null;
      String newConnectionSql = null;
      CommonXaPool xaPool = null;
      Recovery recovery = null;

      String xaDataSourceClass = null;
      String driver = null;

      //attributes reading
View Full Code Here

                setBooleanIfNotNull(condefModel, BACKGROUNDVALIDATION, conDef.getValidation().isBackgroundValidation());
                setBooleanIfNotNull(condefModel, USE_FAST_FAIL, conDef.getValidation().isUseFastFail());
            }

            if (conDef.getRecovery() != null) {
                final Recovery recovery = conDef.getRecovery();
                setStringIfNotNull(condefModel, RECOVERY_USERNAME, recovery.getCredential() != null ? recovery.getCredential()
                        .getUserName() : null);
                setStringIfNotNull(condefModel, RECOVERY_PASSWORD, recovery.getCredential() != null ? recovery.getCredential()
                        .getPassword() : null);
                setStringIfNotNull(condefModel, RECOVERY_SECURITY_DOMAIN, recovery.getCredential() != null ? recovery
                        .getCredential().getSecurityDomain() : null);
                setExtensionIfNotNull(condefModel, RECOVERLUGIN_CLASSNAME, RECOVERLUGIN_PROPERTIES, recovery.getRecoverPlugin());
                setBooleanIfNotNull(condefModel, NO_RECOVERY, recovery.getNoRecovery());
            }

            return condefModel;
        }
View Full Code Here

            setBooleanIfNotNull(xaDataSourceModel, USE_FAST_FAIL, validation.isUseFastFail());
            setBooleanIfNotNull(xaDataSourceModel, VALIDATEONMATCH, validation.isValidateOnMatch());
        }

        if (xaDataSource.getRecovery() != null) {
            final Recovery recovery = xaDataSource.getRecovery();
            setStringIfNotNull(xaDataSourceModel, RECOVERY_USERNAME, recovery.getCredential() != null ? recovery
                    .getCredential().getUserName() : null);
            setStringIfNotNull(xaDataSourceModel, RECOVERY_PASSWORD, recovery.getCredential() != null ? recovery
                    .getCredential().getPassword() : null);
            setStringIfNotNull(xaDataSourceModel, RECOVERY_SECURITY_DOMAIN, recovery.getCredential() != null ? recovery
                    .getCredential().getSecurityDomain() : null);
            setExtensionIfNotNull(xaDataSourceModel, RECOVERLUGIN_CLASSNAME, RECOVERLUGIN_PROPERTIES,
                    recovery.getRecoverPlugin());
            setBooleanIfNotNull(xaDataSourceModel, NO_RECOVERY, recovery.getNoRecovery());
        }
    }
View Full Code Here

        final Credential credential = new CredentialImpl(recoveryUsername, recoveryPassword, recoverySecurityDomain);

        final Extension recoverPlugin = extractExtension(dataSourceNode, RECOVERLUGIN_CLASSNAME, RECOVERLUGIN_PROPERTIES);
        final boolean noRecovery = getBooleanIfSetOrGetDefault(dataSourceNode, NO_RECOVERY, false);
        Recovery recovery = new Recovery(credential, recoverPlugin, noRecovery);
        return new XADataSourceImpl(transactionIsolation, timeOut, security, statement, validation, urlDelimiter,
                urlSelectorStrategyClassName, useJavaContext, poolName, enabled, jndiName, spy, useCcm, xaDataSourceProperty,
                xaDataSourceClass, module, newConnectionSql, xaPool, recovery);
    }
View Full Code Here

        //TODO This will be cleaned up once it uses attribute definitions
        String recoveryPassword = getResolvedStringIfSetOrGetDefault(context, operation, RECOVERY_PASSWORD.getName(), null);
        final String recoverySecurityDomain = getResolvedStringIfSetOrGetDefault(context, operation, RECOVERY_SECURITY_DOMAIN.getName(), null);
        Boolean noRecovery = getBooleanIfSetOrGetDefault(context, operation, NO_RECOVERY, null);

        Recovery recovery = null;
        if ((recoveryUsername != null && recoveryPassword != null) || recoverySecurityDomain != null || noRecovery != null) {
            Credential credential = null;

            if ((recoveryUsername != null && recoveryPassword != null) || recoverySecurityDomain != null)
                credential = new CredentialImpl(recoveryUsername, recoveryPassword, recoverySecurityDomain);

            Extension recoverPlugin = extractExtension(context, operation, RECOVERLUGIN_CLASSNAME.getName(), RECOVERLUGIN_PROPERTIES.getName());

            if (noRecovery == null)
                noRecovery = Boolean.FALSE;

            recovery = new Recovery(credential, recoverPlugin, noRecovery);
        }
        ModifiableConnDef connectionDefinition = new ModifiableConnDef(configProperties, className, jndiName, poolName,
                enabled, useJavaContext, useCcm, pool, timeOut, validation, security, recovery);

        return connectionDefinition;
View Full Code Here

    private static CommonConnDef createConnDef(String jndiName) throws ValidateException {
        CommonPoolImpl pool = new CommonPoolImpl(null, null, false, false, FlushStrategy.FAILING_CONNECTION_ONLY);
        CommonTimeOutImpl timeOut = new CommonTimeOutImpl(null, null, null, null, null);
        CommonSecurityImpl security = null;
        Recovery recovery = new Recovery(new CredentialImpl(null, null, null), null, Boolean.FALSE);
        CommonValidationImpl validation = new CommonValidationImpl(null, null, false);
        return new CommonConnDefImpl(Collections.<String, String>emptyMap(), RAMANAGED_CONN_FACTORY, jndiName, HQ_CONN_DEF, true, true, true, pool, timeOut, validation, security, recovery);
    }
View Full Code Here

         switch (reader.nextTag())
         {
            case END_ELEMENT : {
               if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.RECOVERY)
               {
                  return new Recovery(security, plugin, noRecovery);
               }
               else
               {
                  if (Recovery.Tag.forName(reader.getLocalName()) == Recovery.Tag.UNKNOWN)
                  {
View Full Code Here

TOP

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

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.