Search in sources :

Example 1 with ActiveMQActivationSpec

use of org.apache.activemq.ra.ActiveMQActivationSpec in project tomee by apache.

the class MdbTest method createListener.

private void createListener() throws Exception {
    // create the activation spec
    final ActiveMQActivationSpec activationSpec = new ActiveMQActivationSpec();
    activationSpec.setDestinationType("javax.jms.Queue");
    activationSpec.setDestination(REQUEST_QUEUE_NAME);
    // validate the activation spec
    activationSpec.validate();
    // set the resource adapter into the activation spec
    activationSpec.setResourceAdapter(ra);
    // create the message endpoint
    final MessageEndpointFactory endpointFactory = new JmsEndpointFactory();
    // activate the endpoint
    ra.endpointActivation(endpointFactory, activationSpec);
}
Also used : MessageEndpointFactory(javax.resource.spi.endpoint.MessageEndpointFactory) ActiveMQActivationSpec(org.apache.activemq.ra.ActiveMQActivationSpec)

Aggregations

MessageEndpointFactory (javax.resource.spi.endpoint.MessageEndpointFactory)1 ActiveMQActivationSpec (org.apache.activemq.ra.ActiveMQActivationSpec)1