Hello Dietmer,

You can deploy your own JMS adapter.

The configuration should be something like this:

  <!-- JNDI Settings -->
  <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
         name="jboss.mq:service=JMSProviderLoader,name=UIL2Provider">
    <attribute name="ProviderUrl">jnp://whatever:1099</attribute>
    <attribute name="ProviderName">UIL2Provider</attribute>
    <attribute name="ProviderAdapterClass">
      org.jboss.jms.jndi.JBossMQProvider
    </attribute>
    <attribute
name="QueueFactoryRef">UIL2XAConnectionFactory</attribute>
    <attribute
name="TopicFactoryRef">UIL2XAConnectionFactory</attribute>
  </mbean>
  <!-- JMS Adapter -->
  <tx-connection-factory>
    <jndi-name>JmsXAUIL2</jndi-name>
    <xa-transaction/>
    <adapter-display-name>JMS Adapter</adapter-display-name>
    <config-property name="JmsProviderAdapterJNDI"
type="java.lang.String">java:/UIL2Provider</config-property>
    <config-property name="SessionDefaultType"
type="java.lang.String">javax.jms.Topic</config-property>
 
<security-domain-and-application>JmsXARealmUIL2</security-domain-and-app
lication>
  </tx-connection-factory>

And something like the following in login-config.xml

    <application-policy name = "JmsXARealmUIL2">
       <authentication>
          <login-module code =
"org.jboss.resource.security.ConfiguredIdentityLoginModule"
             flag = "required">
             <module-option name = "principal">guest</module-option>
             <module-option name = "userName">guest</module-option>
             <module-option name = "password">guest</module-option>
             <module-option name =
"managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXAUIL2</mo
dule-option>
          </login-module>
       </authentication>
    </application-policy>

However, the JMS Adapter does not have automatic reconnect like there is
for MDBs.
You will just get an Exception which will result in a transaction
rollback.

A better approach might to be send it to a local queue as
a persistent message, then have an MDB on the remote
machine pull the messages into its local queue when
the connection is available. You don't have connection unavailable
problems with java:/JmsXA

Regards,
Adrian

xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Dietmar Posselt
> Sent: 20 June 2003 12:17
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] CMT, XA and Messages in MDBs (3.2.2beta)
> 
> 
> Hi folks,
> 
> I need to send several jms messages to different remote 
> queues (behind a
> firewall) from one MDB in a XA transaction. I got it working 
> with BMT and the
> UILXAConnectionFactory. However, if I use CMT I have to use 
> the java:/JmsXA
> ConnectionFactory which seems to be using the 
> JVMServerILService. Hence, I
> cannot send messages to remote queues (they are sent to local 
> queues if they
> exist on the local JBoss or produce an exception if not).
> 
> BTW: I'm using 3.2.2beta on linux
> 
> My questions:
> 
> - Is it possible to enlist XAResources explicitly with CMT.
>    (Then I could use the UILXAConnectionFactory as in my BMT example)
> 
> - Can I tell the java:/JmsXA to use the UIL protocol and to 
> access remote queues?
> 
> - What is the proposed solution for my problem?
>    (Writing an own MDB container as propsed by Hiram in 
> another thread -
>     AFAIS this should do the trick)
> 
> Thnks,
>       Dietmar
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU 
> Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly 
> Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 





-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to