users@genericjmsra.java.net

Re: Multiple resource-adapters with GenericJMSRA

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Wed, 05 Dec 2007 21:31:35 +0530

Stijn Van Den Enden wrote:
> Hi Siva.
>
> we tested your suggestion:
> 1) changed the resource-adapter-config so it includes no Broker specific
> properties anymore
> 2) changed the ra.xml - added property description for the
> ProviderIntegrationMode en JndiProperties to make sure the properties
> get set correctly
> 3) changed the creation of the admin and resource-pool to include the
> aforementioned properties
>
> and this seems to work. The admin-object can now be resolved correctly
> and both the connections to MQSeries and iMQ are established.

Great.

> Is it correct that the ConnectionFactory can access the resource adapter
> configuration (ResourceAdapterAssociation), and the administration
> object cannot access the same configuration? Is this a limitation of the
> JCA 1.5 specification?

Yes that is right. There is no mechanism today for the
AdministereredObject to support ResourceAdapterAssociation interface
in the current 1.5 version of the specification. We had also added
this comment in the code earlier
http://fisheye5.cenqua.com/browse/genericjmsra/src/java/com/sun/genericra/outbound/DestinationAdapter.java?r=1.3#l92

Thanks
--Siva.
>
> Many thanks for your help,
>
> Kind regards,
>
> Stijn
>
>
> On 05 Dec 2007, at 15:19, Sivakumar Thyagarajan wrote:
>
>> Hi Geert
>>
>> Achten Geert wrote:
>>> Hi,
>>> we're trying to integrate with both MQSeries and Sun Java System
>>> Message Queue. Both integrations work flawless when used
>>> individually. However if we try to combine them, things go wrong.
>>> Apparently the GenericJMSRA uses the resource-adapter-config of IMQ
>>> when connecting to MQSeries.
>>> In the code we see that the DestinationAdapter uses a static field
>>> (returned by getInstance()). This static field can only be
>>> initiliazed once (per classloader), and so contains the wrong
>>> configuration. We are deploying the resource adapter on the container
>>> level.
>>
>> This is right. The configuaration specified in resource-adapter-config
>> is set on the ResourceAdapter instance. This configuration is common
>> for all artifacts [MCF/ActivationSpec/AdminObjects] created against
>> that RA instance and hence, as per the connector spec, we use values
>> set in the ResourceAdapter unless overridden at the artifact level.
>>
>>> Is there a way to use GenericJMSRA to connect to multiple brokers?
>>
>> Unfortunately you cannot have two configurations [ra-configs] for a
>> resource adapter. Here is how multiple brokers can be configured for a
>> single standalone Generic RA deployment.
>> - Set all the common properties between both the brokers in ra-config
>> - Let's say you have one connection factory CF1 that needs to connect
>> to Sun MQ and another CF, CF2 that needs to connect to MQSeries.
>> Configure CF1 properties with Sun MQ related properties
>> Configure CF2 properties with MQSeries related properties.
>>
>> Unfortunately, with this setup, you might have to duplicate multiple
>> configuration properties [relevant to a broker] across your various
>> objects. We haven't tested this scenario, but this should ideally
>> work. Please let us know if you face any issues.
>>
>> Thanks
>> --Siva.
>>
>>> Configuration information (GenericJMSRA version 1.6 on SJSAS 8.1_02
>>> b19-p08)
>