예제 #1
0
  // @Override
  public void initialise() throws InitialisationException {
    format = new SimpleDateFormat(HttpConstants.DATE_FORMAT, Locale.US);

    // When running with the source code, Meta information is not set
    // so product name and version are not available, hence we hard code
    if (MuleManifest.getProductName() == null) {
      server = "Mule/SNAPSHOT";
    } else {
      server = MuleManifest.getProductName() + "/" + MuleManifest.getProductVersion();
    }
  }
 @Override
 public void initialise() throws InitialisationException {
   Logger log = LoggerFactory.getLogger(GrefConnectorLifecycleInjectionAdapter.class);
   MuleVersion connectorVersion = new MuleVersion("3.5.0");
   MuleVersion muleVersion = new MuleVersion(MuleManifest.getProductVersion());
   if (!muleVersion.atLeastBase(connectorVersion)) {
     throw new InitialisationException(
         CoreMessages.minMuleVersionNotMet(this.getMinMuleVersion()), this);
   }
 }
 private BeanDefinitionBuilder getBeanDefinitionBuilder(ParserContext parserContext) {
   try {
     return BeanDefinitionBuilder.rootBeanDefinition(
         GetEstimatedPriceMessageProcessor.class.getName());
   } catch (NoClassDefFoundError noClassDefFoundError) {
     String muleVersion = "";
     try {
       muleVersion = MuleManifest.getProductVersion();
     } catch (Exception _x) {
       logger.error("Problem while reading mule version");
     }
     logger.error(
         ("Cannot launch the mule app, the @Processor [get-estimated-price] within the connector [uber] is not supported in mule "
             + muleVersion));
     throw new BeanDefinitionParsingException(
         new Problem(
             ("Cannot launch the mule app, the @Processor [get-estimated-price] within the connector [uber] is not supported in mule "
                 + muleVersion),
             new Location(parserContext.getReaderContext().getResource()),
             null,
             noClassDefFoundError));
   }
 }