Package org.jboss.jca.common.validator

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


    */
   public ConnectorMetaData process(ConnectorMetaData md, AnnotationRepository annotationRepository)
      throws Exception
   {
      if (annotationRepository == null)
         throw new ValidateException("AnnotationRepository reference is null");
      /* Process
         -------
         javax.resource.spi.Activation
         javax.resource.spi.AdministeredObject
         javax.resource.spi.AuthenticationMechanism
View Full Code Here


         {
            // JBJCA-240
            if (md.getRa().getRaClass() == null || md.getRa().getRaClass().equals(""))
            {
               log.fatal("No @Connector was found and no definition in the ra.xml metadata either");
               throw new ValidateException("No @Connector defined");
            }
         }
         else
         {
            // JBJCA-240
            if (md.getRa().getRaClass() == null || md.getRa().getRaClass().equals(""))
            {
               log.fatal("More than one @Connector was found but the correct one " +
                         "wasn't defined in the ra.xml metadata");
               throw new ValidateException("More than one @Connector defined");
            }
         }
      }

      return md;
View Full Code Here

               log.trace("Processing: " + c);

            md = attachConnectionDefinitions(md , c, annotation.getClassName());
         }
         else
            throw new ValidateException("More than one @ConnectionDefinitions defined");
      }

      return md;
   }
View Full Code Here

      {
         RA10MetaData ra10 = ((JCA10DTDMetaData) cmd).getRa10();
         if (ra10 == null || ra10.getManagedConnectionFactoryClass() == null
               || ra10.getManagedConnectionFactoryClass().equals(""))
         {
            throw new ValidateException("ManagedConnectionFactoryClass should be defined");
         }
         return cmd;
      }
      //make sure all need metadata parsered and processed after annotation handle
      if (cmd.getRa() == null)
         throw new ValidateException("ResourceAdapter metadata should be defined");

      //make sure ra metadata contains inbound or outbound at least
      boolean inboundOrOutbound = false;
      if (validateOutbound(cmd.getRa().getOutboundRa()))
         inboundOrOutbound = true;
      if (validateInbound(cmd.getRa().getInboundRa()) && cmd.getRa().getRaClass() != null)
         inboundOrOutbound = true;
      if (!inboundOrOutbound)
         throw new ValidateException("ResourceAdapter metadata should contains inbound or outbound at least");
      return cmd;
   }
View Full Code Here

TOP

Related Classes of org.jboss.jca.common.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.