[Design of Messaging on JBoss (Messaging/JBoss)] - JMS Adapters for JBM 2 Bridge
by jmesnil
I'm currently updating our BridgeService to make it work with JBM 2.
One of the task is to change the way we created JMS managed resources for the bridge's source and target (we no longer require the adapters to be registered in JMX).
In my local box, I've got a simple class JMSProviderAdapter which is instantiated by JBoss Microcontainer.
The Bridge & adapters configuration looks like:
| <bean name="Bridge" class="org.jboss.messaging.jms.bridge.BridgeService">
| <constructor>
| <parameter>TestBridge</parameter>
| <parameter>
| <inject bean="JMSManagementService"/>
| </parameter>
| </constructor>
| <property name="sourceProvider">
| <inject bean="JBM_2_Provider"/>
| </property>
| <property name="targetProvider">
| <inject bean="JBM_2_Provider"/>
| </property>
| <property name="sourceDestinationLookup">/queue/A</property>
| <property name="targetDestinationLookup">/queue/B</property>
| <property name="failureRetryInterval">-1</property>
| <property name="maxRetries">-1</property>
| <property name="maxBatchSize">1</property>
| <property name="maxBatchTime">-1</property>
| <property name="qualityOfServiceMode">2</property>
| <property name="transactionManager">
| <inject bean="TransactionManager" />
| </property>
| </bean>
|
| <bean name="JBM_2_Provider" class="org.jboss.messaging.jms.bridge.JMSProviderAdapter">
| <constructor>
| <parameter>JBoss Messaging 2 Adapter</parameter>
| <parameter>
| <map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
| <entry>
| <key>java.naming.factory.initial</key>
| <value>org.jnp.interfaces.NamingContextFactory</value>
| </entry>
| <entry>
| <key>java.naming.provider.url</key>
| <value>jnp://localhost:1099</value>
| </entry>
| <entry>
| <key>java.naming.factory.url.pkgs</key>
| <value>org.jboss.naming:org.jnp.interfaces"</value>
| </entry>
| </map>
| </parameter>
| <parameter>/ConnectionFactory</parameter>
| </constructor>
| </bean>
|
| <bean name="TransactionManager" class="com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionManagerImple">
| </bean>
|
With this kind of configuration, I was able to bridge a JBM 1.4 source to a JBM 2 target (the bridge was hosted in the JBM2 server).
For each type of provider, you must add a bean description with all the JNDI properties required to lookup its JMS managed resources.
Then all the class must be in JBM 2 classpath when it is started.
I'm not familiar with JBM 1.4 Bridge configurations and I wanted to be sure that this way to configure JBM2 Bridge adapter is sufficient enough to cover all the cases.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200055#4200055
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200055
17 years, 2 months
[Design of JBossXB] - Re: 2 root elements question
by alex.loubyansky@jboss.com
XML schema can contain multiple top-level/root elements. The corresponding classes have to be annotated with @XmlRootElement.
The problem is at the moment JBossXBBuilder (which is a SchemaBinding producer) takes only one class (which may reference other classes annotated with @XmlRootElement).
Until support for binding a set of classes to the same SchemaBinding is supported, there could be a few workarounds/hacks:
- just introduce an artificial class (which doesn't have to have a representation in the xsd) that would reference your top-level classes;
- build separate SchemaBinding's for datasources and connection-factories and then merge them into one.
The first one should be easier. Adding support for that to JBossXBBuilder should not be a problem as well. I am not sure whether JAXB defines a standard way to do that.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200046#4200046
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200046
17 years, 2 months