7 Replies Latest reply: Apr 20, 2011 8:52 AM by angifred RSS

How to send Message to a WebSphere QUEUE througth a jms ds configured in JBoss AS 5.1

Andrea Cacciatori Newbie

Hi to all!

 

Sorry for the answer but I'm a newbie.

 

I try to configure a external queue datasource in JBoss AS 5.1.

I want to sent throught jms api a string messages to my custom queue resident on a particular host.

I want only to set a pointer to this queue like i do for my oracle-ds.

 

 

I try to follow this guides:

http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html

 

But i need this rar library wmq.jmsra.rar.

 

Is there anyone that can send me this file at ciccathebest@gmail.com?? i don't be able to find in internet

 

i try to assemle with this jar (

 

  • com.ibm.mq.jar, which contains WebSphere MQ base Java
  • com.ibm.mqjms.jar, which contains WebSphere MQ JMS
  • mqconnector.jar, which contains the WebSphere MQ implementation of the JCA interfaces (in this case i use connector.jar i think it's the same)
  • dhbcore.jar

 

)but when i deploy it seems doesn't runs.

 

Error determining structure: wmq.jmsra.rar

 

 

Moreover I create this ds file: wmq.jmsra-ds.xml:

with my custom configuration like this:

 

 

<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
  <!-- mbeans defining JCA administered objects -->
  <!-- JCA Connection factory definitions -->
  <tx-connection-factory>
<!-- Bind this ConnectionFactory with the JNDI name IVTCF -->
    <jndi-name>jms/QMGR</jndi-name>
    <!-- Indicate that the connection factory supports XA transactions -->
    <xa-transaction />
    <!-- rar-name is the actual RAR file name, in this case wmq.jmsra.rar -->
    <rar-name>wmq.jmsra.rar</rar-name>
    <!-- connection-definition is the ConnectionFactory interface
      defined in the ra.xml -->
    <connection-definition>javax.jms.ConnectionFactory</connection-definition>
    <!--
        Configuration for the ConnectionFactory. This defines the channel, hostname, port,
        queueManager, and transportType properties for a client (TCP/IP) connection to WMQ
    -->
    <config-property name="channel" type="java.lang.String">name of the channel</config-property>
    <config-property name="hostName" type="java.lang.String">localhost</config-property>
    <config-property name="port" type="java.lang.String">1416</config-property>
    <config-property name="queueManager" type="java.lang.String">ADSQS1XTSC1</config-property>
    <config-property name="transportType" type="java.lang.String">CLIENT</config-property>
    <!-- define security domain -->
    <security-domain-and-application>JmsXARealm</security-domain-and-application>
  </tx-connection-factory>
    <connection-factories>
  <mbean code="org.jboss.resource.deployment.AdminObject"
      name="jca.wmq:name=ivtqueue">
    <!-- Bind this AdminObject  with the JNDI name IVTQueue -->
    <attribute name="JNDIName">jms/QUEUE_1</attribute>
    <!-- this MBean depends on the WebSphere MQ resource adapter -->
    <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
    <!-- this admin object is a javax.jms.Queue -->
    <attribute name="Type">javax.jms.Queue</attribute>
    <!--
       Configuration for Queue TEST.QUEUE on queue manager ExampleQM. All messages sent
       to this queue will have their expiry time overridden so that messages never expire
    -->
    <attribute name="Properties">
      baseQueueManagerName=pipo
      baseQueueName=pipo.TESTQ
      expiry=EXP_UNLIMITED
    </attribute>
  </mbean>
</connection-factories>

 

</connection-factories>

 

 

 

 

 

But i don't know if it is completely correct.

 

Is there anyone that can help me??

 

Thanks in advance.

 

Romeo