[jboss-user] [JCA] - Re: How to code JNDI lookup of JCA Resource ConnectionFactor
mnenchev
do-not-reply at jboss.com
Thu Nov 5 08:06:56 EST 2009
I have similar problem with exactly the same case. But i am not getting null pointer exception. Instead i am getting ClassCastException when i try to lookup the QueueConnectionFactory and try to cast to ConnectionFactory it throws me an exception:
java.lang.ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl cannot be cast to javax.jms.QueueConnectionFactory
my wmq.jmsra.xml (deployed in /server/all/deploy):
<?xml version="1.0" encoding="UTF-8"?>
|
| <connection-factories>
|
| <!-- connection factory definition -->
| <tx-connection-factory>
| <jndi-name>TESTCF</jndi-name>
| <xa-transaction />
| <rar-name>wmq.jmsra.rar</rar-name>
| <connection-definition>javax.jms.ConnectionFactory</connection-definition>
| <config-property name="channel" type="java.lang.String">TEST.CHANNEL</config-property>
| <config-property name="hostName" type="java.lang.String">192.168.2.100</config-property>
| <config-property name="port" type="java.lang.String">1414</config-property>
| <config-property name="queueManager" type="java.lang.String">TESTQM</config-property>
| <config-property name="transportType" type="java.lang.String">CLIENT</config-property>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| </tx-connection-factory>
|
| <!-- admin object definition -->
| <mbean code="org.jboss.resource.deployment.AdminObject" name="jca.wmq:name=testqueue">
| <attribute name="JNDIName">testqueue</attribute>
| <depends optional-attribute-name="RARName">
| jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'
| </depends>
| <attribute name="Type">javax.jms.Queue</attribute>
| <attribute name="Properties">
| baseQueueManagerName=TESTQM
| baseQueueName=testqueue
| expiry=EXP_UNLIMITED
| </attribute>
| </mbean>
| </connection-factories>
|
Why the lookup returns me object of a class that do not implement QueueConnectionFactory?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264094#4264094
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264094
More information about the jboss-user
mailing list