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

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


   @Override
   public void validate() throws ValidateException
   {
      if (this.preparedStatementsCacheSize != null && this.preparedStatementsCacheSize < 0)
         throw new ValidateException(bundle.invalidNegative(Tag.PREPAREDSTATEMENTCACHESIZE.getLocalName()));
   }
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.queryTimeout != null && this.queryTimeout < 0)
         throw new ValidateException(bundle.invalidNegative(TimeOut.Tag.QUERYTIMEOUT.getLocalName()));

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

   @Override
   public void validate() throws ValidateException
   {
      if ((this.xaDataSourceClass == null || this.xaDataSourceClass.trim().length() == 0) &&
          (this.driver == null || this.driver.trim().length() == 0))
         throw new ValidateException(bundle.requiredElementMissing(Tag.XADATASOURCECLASS.getLocalName(),
                                                                   this.getClass().getCanonicalName()));

      if (this.xaDataSourceProperty.isEmpty())
         throw new ValidateException(bundle.requiredElementMissing(Tag.XADATASOURCEPROPERTY.getLocalName(),
                                                                   this.getClass().getCanonicalName()));
   }
View Full Code Here

   @Override
   public void validate() throws ValidateException
   {
      if (this.backgroundValidationMinutes != null && this.backgroundValidationMinutes < 0)
         throw new ValidateException(bundle.invalidNegative(Validation.Tag.BACKGROUNDVALIDATIONMINUTES.getLocalName()));

      if (this.validConnectionChecker != null)
         try
         {
            this.validConnectionChecker.validate();
         }
         catch (ValidateException ve)
         {
            throw new ValidateException(bundle.invalidTag(Validation.Tag.VALIDCONNECTIONCHECKER.getLocalName()), ve);
         }
      if (this.exceptionSorter != null)
         try
         {
            this.exceptionSorter.validate();
         }
         catch (ValidateException ve)
         {
            throw new ValidateException(bundle.invalidTag(Validation.Tag.EXCEPTIONSORTER.getLocalName()), ve);
         }
      if (this.staleConnectionChecker != null)
         try
         {
            this.staleConnectionChecker.validate();
         }
         catch (ValidateException ve)
         {
            throw new ValidateException(bundle.invalidTag(Validation.Tag.STALECONNECTIONCHECKER.getLocalName()), ve);
         }
   }
View Full Code Here

   @Override
   public void validate() throws ValidateException
   {
      if (this.connectionUrl == null || this.connectionUrl.trim().length() == 0)
         throw new ValidateException(bundle.requiredElementMissing(Tag.CONNECTIONURL.getLocalName(),
                                                                   this.getClass().getCanonicalName()));

      if ((this.driverClass == null || this.driverClass.trim().length() == 0) &&
          (this.driver == null || this.driver.trim().length() == 0))
         throw new ValidateException(bundle.requiredElementMissing(Tag.DRIVERCLASS.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.maxPoolSize != null && this.maxPoolSize < 0)
         throw new ValidateException(bundle.invalidNegative(Tag.MAXPOOLSIZE.getLocalName()));

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

      if (this.flushStrategy == null)
         throw new ValidateException(bundle.nullValue(Tag.FLUSH_STRATEGY.getLocalName()));
   }
View Full Code Here

   {
      ResourceAdapter ra = this.getResourceadapter();

      //make sure all need metadata parsered and processed after annotation handle
      if (ra == null)
         throw new ValidateException(bundle.noMetadataForResourceAdapter());

      //make sure ra metadata contains inbound or outbound at least
      ra.validate();

   }
View Full Code Here

      if (this.getInboundResourceadapter() != null && this.getInboundResourceadapter().validationAsBoolean() &&
          this.getResourceadapterClass() != null)
         inboundOrOutbound = true;

      if (!inboundOrOutbound)
         throw new ValidateException(bundle.invalidMetadataForResourceAdapter());
   }
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.