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

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


   @Override
   public void validate() throws ValidateException
   {
      if (this.className == null || className.trim().length() == 0)
         throw new ValidateException("className (xml attribute " + Attribute.CLASS_NAME + ") is required in " +
                                     this.getClass().getCanonicalName());
   }
View Full Code Here


    * @throws ValidateException ValidateException
    */
   protected void partialCommonValidation() throws ValidateException
   {
      if (this.jndiName == null)
         throw new ValidateException(bundle.requiredAttributeMissing(DataSource.Attribute.JNDINAME.getLocalName(),
                                                                     this.getClass().getCanonicalName()));
      if (this.poolName == null)
         throw new ValidateException(bundle.requiredAttributeMissing(DataSource.Attribute.POOL_NAME.getLocalName(),
                                                                     this.getClass().getCanonicalName()));

      if (this.timeOut != null)
         this.timeOut.validate();
      if (this.security != null)
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

   @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.XA_DATASOURCE_CLASS.getLocalName(),
                                                                   this.getClass().getCanonicalName()));

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

   @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

   @Override
   public void validate() throws ValidateException
   {
      if (this.className == null || className.trim().length() == 0)
         throw new ValidateException("className (xml attribute " + Attribute.CLASS_NAME + ") is required in " +
                                     this.getClass().getCanonicalName());
   }
View Full Code Here

   @Override
   public void validate() throws ValidateException
   {
      if (this.className == null || className.trim().length() == 0)
         throw new ValidateException("className (xml attribute " + Attribute.CLASS_NAME + ") is required in " +
                                     this.getClass().getCanonicalName());
   }
View Full Code Here

    }

    @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

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.