Package org.apache.activemq.camel.component

Examples of org.apache.activemq.camel.component.ActiveMQComponent


        // the admin events will be sent by the DuccServiceReaper
        targetEndpoint = System.getProperty("ducc.admin.endpoint");
        System.out.println("+++ Activating JMS Component for Endpoint:"
            + targetEndpoint + " Broker:" + brokerUrl);
       
        ActiveMQComponent duccAMQComponent = new ActiveMQComponent(context);
          duccAMQComponent.setBrokerURL(brokerUrl);
       
//        context.addComponent("activemq",
//            ActiveMQComponent.activeMQComponent(brokerUrl));
         
          if ( brokerCredentialsFile != null && brokerCredentialsFile.length() > 0 ) {
            String path ="";
            try {
                Utils.findDuccHome()// add DUCC_HOME to System.properties
                path = Utils.resolvePlaceholderIfExists(brokerCredentialsFile, System.getProperties());
                Credentials credentials = BrokerCredentials.get(path);
              if ( credentials.getUsername() != null && credentials.getPassword() != null ) {
              duccAMQComponent.setUserName(credentials.getUsername());
              duccAMQComponent.setPassword(credentials.getPassword());
               }  
            } catch(FileNotFoundException e) {
            System.out.println("DuccAdmin Failed - File Not Found:"+path+" Broker Credentials File:"+brokerCredentialsFile);
            System.exit(-1);
            }
View Full Code Here


          for (Route route : routes) {
            route.getConsumer().stop();
            route.getEndpoint().stop();
          }

          ActiveMQComponent amqc = (ActiveMQComponent) context.getComponent("activemq");
          amqc.stop();
          amqc.shutdown();

          if (logger == null) {
            System.out.println("Stopping Camel Context");
          } else {
            logger.info("stop", null, "Stopping Camel Context");
View Full Code Here

  public void configureJMSTransport(DuccLogger logger, String endpoint, CamelContext context) throws Exception {
    BrokerCredentials.Credentials credentials = null;
    synchronized(ActiveMQComponent.class) {
      if ( duccAMQComponent == null ) {
//        duccAMQComponent = ActiveMQComponent.activeMQComponent(brokerUrl);
        duccAMQComponent = new ActiveMQComponent(context);
        duccAMQComponent.setBrokerURL(brokerUrl);
       
        logger.info("configureJMSTransport", null, "brokerCredentialsFile:"+brokerCredentialsFile);
        if ( brokerCredentialsFile != null ) {
          String path = Utils.resolvePlaceholderIfExists(brokerCredentialsFile, System.getProperties());
View Full Code Here

  }
  public void configureJMSTransport( String endpoint, CamelContext context) throws Exception {
    BrokerCredentials.Credentials credentials = null;
    synchronized(ActiveMQComponent.class) {
      if ( duccAMQComponent == null ) {
          duccAMQComponent = new ActiveMQComponent(context);
          duccAMQComponent.setBrokerURL(brokerUrl);

//        duccAMQComponent = ActiveMQComponent.activeMQComponent(brokerUrl);
        if ( brokerCredentialsFile != null ) {
          String path = Utils.resolvePlaceholderIfExists(brokerCredentialsFile, System.getProperties());
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    @Override
    protected Context createJndiContext() throws Exception {
        JndiContext answer = new JndiContext();

        // add ActiveMQ with embedded broker
        ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
        amq.setCamelContext(context);
        answer.bind("jms", amq);
        return answer;
    }
View Full Code Here

    public static String getDefaultEndpointUri() {
        return "activemq:" + CamelJmxConnectorSupport.DEFAULT_DESTINATION_PREFIX;
    }

    public static void configureActiveMQComponent(CamelContext camelContext, String brokerUrl) {
        ActiveMQComponent activemqComponent = camelContext.getComponent("activemq", ActiveMQComponent.class);
        activemqComponent.setBrokerURL(brokerUrl);
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.camel.component.ActiveMQComponent

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.