[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Changes in our JCA Adapter
clebert.suconic@jboss.com
do-not-reply at jboss.com
Fri Apr 24 05:43:13 EDT 2009
There are two ways of configuring our JCA Adapter:
On MDBs (Inbound), there are Activation properties on the MDBs:
|
| @MessageDriven(name = "MessageMDBExample", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"),
| @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
|
| })
| public class MDBExample implements MessageListener
All of this is just passed straight to the Resource-adapter. EJB3 doesn't know anything about this. So, if we have any complains about how this is configured it's going to be our fault.
As a way of allowing the user to connect the MDB to a remote server, I'm adding two activation properties there:
Example:
| ...
| @ActivationConfigProperty(propertyName = "TransportType", propertyValue = "org.jboss.messaging.integration.transports.netty.NettyConnector"),
| @ActivationConfigProperty(propertyName = "TransportConfiguration", propertyValue = "jbm.remoting.netty.port=9945")
| ...
|
Simarly, the outbound connection definition, has a similar way of configuring it:
This is how our current jms-ds.xml looks like ATM:
| <tx-connection-factory>
| <jndi-name>JmsXA</jndi-name>
| <xa-transaction/>
| <rar-name>jms-ra.rar</rar-name>
| <connection-definition>org.jboss.messaging.ra.JBMConnectionFactory</connection-definition>
| <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
| <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
| <max-pool-size>20</max-pool-size>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| </tx-connection-factory>
|
all the config-property you see here, are just passed straight to the resource adapter. All of these is under our domain.
Again, as a way of allowing the user to connect the Outbound connection to a remote server I'm similarly adding two config-properties here:
| <tx-connection-factory>
| ...
| <config-property name="TransportType" type="java.lang.String">org.jboss.messaging.integration.transports.netty.NettyConnector</config-property>
| <config-property name="TransportConfiguration" type="java.lang.String">jbm.remoting.netty.port=9945</config-property>
| ...
|
The user will also have the option of changing the ra.xml or deploying multiple rars. There is a @ResourceAdapter tag it could be used on the MDB also, so if we have multiple adapters.. the user will have the option of choosing the adapter file name.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226554#4226554
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226554
More information about the jboss-dev-forums
mailing list