Package org.jboss.jca.common.api.validator

Examples of org.jboss.jca.common.api.validator.ValidateException


   @Override
   public void validate() throws ValidateException
   {
      if (this.driverClass != null && (this.connectionUrl == null || this.connectionUrl.trim().length() == 0))
         throw new ValidateException(bundle.requiredElementMissing(Tag.CONNECTION_URL.getLocalName(),
                                                                   this.getClass().getCanonicalName()));
     
      if ((this.driverClass == null || this.driverClass.trim().length() == 0) &&
          (this.dataSourceClass == null || this.dataSourceClass.trim().length() == 0) &&
          (this.driver == null || this.driver.trim().length() == 0))
         throw new ValidateException(bundle.requiredElementMissing(Tag.DRIVER_CLASS.getLocalName(),
                                                                   this.getClass().getCanonicalName()));
   }
View Full Code Here


      if (this.getManagedConnectionFactoryClass() == null ||
          this.getManagedConnectionFactoryClass().getValue() == null ||
          this.getManagedConnectionFactoryClass().getValue().trim().equals(""))
      {

         throw new ValidateException(bundle.missingValue("managed-connection-factory-class"));
      }

   }
View Full Code Here

   @Override
   public void validate() throws ValidateException
   {
      if (this.name == null || this.name.trim().length() == 0)
         throw new ValidateException(bundle.requiredAttributeMissing(Attribute.NAME.getLocalName(),
                                                                     this.getClass().getCanonicalName()));

   }
View Full Code Here

   @Override
   public void validate() throws ValidateException
   {
      if (this.xaDataSourceClass == null || this.xaDataSourceClass.trim().length() == 0)
         throw new ValidateException("xaDataSourceClass (xml tag " + Tag.XADATASOURCECLASS + ") is required");
      if (this.xaDataSourceProperty.isEmpty())
         throw new ValidateException("at least one xaDataSourceProperty (xml tag " + Tag.XADATASOURCEPROPERTY +
                                     ") is required ");

   }
View Full Code Here

   @Override
   public void validate() throws ValidateException
   {
      if (this.connectionUrl == null || this.connectionUrl.trim().length() == 0)
         throw new ValidateException("connectionUrl (xml tag " + Tag.CONNECTIONURL + ") is required in " +
                                     this.getClass().getCanonicalName());
      if (this.driverClass == null || this.driverClass.trim().length() == 0)
         throw new ValidateException("driverClass (xml tag " + Tag.DRIVERCLASS + ") is required in " +
                                     this.getClass().getCanonicalName());

   }
View Full Code Here

   public Connector process(AnnotationRepository annotationRepository, String xmlResourceAdapterClass,
                            ClassLoader classLoader)
      throws Exception
   {
      if (annotationRepository == null)
         throw new ValidateException(bundle.annotationRepositoryNull());
      /* Process
         -------
         javax.resource.spi.Activation
         javax.resource.spi.AdministeredObject
         javax.resource.spi.AuthenticationMechanism
View Full Code Here

         {
            // JBJCA-240
            if (xmlResourceAdapterClass == null || xmlResourceAdapterClass.equals(""))
            {
               log.noConnector();
               throw new ValidateException(bundle.noConnectorDefined());
            }
         }
         else
         {
            // JBJCA-240
            if (xmlResourceAdapterClass == null || xmlResourceAdapterClass.equals(""))
            {
               log.moreThanOneConnector();
               throw new ValidateException(bundle.moreThanOneConnectorDefined());
            }
         }
      }
      else
      {
View Full Code Here

            return attachConnectionDefinitions(connectionDefinitionsAnnotation, annotation.getClassName(),
                  configProperties);
         }
         else
            throw new ValidateException(bundle.moreThanOneConnectionDefinitionsDefined());
      }
      return null;

   }
View Full Code Here

   {
      if (securityDomainManaged != null && !securityDomainManaged.trim().equals(""))
      {
         if (securityDomainAndApplicationManaged != null && !securityDomainAndApplicationManaged.trim().equals(""))
         {
            throw new ValidateException(bundle.invalidSecurityConfiguration());
         }
         if (applicationManaged)
         {
            throw new ValidateException(bundle.invalidSecurityConfiguration());
         }
      }
      else
      {
         if (securityDomainAndApplicationManaged != null && !securityDomainAndApplicationManaged.trim().equals(""))
         {
            if (applicationManaged)
            {
               throw new ValidateException(bundle.invalidSecurityConfiguration());
            }
         }
         else
         {
            if (!applicationManaged)
            {
               throw new ValidateException(bundle.invalidSecurityConfiguration());
            }
         }
      }
   }
View Full Code Here


   private void partialCommonValidate() throws ValidateException
   {
      if (this.allocationRetry != null && this.allocationRetry < 0)
         throw new ValidateException(bundle.invalidNegative(Tag.ALLOCATIONRETRY.getLocalName()));

      if (this.blockingTimeoutMillis != null && this.blockingTimeoutMillis < 0)
         throw new ValidateException(bundle.invalidNegative(Tag.BLOCKINGTIMEOUTMILLIS.getLocalName()));

      if (this.allocationRetryWaitMillis != null && this.allocationRetryWaitMillis < 0)
         throw new ValidateException(bundle.invalidNegative(Tag.ALLOCATIONRETRYWAITMILLIS.getLocalName()));

      if (this.idleTimeoutMinutes != null && this.idleTimeoutMinutes < 0)
         throw new ValidateException(bundle.invalidNegative(Tag.IDLETIMEOUTMINUTES.getLocalName()));

      if (this.xaResourceTimeout != null && this.xaResourceTimeout < 0)
         throw new ValidateException(bundle.invalidNegative(Tag.XARESOURCETIMEOUT.getLocalName()));
   }
View Full Code Here

TOP

Related Classes of org.jboss.jca.common.api.validator.ValidateException

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.