|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Sample Data Handler [Binary Files] - Jtext Adapter |
« View previous topic :: View next topic » |
Author |
Message
|
lehare |
Posted: Wed Nov 02, 2005 3:59 am Post subject: Sample Data Handler [Binary Files] - Jtext Adapter |
|
|
 Apprentice
Joined: 25 Jul 2005 Posts: 48
|
Hi there guys,
I have set up a Jtext Adapter to handle comma delimited files, and its working perfectly fine ... but now i wanna tweak it to accept binary files ... but i've read in the Jtext adapter guide that i would have to build my own data hanlder [I have limited programming experince]
is there any sample binary data handler that i can use?
thanx for any help
lehare. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Nov 02, 2005 4:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You're better off scrapping JText and using something else.
If you're really trying to perform general purpose file to queue and queue to file transfers, then you should look at CommerceQuest's PM4Data.
In an enterprise situation, you will rapidly run into situations that it will be extremely difficult to handle with JText - message reply, transfer visibility, security, etc. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
lehare |
Posted: Wed Nov 02, 2005 5:10 am Post subject: |
|
|
 Apprentice
Joined: 25 Jul 2005 Posts: 48
|
Thanx jefflowrey for the quick reply,
But i've just been intructed to make the Jtext solution to work, but i will keep on highlighting the potential risks.
but in the mean time will it be possible for me to get my hands on a binary data handler - or will i have to ask one of my java coders to 'custom develop' one for me? |
|
Back to top |
|
 |
dunesand |
Posted: Thu Nov 03, 2005 3:38 am Post subject: |
|
|
 Acolyte
Joined: 17 Nov 2003 Posts: 65 Location: Cambridgeshire, UK
|
You can set the JText adapter to read from binary files.
A snippet from the guide for the Meta Object for the Jtext adapter:
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/jtext/jtextxp_27.htm
Quote: |
DataProcessing Mode
This attribute provides new flexibility for reading and writing binary files. When set to Binary, this MO property enables JText to read and write binary files from the file system while calling the appropriate data handler interface for BO to byte array and vice versa transformations. The traditional setting for this is Text. In Text mode, the BO to String and vice versa data handler interface is used. When the property is not set, it defaults to Text. Binary mode should only be used with a data handler that appropriately implements the getBO(byte[]) and getByteArrayFromBO() methods. |
The last sentence caught my attention, so with this flag set, you need a data handler that correctly takes the byet array and transforms it into a BO, and vice versa.
If you got the custom route (which may be your only option) then make sure your java guys know what methods are required, and how to extract the data required for configuration from the meta object.
Finally, as one last shot, try the complex data handler that is built to handle all sorts of data. If you're lucky, what you're trying to parse is already supported.
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbia_developer.doc/doc/data_handler/datahand47.htm |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|