CCDTURL property for oracle MQXAConnectionFactory

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CCDTURL property for oracle MQXAConnectionFactory

khaliloo
Hi everyone!

I'm trying to connect a MQ cluster with the Bitronix JMS Pooling Connection Factory.
I need to set the property CCDTURL on the factory which is not a primitive type but a java.net.URL ...

I tried something like that but Spring does not like :

         <bean id="MQSConnectionFactory" class="bitronix.tm.resource.jms.PoolingConnectionFactory" init-method="init" destroy-method="close">
        <property name="className" value="com.ibm.mq.jms.MQXAConnectionFactory" />
        <property name="uniqueName" value="wmq" />
            <property name="twoPcOrderingPosition" value="2" />
        <property name="maxPoolSize" value="50" />
        <property name="driverProperties">
            <props>
                                <prop key="queueManager">QMCLUSTHA</prop>
                                <prop key="CCDTURL">
                                        <bean id="ccdturl" class="java.net.URL">
                                                <constructor-arg index="0">file://AMQCLCHL.TAB</constructor-arg>
                                        </bean>
                                </prop>
                                <prop key="transportType">1</prop>
            </props>
        </property>
    </bean>


Is there another way to set this property??
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CCDTURL property for oracle MQXAConnectionFactory

Ludovic Orban-2
Unfortunately, BTM 2.1.x lacks the kind of support required to do this.

I would be quite simple to add though, just by adding this piece of code at the end of the bitronix.tm.utils.PropertyUtils.transform() method, right before the PropertyException is thrown:

        if (destinationClass == URL.class  &&  value.getClass() == String.class) {
            try {
                return new URL((String) value);
            } catch (MalformedURLException ex) {
                throw new PropertyException("cannot convert values of type '" + value.getClass().getName() + "' into type '" + destinationClass + "'", ex);
            }
        }

Maybe you could try to create a snapshot build of the BTM 2.1.x branch yourself, apply the above patch and give it a try? If that works, I'd advise you to open a new feature request in jira.

Thanks,
Ludovic



On Mon, Sep 16, 2013 at 2:16 PM, khaliloo <[hidden email]> wrote:
Hi everyone!

I'm trying to connect a MQ cluster with the Bitronix JMS Pooling Connection
Factory.
I need to set the property CCDTURL on the factory which is not a primitive
type but a java.net.URL ...

I tried something like that but Spring does not like :

*        <bean id="MQSConnectionFactory"
class="bitronix.tm.resource.jms.PoolingConnectionFactory" init-method="init"
destroy-method="close">
        <property name="className"
value="com.ibm.mq.jms.MQXAConnectionFactory" />
        <property name="uniqueName" value="wmq" />
            <property name="twoPcOrderingPosition" value="2" />
        <property name="maxPoolSize" value="50" />
        <property name="driverProperties">
            <props>
                                <prop key="queueManager">QMCLUSTHA</prop>
                                <prop key="CCDTURL">
                                        <bean id="ccdturl" class="java.net.URL">
                                                <constructor-arg index="0">file://AMQCLCHL.TAB</constructor-arg>
                                        </bean>
                                </prop>
                                <prop key="transportType">1</prop>
            </props>
        </property>
    </bean>*

Is there another way to set this property??



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/CCDTURL-property-for-oracle-MQXAConnectionFactory-tp1525.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CCDTURL property for oracle MQXAConnectionFactory

khaliloo
It works fine! I just put the bitronix.tm.utils.PropertyUtils class in my workspace and modified it the way you told me.

Thank you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CCDTURL property for oracle MQXAConnectionFactory

Brett Wooldridge-2
Also, according to IBM's documentation, this property can be controlled by environment variables (MQCHLLIB and MQCHLTAB):


Brett



On Tue, Sep 17, 2013 at 1:05 AM, khaliloo <[hidden email]> wrote:
It works fine! I just put the bitronix.tm.utils.PropertyUtils class in my
workspace and modified it the way you told me.

Thank you.



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/CCDTURL-property-for-oracle-MQXAConnectionFactory-tp1525p1527.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Loading...