[jboss-as7-dev] Use a module to setup external dependencies for a JMS Bridge?
Jeff Mesnil
jmesnil at redhat.com
Fri May 25 10:18:07 EDT 2012
still working on the JMS bridge... :)
The JMS bridge uses JNDI to lookup the JMS resources of external JMS
brokers. This means that I must have the client implementation classes
of these brokers inside AS7 to instantiate them.
More precisely, the JMS Bridge code is located in HornetQ jar, so the
external jars must be made available to org.hornetq module.
As I don't want to modify this module to be able to configure a JMS
bridge, I did a more convoluted thing.
There is already a reverse dependency from org.hornetq to
org.jboss.as.messaging module (so that HornetQ can instantiate AS7
integration classes).
Leveraging this, I added another
org.jboss.as.messaging.bridge-integration module that is the placeholder
for these external jars.
This module is a dependency of org.hornetq through org.jboss.as.messaging.
org.jboss.as.messaging.bridge-integration (contains external
^ brokers resources)
|
|
depends-on
|
|
org.jboss.as.messaging --depends-on--> org.hornetq (contains
^ | the JMS Bridge)
| |
| |
| |
+---------------------------------------+
reverse dependency so that HornetQ
can instantiated AS integration classes
It works, I am able to bridge ActiveMQ (I don't have the jars of other
brokers to test) to HornetQ with it.
It requires to:
1. add ActiveMQ client jars to
module/org/jboss/as/messaging/bridge-integration/main
2. add them as <resource-root> to this bridge-integration module.xml
wdyt?
Is it acceptable to ask users to modify this module for JMS bridge
integration?
Is there a simpler/better way to achieve this?
Am I shooting myself in the foot when I will bridge to an older AS
version (haven't tried it yet)?
I have now 2 modules (org.jboss.as.messaging and
org.jboss.as.messaging.bridge-integration) for the messaging subsystem?
Is that OK?
thanks,
jeff
--
Jeff Mesnil
JBoss, a division of Red Hat
http://jmesnil.net/
More information about the jboss-as7-dev
mailing list