Package javax.resource.spi.endpoint

Examples of javax.resource.spi.endpoint.MessageEndpointFactory


      return;

    for (int i = 0; i < _inboundList.size(); i++) {
      ConnectionListener listener = _inboundList.get(i);

      MessageEndpointFactory endpointFactory = listener.getEndpoint();
      ActivationSpec activation = listener.getActivation();

      if (_ra != null)
        _ra.endpointDeactivation(endpointFactory, activation);
    }
View Full Code Here


    if (endpointFactoryCfg == null)
      throw new ConfigException(L.l("connection-listener needs endpoint factory."));

    Class endpointClass = endpointFactoryCfg.getType();

    MessageEndpointFactory endpointFactory;
    endpointFactory = (MessageEndpointFactory) endpointClass.newInstance();

    if (endpointFactoryCfg.getInit() != null)
      endpointFactoryCfg.getInit().configure(endpointFactory);
View Full Code Here

      return;

    for (int i = 0; i < _inboundList.size(); i++) {
      ConnectionListener listener = _inboundList.get(i);

      MessageEndpointFactory endpointFactory = listener.getEndpoint();
      ActivationSpec activation = listener.getActivation();

      if (_ra != null)
        _ra.endpointDeactivation(endpointFactory, activation);
    }
View Full Code Here

        activationSpec.setDestinationType(Queue.class.getName());
        activationSpec.setDestination("TEST");
        activationSpec.setResourceAdapter(adapter);
        activationSpec.validate();

        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
                endpoint.xaresource = resource;
                return endpoint;
            }
View Full Code Here

        activationSpec.setDestinationType(Queue.class.getName());
        activationSpec.setDestination("TEST");
        activationSpec.setResourceAdapter(adapter);
        activationSpec.validate();
       
        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
                endpoint.xaresource = resource;
                return endpoint;
            }
            public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException {
View Full Code Here

        assertEndpointAttributes(endpoint);
    }

    public void testCreateJcaComponent() throws Exception
    {
        MessageEndpointFactory endpointFactory = new MockEndpointFactory();
        JcaModel jcaModel = resourceAdapter.getJcaModel("jca");
        MuleActivationSpec activationSpec = new MuleActivationSpec();
        activationSpec.setEndpoint("test://testEndpoint");
        InboundEndpoint endpoint = resourceAdapter.createMessageInflowEndpoint(activationSpec);

        Service service = resourceAdapter.createJcaService(endpointFactory, jcaModel, endpoint);

        // Check service
        assertNotNull(service);
        assertEquals("JcaService#" + endpointFactory.hashCode(), service.getName());
        assertNotNull(service);
        assertTrue(service instanceof JcaService);
        assertNotNull(service.getComponent());
        assertTrue(service.getComponent() instanceof JcaComponent);
        assertNotNull(((JcaComponent) service.getComponent()).workManager);
View Full Code Here

    {
        MuleActivationSpec activationSpec = new MuleActivationSpec();
        activationSpec.setResourceAdapter(resourceAdapter);
        activationSpec.setModelName("jcaModel");
        activationSpec.setEndpoint("test://testEndpoint");
        MessageEndpointFactory endpointFactory = new MockEndpointFactory();

        assertEquals(0, resourceAdapter.endpoints.size());

        resourceAdapter.endpointActivation(endpointFactory, activationSpec);
        assertEquals(1, resourceAdapter.endpoints.size());

        MuleEndpointKey key = new MuleEndpointKey(endpointFactory, activationSpec);
        Service service = resourceAdapter.endpoints.get(key);

        assertEquals("JcaService#" + endpointFactory.hashCode(), service.getName());
        testJcaService(service);
        testEndpoint(service);
       
        assertTrue(service.getComponent() instanceof JcaComponent);
       
View Full Code Here

    {
        MuleActivationSpec activationSpec = new MuleActivationSpec();
        activationSpec.setResourceAdapter(resourceAdapter);
        activationSpec.setModelName("jcaModel");
        activationSpec.setEndpoint("test://test");
        MessageEndpointFactory endpointFactory = new MockEndpointFactory();
        assertEquals(0, resourceAdapter.endpoints.size());
        resourceAdapter.endpointActivation(endpointFactory, activationSpec);
        assertEquals(1, resourceAdapter.endpoints.size());
        resourceAdapter.endpointDeactivation(endpointFactory, activationSpec);
        assertEquals(0, resourceAdapter.endpoints.size());
View Full Code Here

        activationSpec.setDestinationType(Queue.class.getName());
        activationSpec.setDestination("TEST");
        activationSpec.setResourceAdapter(adapter);
        activationSpec.validate();

        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
                endpoint.xaresource = resource;
                return endpoint;
            }
View Full Code Here

        activationSpec.setDestinationType(Queue.class.getName());
        activationSpec.setDestination("TEST");
        activationSpec.setResourceAdapter(adapter);
        activationSpec.validate();

        MessageEndpointFactory messageEndpointFactory = new MessageEndpointFactory() {
            @Override
            public MessageEndpoint createEndpoint(XAResource resource) throws UnavailableException {
                endpoint.xaresource = resource;
                return endpoint;
            }
View Full Code Here

TOP

Related Classes of javax.resource.spi.endpoint.MessageEndpointFactory

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.