Examples of HornetQActivation


Examples of org.hornetq.ra.inflow.HornetQActivation

      if (HornetQResourceAdapter.trace)
      {
         HornetQRALogger.LOGGER.trace("endpointDeactivation(" + endpointFactory + ", " + spec + ")");
      }

      HornetQActivation activation = activations.remove(spec);
      if (activation != null)
      {
         activation.stop();
      }
   }
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      assertEquals(endpoint.lastMessage.getCoreMessage().getBodyBuffer().readString(), "1");

      Map<ActivationSpec, HornetQActivation> activations = qResourceAdapter.getActivations();
      assertEquals(1,activations.size());

      HornetQActivation activation = activations.values().iterator().next();
      SimpleString tempQueueName = activation.getTopicTemporaryQueue();

      QueueQuery query = session.queueQuery(tempQueueName);
      assertTrue(query.isExists());

      //this should be enough to simulate the crash
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      spec.setDestination("test");

      spec.setMinSession(1);
      spec.setMaxSession(15);

      HornetQActivation activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec);

      ServerLocatorImpl serverLocator = (ServerLocatorImpl)ra.getDefaultHornetQConnectionFactory().getServerLocator();

      Field f = Class.forName(ServerLocatorImpl.class.getName()).getDeclaredField("factories");
     
      Set<XARecoveryConfig> resources = ra.getRecoveryManager().getResources();

      f.setAccessible(true);

      Set<ClientSessionFactoryInternal> factories = (Set<ClientSessionFactoryInternal>)f.get(serverLocator);

      for (int i = 0; i < 10; i++)
      {
         System.out.println(i);
         assertEquals(factories.size(), 0);
         activation.start();
         assertEquals(factories.size(), 15);
         assertEquals(1, resources.size());
         activation.stop();
         assertEquals(factories.size(), 0);
      }

      System.out.println("before RA stop => " + factories.size());
      ra.stop();
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

         spec.setDestination("test");

         spec.setMinSession(1);
         spec.setMaxSession(1);

         HornetQActivation activation = new HornetQActivation(ra, new MessageEndpointFactory(), spec);

         activation.start();
         activation.stop();

         ra.stop();

         locator.close();
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      if (HornetQResourceAdapter.trace)
      {
         HornetQRALogger.LOGGER.trace("endpointActivation(" + endpointFactory + ", " + spec + ")");
      }

      HornetQActivation activation = new HornetQActivation(this, endpointFactory, (HornetQActivationSpec) spec);
      activations.put(spec, activation);
      activation.start();
   }
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      if (HornetQResourceAdapter.trace)
      {
         HornetQRALogger.LOGGER.trace("endpointDeactivation(" + endpointFactory + ", " + spec + ")");
      }

      HornetQActivation activation = activations.remove(spec);
      if (activation != null)
      {
         activation.stop();
      }
   }
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      else
      {
         List<XAResource> xaresources = new ArrayList<XAResource>();
         for (ActivationSpec spec : specs)
         {
            HornetQActivation activation = activations.get(spec);
            if (activation != null)
            {
               xaresources.addAll(activation.getXAResources());
            }
         }
         return xaresources.toArray(new XAResource[xaresources.size()]);
      }
   }
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      if (HornetQResourceAdapter.trace)
      {
         HornetQResourceAdapter.log.trace("endpointActivation(" + endpointFactory + ", " + spec + ")");
      }

      HornetQActivation activation = new HornetQActivation(this, endpointFactory, (HornetQActivationSpec)spec);
      activations.put(spec, activation);
      activation.start();
   }
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      if (HornetQResourceAdapter.trace)
      {
         HornetQResourceAdapter.log.trace("endpointDeactivation(" + endpointFactory + ", " + spec + ")");
      }

      HornetQActivation activation = activations.remove(spec);
      if (activation != null)
      {
         activation.stop();
      }
   }
View Full Code Here

Examples of org.hornetq.ra.inflow.HornetQActivation

      if (HornetQResourceAdapter.trace)
      {
         HornetQResourceAdapter.log.trace("endpointActivation(" + endpointFactory + ", " + spec + ")");
      }

      HornetQActivation activation = new HornetQActivation(this, endpointFactory, (HornetQActivationSpec)spec);
      activations.put(spec, activation);
      activation.start();
   }
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.