The Seam JMS module extends the CDI programming module into the messaging world. You can now inject the full array of JMS resources, whose lifecycles that are managed transparently, into your beans and forward CDI events over JMS. This gives you the benefits of CDI-style type-safety coupled with the power of JMS.
Seam JMS aims to provide simple JMS resource injection. The following JMS resources are now first class beans in Seam 3, allowing you to inject them as you would any other complete and type-safe bean anywhere needed! And in addition, their life cycles are now managed too.
Destinations (Topic, Queue)
Message Producer (TopicPublisher, QueueSender)
Message Consumer (TopicSubscriber, QueueReceiver)
Need a specific topic injected? Let's assume you have registered the topic "jms/Topic" with your application server. Use @JmsDestination:
Quickly map CDI events to JMS Destinations then fire events to produce JMS messages with ease! With a little configuration via @JmsForwarding* sending a message to JMS is this easy:
@Inject @Bridged Event<MyObject> event;
event.fire(myObject); // To JMS... and beyond!
* See the Arquillian tests for a sample @JmsForwarding here.
The next few items on the list are:
Fire CDI events from received JMS messages (2nd half of event bridge)
Elaboration of event bridge configuration
Revise JMS resource injection implementation
Dive in and get started today and tell us what you think! Visit the Seam 3 User Forums to participate in the discussion!
More information is available on the Seam JMS module page at SeamFramework.org. Check out the documentation here. Also related, a blog on how Arquillian has helped test the module in container can be found on the Arquillian space here.
Special note for Glassfish V3 Users: Make sure to define a ConnectionFactory with the name "ConnectionFactory". More details here.