Search in sources :

Example 1 with JMSDestination

use of org.apache.openejb.jee.JMSDestination in project tomee by apache.

the class ConvertJMSDestinationDefinitions method deploy.

@Override
public AppModule deploy(final AppModule appModule) throws OpenEJBException {
    final List<JndiConsumer> jndiConsumers = collectConsumers(appModule);
    final KeyedCollection<String, JMSDestination> destinations = new KeyedCollection<>();
    for (final JndiConsumer consumer : jndiConsumers) {
        if (consumer != null) {
            destinations.addAll(consumer.getJMSDestination());
        }
    }
    for (final JMSDestination destination : destinations) {
        appModule.getResources().add(toResource(destination));
    }
    return appModule;
}
Also used : JMSDestination(org.apache.openejb.jee.JMSDestination) KeyedCollection(org.apache.openejb.jee.KeyedCollection) JndiConsumer(org.apache.openejb.jee.JndiConsumer)

Aggregations

JMSDestination (org.apache.openejb.jee.JMSDestination)1 JndiConsumer (org.apache.openejb.jee.JndiConsumer)1 KeyedCollection (org.apache.openejb.jee.KeyedCollection)1