Examples of MessageEndpoint


Examples of javax.resource.spi.endpoint.MessageEndpoint

      return results;
   }
  
   public void basicTest() throws Exception
   {
      MessageEndpoint endpoint = adapter.getEndpoint("testInflow");
      if (endpoint == null)
         throw new Exception("Null endpoint");
      TestMessage message = new TestMessage();
      ((TestMessageListener) endpoint).deliverMessage(message);
      if (message.acknowledged == false)
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

        public void endpointDeactivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) {
            EmailAccountInfo accountInfo = (EmailAccountInfo) activationSpec;

            EmailConsumer emailConsumer = consumers.remove(accountInfo.getAddress());
            MessageEndpoint endpoint = (MessageEndpoint) emailConsumer;
            endpoint.release();
        }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

            EmailConsumer emailConsumer = consumers.get(to);

            if (emailConsumer == null) throw new Exception("No such account");

            MessageEndpoint endpoint = (MessageEndpoint) emailConsumer;

            endpoint.beforeDelivery(EmailConsumer.class.getMethod("receiveEmail", Properties.class, String.class));
            emailConsumer.receiveEmail(headers, body);
            endpoint.afterDelivery();
        }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

    private ServerSessionImpl createServerSessionImpl() throws JMSException {
        ActiveMQActivationSpec activationSpec = activeMQAsfEndpointWorker.endpointActivationKey.getActivationSpec();
        int acknowledge = (activeMQAsfEndpointWorker.transacted) ? Session.SESSION_TRANSACTED : activationSpec.getAcknowledgeModeForSession();
        final ActiveMQSession session = (ActiveMQSession) activeMQAsfEndpointWorker.connection.createSession(activeMQAsfEndpointWorker.transacted,acknowledge);           
        MessageEndpoint endpoint;
        try {               
            int batchSize = 0;
            if (activationSpec.getEnableBatchBooleanValue()) {
                batchSize = activationSpec.getMaxMessagesPerBatchIntValue();
            }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

            return null;
        }
    }

    private MessageEndpoint createEndpoint(LocalAndXATransaction txResourceProxy) throws UnavailableException {
        MessageEndpoint endpoint;
        endpoint = activeMQAsfEndpointWorker.endpointFactory.createEndpoint(txResourceProxy);
        MessageEndpointProxy endpointProxy = new MessageEndpointProxy(endpoint);
        return endpointProxy;
    }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

    }

    public void endpointActivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) throws ResourceException {
        final TelnetActivationSpec telnetActivationSpec = (TelnetActivationSpec) activationSpec;

        final MessageEndpoint messageEndpoint = messageEndpointFactory.createEndpoint(null);

        // This messageEndpoint instance is also castable to the ejbClass of the MDB
        final TelnetListener telnetListener = (TelnetListener) messageEndpoint;

        try {
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

            telnetServer.deactivate();
        } catch (IOException e) {
            e.printStackTrace();
        }

        final MessageEndpoint endpoint = (MessageEndpoint) telnetServer.getListener();

        endpoint.release();
    }
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

            logger.log(Level.WARNING, "endpointfactory.unavailable");
            throw new UnavailableException(
                    "EndpointFactory is currently not available");
        }
       
        MessageEndpoint endpoint = null;
        try {
            ResourceHandle resourceHandle = allocator_.createResource(xa);
           
            MessageBeanListener listener =
                messageBeanPM_.createMessageBeanListener(resourceHandle);
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

            logger.log(Level.WARNING, "endpointfactory.unavailable");
            throw new UnavailableException(
                    "EndpointFactory is currently not available");
        }

        MessageEndpoint endpoint = null;
        try {
            ResourceHandle resourceHandle = allocator_.createResource(xaResource);

            MessageBeanListener listener =
                    messageBeanPM_.createMessageBeanListener(resourceHandle);
View Full Code Here

Examples of javax.resource.spi.endpoint.MessageEndpoint

        if (connection == null) {
            // redispatch of pending prefetched messages after disconnect can have a null connection
            return null;
        }
        final ActiveMQSession session = (ActiveMQSession)connection.createSession(activeMQAsfEndpointWorker.transacted, acknowledge);
        MessageEndpoint endpoint;
        try {
            int batchSize = 0;
            if (activationSpec.getEnableBatchBooleanValue()) {
                batchSize = activationSpec.getMaxMessagesPerBatchIntValue();
            }
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.