Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configuration JMS adapter for WebsphereMQ 2

Status
Not open for further replies.

MiBro

Programmer
Sep 14, 2004
2
FR
Hello,

I try to user the JMS adapter with IBM WebsphereMQ as provider (DataStageTX Version 8.0 on Windows). What is the neccassary settings. I read, some settings in the dstx.ini: External jar files. Which jar files are neccassary? What is neccassary on the WebsphereMQ side? What is the ConnectionFactory name?

Best regards
Michael Broekmans
 
Setting up JMS for MQ is pretty complicated - DSTX has a native MQ adapter that is faster and has more features than the JMS adapter.

You can also read and write JMS messages (RFH2) to the queue (write using "-FORMAT MQHRF2") using the native MQ adapter.

If you do go down the JMS route, then the first step is to set up MQ to work with JMS. You usually need some kind of Java application server but you can run MQ in standalone mode, see
Cheers,
Olly.
 
Thanks! That could be a solution. Exist a typetree for the RFH2 Header?
 
This is a tree we use, convert back to a mtt using the mts maker. You'll probably have to make some adjustments for your data but it should be a good starting point.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TTMAKER SYSTEM "ttmaker60.dtd">
<?ANALYZE?><TTMAKER Version="6.0"><NEWTREE Filename="C:\Mercator6.7\Standard Resource Library\Hubware\Trees\WMQ_HDR_RFH2.mtt"><ROOT SimpleTypeName="ROOT" SetUpProperties="DEFAULT" SetUpComponents="DELETE" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/></Sequence>
<CharTextWestern><Size Min="0" Max="S"/>
<Western CharSet="NATIVE"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</CharTextWestern>
</ROOT>
<ITEM SimpleTypeName="Field" CategoryOrItemParent="ROOT" partition="NO" OrderSubtypes="ASCENDING"><CharTextWestern><Size Min="0" Max="S"/>
<Western CharSet="NATIVE"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</CharTextWestern>
</ITEM>
<ITEM SimpleTypeName="CodedCharSetID" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><BinaryNumber><BinInt Length="4" Sign="NO" ByteOrder="BIGENDIAN"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</BinaryNumber>
</ITEM>
<ITEM SimpleTypeName="Data" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><CharTextWestern><Size Min="0" Max="S"/>
<Western CharSet="NATIVE"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</CharTextWestern>
</ITEM>
<ITEM SimpleTypeName="Encoding" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><BinaryNumber><BinInt Length="4" Sign="NO" ByteOrder="BIGENDIAN"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</BinaryNumber>
</ITEM>
<ITEM SimpleTypeName="Flags" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><BinaryNumber><BinInt Length="4" Sign="NO" ByteOrder="BIGENDIAN"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</BinaryNumber>
</ITEM>
<ITEM SimpleTypeName="Format" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><CharTextWestern><Size Min="8" Max="8"/>
<PadText Justify="LEFT" ApplyPad="ANYCONTEXT"><PadValue>&lt;SP&gt;</PadValue>
<PaddedToMinContent/>
</PadText>
<Western CharSet="NATIVE"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</CharTextWestern>
</ITEM>
<ITEM SimpleTypeName="NameValueCCSID" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><BinaryNumber><BinInt Length="4" Sign="NO" ByteOrder="BIGENDIAN"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</BinaryNumber>
</ITEM>
<ITEM SimpleTypeName="NameValueData" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><CharTextWestern><Size Min="0" Max="S"/>
<Western CharSet="NATIVE"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</CharTextWestern>
</ITEM>
<ITEM SimpleTypeName="NameValueLength" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><BinaryNumber><BinInt Length="4" Sign="NO" ByteOrder="BIGENDIAN"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</BinaryNumber>
</ITEM>
<ITEM SimpleTypeName="StrucId" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><CharTextWestern><Size Min="4" Max="4"/>
<PadText Justify="LEFT" ApplyPad="ANYCONTEXT"><PadValue>&lt;SP&gt;</PadValue>
<PaddedToMinContent/>
</PadText>
<Western CharSet="NATIVE"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</CharTextWestern>
</ITEM>
<ITEM SimpleTypeName="StrucLength" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><BinaryNumber><BinInt Length="4" Sign="NO" ByteOrder="BIGENDIAN"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</BinaryNumber>
</ITEM>
<ITEM SimpleTypeName="Version" CategoryOrItemParent="Field ROOT" partition="NO" OrderSubtypes="ASCENDING"><BinaryNumber><BinInt Length="4" Sign="NO" ByteOrder="BIGENDIAN"/>
<ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
</BinaryNumber>
</ITEM>
<GROUP SimpleTypeName="MQMessage" CategoryOrGroupParent="ROOT" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/><SequenceComponent><RelativeTypeName>RFH2</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>Data Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
</Sequence>
</GROUP>
<GROUP SimpleTypeName="NameValuePair" CategoryOrGroupParent="ROOT" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/><SequenceComponent SIZED="EXCLUDESELF"><RelativeTypeName>NameValueLength Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>NameValueData Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
</Sequence>
</GROUP>
<GROUP SimpleTypeName="jms" CategoryOrGroupParent="NameValuePair ROOT" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/><SequenceComponent SIZED="EXCLUDESELF"><RelativeTypeName>NameValueLength Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent IDENTIFIER="ON"><RelativeTypeName>NameValueData Field</RelativeTypeName>
<Range Min="1" Max="1"/>
<Rule>LEFT ($,5) = &quot;&lt;jms&gt;&quot;</Rule>
</SequenceComponent>
</Sequence>
</GROUP>
<GROUP SimpleTypeName="mcd" CategoryOrGroupParent="NameValuePair ROOT" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/><SequenceComponent SIZED="EXCLUDESELF"><RelativeTypeName>NameValueLength Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent IDENTIFIER="ON"><RelativeTypeName>NameValueData Field</RelativeTypeName>
<Range Min="1" Max="1"/>
<Rule>LEFT ($,5) = &quot;&lt;mcd&gt;&quot;</Rule>
</SequenceComponent>
</Sequence>
</GROUP>
<GROUP SimpleTypeName="usr" CategoryOrGroupParent="NameValuePair ROOT" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/><SequenceComponent SIZED="EXCLUDESELF"><RelativeTypeName>NameValueLength Field</RelativeTypeName>
<Range Min="1" Max="1"/>
<Rule>$&lt;1048576</Rule>
</SequenceComponent>
<SequenceComponent IDENTIFIER="ON"><RelativeTypeName>NameValueData Field</RelativeTypeName>
<Range Min="1" Max="1"/>
<Rule>LEFT ($,5) = &quot;&lt;usr&gt;&quot;</Rule>
</SequenceComponent>
</Sequence>
</GROUP>
<GROUP SimpleTypeName="RFH2" CategoryOrGroupParent="ROOT" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/><SequenceComponent IDENTIFIER="ON"><RelativeTypeName>StrucId Field</RelativeTypeName>
<Range Min="1" Max="1"/>
<Rule>$=&quot;RFH&quot;</Rule>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>Version Field</RelativeTypeName>
<Range Min="1" Max="1"/>
<Rule>$=2</Rule>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>StrucLength Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>Encoding Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>CodedCharSetID Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>Format Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>Flags Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>NameValueCCSID Field</RelativeTypeName>
<Range Min="1" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>mcd NameValuePair</RelativeTypeName>
<Range Min="0" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>jms NameValuePair</RelativeTypeName>
<Range Min="0" Max="1"/>
</SequenceComponent>
<SequenceComponent><RelativeTypeName>usr NameValuePair</RelativeTypeName>
<Range Min="0" Max="1"/>
</SequenceComponent>
</Sequence>
</GROUP>
</NEWTREE>
</TTMAKER>
 
I am using 7.5.
Made required changes as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TTMAKER SYSTEM "ttmaker60.dtd">
<?ANALYZE?><TTMAKER Version="6.0"><NEWTREE Filename="C:\Ascential\DataStageTX_7.5\examples\adapters\mq\WMQ_HDR_RFH2.mtt"><ROOT SimpleTypeName="ROOT" SetUpProperties="DEFAULT" SetUpComponents="DELETE" OrderSubtypes="ASCENDING"><Sequence partition="NO"><Implicit/></Sequence>

I get the error:
Error 2 reference 0: Invalid syntax in command line.

How do I debug?
HPS
 
I tried in DSTX 8.0.1 and 6.7.1 and both worked okay.

I also tried amending the tree path to "C:\temp\WMQ_HDR_RFH2.mtt", and it still created okay.

For both 8.0.1 and 6.7.1 I opened the type tree designer and selected "Tree->Import" rather than just double click on the mts file.


Cheers,
Olly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top