Package org.jboss.metadata.validation

Examples of org.jboss.metadata.validation.ValidationException


      String localHome = smd.getLocalHome();

      // If remote, need home
      if ((remote != null && remote.trim().length() > 0) && (home == null || home.trim().length() == 0))
      {
         throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x remote component interface of "
               + remote + " but has no home; " + errorMessageSuffix);
      }

      // If home, need remote
      if ((home != null && home.trim().length() > 0) && (remote == null || remote.trim().length() == 0))
      {
         throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x home interface of " + home
               + " but has no remote component interface; " + errorMessageSuffix);
      }

      // If local, need localHome
      if ((local != null && local.trim().length() > 0) && (localHome == null || localHome.trim().length() == 0))
      {
         throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x local component interface of "
               + local + " but has no localHome; " + errorMessageSuffix);
      }

      // If localHome, need local
      if ((localHome != null && localHome.trim().length() > 0) && (local == null || local.trim().length() == 0))
      {
         throw new ValidationException("EJB " + smd.getName() + " has defined EJB2.x local home interface of "
               + localHome + " but has no local component interface; " + errorMessageSuffix);
      }

      // Log OK
      log.trace("Passed validation for " + errorCode);
View Full Code Here


      {
         // If there aren't any business remote interfaces
         if (businessRemotes == null || businessRemotes.size() == 0)
         {
            // Fail
            throw new ValidationException("An @" + RemoteBinding.class.getSimpleName() + " was defined on EJB "
                  + smd.getName() + ", but this bean has no remote business interfaces defined. [" + errorCode + "]");
         }
      }

      // Log OK
View Full Code Here

      if(smd.getLocalBindings() != null && ! smd.getLocalBindings().isEmpty())
      {
         if(smd.getBusinessLocals() == null || smd.getBusinessLocals().isEmpty())
         {
            // Fail
            throw new ValidationException("A @" + LocalBinding.class.getSimpleName() + " was defined on EJB "
                  + smd.getName() + ", but this bean has no local business interfaces defined. [" + errorCode + "]");
         }
      }
   }
View Full Code Here

         throw new RuntimeException("Error loading bean class " + smd.getEjbClass());
      }

      // There was no local, remote, localhome or remotehome found
      // let's throw an validation error
      throw new ValidationException(ErrorCodes.ERROR_CODE_JBMETA201 + " - Bean class " + smd.getEjbClass()
            + " for bean " + smd.getEjbName()
            + " has no local, webservice endpointInterface or remote interfaces defined and does not implement at least one business interface");

   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.validation.ValidationException

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.