|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JText adapter archiving files as zero byte, damaged. |
« View previous topic :: View next topic » |
Author |
Message
|
gotnoid |
Posted: Tue Sep 07, 2010 4:17 am Post subject: JText adapter archiving files as zero byte, damaged. |
|
|
Novice
Joined: 20 Nov 2008 Posts: 15
|
Hi,
I am trying to run some files through a message flow, here is the feed:
Java Splitter>>Jtext adapter>>MQ Input node>>....
The initial file is too huge for the JText adapter, so I use a java program to split the file into smaller chunks.
I have observed that, the adapter archives some files as <file name>.damage, when I go through the logs it says that the file was zero bytes. However the file in the archive has data in it.
I understand the possibility that the file might not have been written to by the time the adapter picked it up.
What I want to know is, how does the archived file have data in it?
what is the internal read mechanism of the JText adapter? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 07, 2010 4:28 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If this is really a question about the JText adapter, you probably should have put it in the Adapters forum rather than the Broker forum.
Regardless of that, however, you should really just get rid of the JText Adapter and upgrade to a version of broker that has a FileInput node.
Then you can probably even get rid of your Java Splitter. |
|
Back to top |
|
 |
gotnoid |
Posted: Tue Sep 07, 2010 6:50 am Post subject: |
|
|
Novice
Joined: 20 Nov 2008 Posts: 15
|
Hi,
sorry, I did see a forum named Websphere Interchange Server + Adapters. Do I need to post there?
Apart from that the java piece is being used to do some other validations along with the file splitting,
so coming back to my original question is there anyway to know the actual read mechanism of the JText adapter? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 07, 2010 6:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gotnoid wrote: |
sorry, I did see a forum named Websphere Interchange Server + Adapters. Do I need to post there? |
No, ask a moderator to move it for you.
So, what's that? You want me to move it then? Certainly.
Moved.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 07, 2010 7:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
This adapter is obsolete, and likely not supported at all.
You likely have no recourse to resolve this issue with the Adapter even if it *is* supported.
Any additional validation logic you are doing in the Java Splitter can be moved into the message flow that processes data being read by FileInput.
The most likely reason for this specific issue is that the file is being created with the final destination file name and then the contents of the file are being streamed into it. The JText adapter is then scanning the contents of the directory it has been asked to monitor, determining that there is a new file and immediately attempting to process it, in the interval of time between when the file was created with the final name and when the contents started being written to the file.
This is because both the JText Adapter and the code writing out the file are working under the misguided assumption that File operations are Transactional and that File Locks can be used reliably. Neither of these things are true in the general case.
If it is your Java Splitter code that is writing out these files, then you can adjust your Java code to write the file to a temporary name that the JText adapter will not match against, and then do a rename when you know the data has been written.
But that is still putting a bandage on a dead horse. |
|
Back to top |
|
 |
gotnoid |
Posted: Tue Sep 07, 2010 12:23 pm Post subject: |
|
|
Novice
Joined: 20 Nov 2008 Posts: 15
|
Thanks a lot Jeff, bandage on a dead horse, that is what it is.
Will use this as a temporary solution, before I make the shift to the file input node.
Thank you very much for the help guys. |
|
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
|
|
|
|