Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active Nov 26, 2015
Embed
What would you like to do?
Auto Provisioning JMS Connection Factory and Destination
@Stateless
@JMSConnectionFactoryDefinition(name = "java:comp/env/AutoDeloyedJMSConf")
@JMSDestinationDefinition(interfaceName = "javax.jms.Queue", name = "java:comp/env/AutoDeloyedJMSQueue")
public class Service {
//usage omitted...
}
@JMSConnectionFactoryDefinitions({
@JMSConnectionFactoryDefinition(
name="java:comp/env/AutoDeloyedJMSConf1"
),
@JMSConnectionFactoryDefinition(
name="java:comp/env/AutoDeloyedJMSConf2"
)
})
@JMSDestinationDefinitions({
@JMSDestinationDefinition(
name="java:comp/env/AutoDeloyedJMSQueue1",
interfaceName = "javax.jms.Queue",
),
@JMSDestinationDefinition(
name="java:comp/env/AutoDeloyedJMSQueue2",
interfaceName = "javax.jms.Queue",
)
})
@Stateless
public class AnotherService {
//usage omitted...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment