Author |
Message
|
duhbaci |
Posted: Thu May 31, 2007 4:44 am Post subject: How to extend JText adapter? |
|
|
Newbie
Joined: 31 May 2007 Posts: 7
|
Hello everybody,
I am using JText adapter to read a text file. But I need an extra functionality on the adapter.
My text file is consists one header record, one footer record, one control record and many data records. What I want to do is to check these records before sending them to the queue. A simple example is checking the header record if the number of data records is matching or not. In case of a problem I will not process the text file.
I am using message broker to pick up messages delivered by JText. One option is handle all this extra functionality in broker. But this is not allowed by our system architecture :) I am also not allowed to develop an independent java program for this functionality, because of additional layer in the system etc. These are my limitations.
Do you have any suggestions about this?
Thanks for your help,
Koray |
|
Back to top |
|
 |
mvarghese |
Posted: Fri Jun 08, 2007 1:56 pm Post subject: |
|
|
Centurion
Joined: 27 Sep 2006 Posts: 141
|
If you are good in Java coding..write your own program to do the actvity as you want instead of using Jtext. _________________ Jain Varghese |
|
Back to top |
|
 |
vk |
Posted: Sun Jun 10, 2007 6:39 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Hi duhbaci,
The adapter cannot handle business rules like validating whether the number of detail records are matching the value in header record. It can only do data type validations.
Quote: |
One option is handle all this extra functionality in broker. But this is not allowed by our system architecture |
Can you tell why this is not allowed by your system architecture? The broker provides rich functionality for doing all business validations and it is ideal to do these in the broker.
Regards,
VK. |
|
Back to top |
|
 |
jbanoop |
Posted: Sun Jun 10, 2007 4:07 pm Post subject: |
|
|
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
|
I have personally executed a project which solely involved the activities like the ones mentioned above all using Message Broker (that too V 5).
The reading of the file and parsing it is pretty simple in itself. The complexities arise when FTP and such network related activities come into the picture. However it is very much doable using message broker facilities in most cases.
About system architecture .. I do not know..
Anoop |
|
Back to top |
|
 |
duhbaci |
Posted: Mon Jun 11, 2007 12:34 am Post subject: |
|
|
Newbie
Joined: 31 May 2007 Posts: 7
|
vk wrote: |
Can you tell why this is not allowed by your system architecture? The broker provides rich functionality for doing all business validations and it is ideal to do these in the broker.
Regards,
VK. |
Hi vk,
I am new in broker development(2 months) so I hope I am not saying something wrong :)
Current flows in our system is using File Extender nodes for file processing. In this case I have all the functionality that I need. But our project architect and other experienced developers are saying that File Extender has reliability issues, problems when debugging, and maintenance issues etc. Honestly, I have never used File Extender in a flow, so all I know is what they told to me. My first task was to use JText adapter to convert files to messages for broker.
This is the reason why they want to separate the file processing logic from broker and handle this task in an adapter.
Regards,
Koray |
|
Back to top |
|
 |
vk |
Posted: Mon Jun 11, 2007 8:17 am Post subject: |
|
|
Partisan
Joined: 20 Sep 2005 Posts: 302 Location: Houston
|
Quote: |
This is the reason why they want to separate the file processing logic from broker and handle this task in an adapter |
This is exactly what I mentioned earlier. Use the adapter for processing files. Use the broker for processing the data within the file.
The adapter just needs to pickup the file from the event directory, read the data within the file and pass it on to the broker. In the broker, you can have message flows to do all other validations you want to do with the file data before passing it on to the end application.
I am using BLOB data handler supportpac from IBM for reading the file data. I do not want the adapter to even validate the data type of fields within the file. We can handle all that through message sets defined in the broker.
I am sure that the broker can efficiently do all validations and transformations better than the adapter. But polling a directory for specific files and reading the data from the file is something for which the JText adapter is available.
Regards,
VK. |
|
Back to top |
|
 |
|