Examples of ActiveMQConnectionFactory


Examples of org.apache.activemq.ActiveMQConnectionFactory

    protected void setUp()
        throws Exception
    {
        super.setUp();

        factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");

        transport = (JMSTransport) new JMSTransport(getXFire(), getConnectionFactory());
       
        getXFire().getTransportManager().register(transport);
    }
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

  public void run() {
    // Connection connection = null;
    ActiveMQConnection connection = null;
    try {
      // Create the connection.
      ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
      connection = (ActiveMQConnection) connectionFactory.createConnection();
      connection.start();
      // Create the session
      Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
      if (topic) {
        destination = session.createTopic(subject);
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

  }

  public void run() {
    try {
      running = true;
      ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
      connection = (ActiveMQConnection) connectionFactory.createConnection();
      if (durable && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
        connection.setClientID(clientId);
      }
//      connection.setExceptionListener(this);
      connection.start();
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    public void run() {
        try {
            running = true;

            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
            Connection connection = connectionFactory.createConnection();
            if (durable && clientId != null && clientId.length() > 0 && !"null".equals(clientId)) {
                connection.setClientID(clientId);
            }
            connection.setExceptionListener(this);
            connection.start();
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    public void run() {
//        Connection connection = null;
      ActiveMQConnection  connection = null;
        try {
            // Create the connection.
            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, url);
            connection = (ActiveMQConnection) connectionFactory.createConnection();
            connection.start();

            // Create the session
            Session session = connection.createSession(transacted, Session.AUTO_ACKNOWLEDGE);
            if (topic) {
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    if (ICalFileCalendarManagerTest.isInitialized == false) {
      DBFactory.getJunitInstance().clearDatabase();
      test = ManagerFactory.getManager().createAndPersistIdentity("test", null, OLATAuthenticationController.PROVIDER_OLAT, "test",
          Encoder.encrypt("test"));
      // Setup for code-points
      ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
      ActiveMQQueue queue = new ActiveMQQueue("olat/codepoints");
      codepointServer_ = new JMSCodepointServer(connectionFactory, queue, CODEPOINT_SERVER_ID);
      CodepointInstaller.installCodepointServer(codepointServer_);
      System.out.println("Codepoint server startet");
      ICalFileCalendarManagerTest.isInitialized = true;
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

        identity2 = ManagerFactory.getManager().createAndPersistIdentity("foo2", u2, OLATAuthenticationController.PROVIDER_OLAT, "foo2", Encoder.encrypt("hashipassi2"));
        User u3 = UserManager.getInstance().createAndPersistUser("fi3", "la3", "user3@bla.com");
        identity3 = ManagerFactory.getManager().createAndPersistIdentity("foo3", u3, OLATAuthenticationController.PROVIDER_OLAT, "foo3", Encoder.encrypt("hashipassi3"));
       
        // Setup for code-points
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        ActiveMQQueue queue = new ActiveMQQueue("olat/codepoints");
        codepointServer_ = new JMSCodepointServer(connectionFactory, queue, CODEPOINT_SERVER_ID);
        CodepointInstaller.installCodepointServer(codepointServer_);
        System.out.println("Codepoint server startet");
       
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    super.setUp();
    if (OLATResourceManagerTest.isInitialized == false) {
      try {
        DBFactory.getJunitInstance().clearDatabase();
        // Setup for code-points
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        ActiveMQQueue queue = new ActiveMQQueue("olat/codepoints");
        codepointServer_ = new JMSCodepointServer(connectionFactory, queue, CODEPOINT_SERVER_ID);
        CodepointInstaller.installCodepointServer(codepointServer_);
        System.out.println("Codepoint server startet");
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

  public void setUp() {
    if (RepositoryManagerTest.isInitialized == false) {
      try {
        DBFactory.getJunitInstance().clearDatabase();
        // Setup for code-points
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        ActiveMQQueue queue = new ActiveMQQueue("olat/codepoints");
        codepointServer_ = new JMSCodepointServer(connectionFactory, queue, CODEPOINT_SERVER_ID);
        CodepointInstaller.installCodepointServer(codepointServer_);
        System.out.println("Codepoint server startet");
View Full Code Here

Examples of org.apache.activemq.ActiveMQConnectionFactory

    System.out.println(" Hint: brokerUrl is something like tcp://localhost:61616");
    System.exit(1);
  }

  private static void go(String brokerUrl, String topicName) throws JMSException {
    ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
    connectionFactory.setBrokerURL(brokerUrl);
    Connection connection = connectionFactory.createConnection();
    ActiveMQTopic topic = new ActiveMQTopic(topicName);
    MessageConsumer consumer = connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(topic);
    connection.start();
    while(true) {
      Message m = consumer.receive();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.