ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using Java nodes to FTP...

Post new topic  Reply to topic
 Using Java nodes to FTP... « View previous topic :: View next topic » 
Author Message
UnclDanMan
PostPosted: Tue Jul 25, 2006 8:42 am    Post subject: Using Java nodes to FTP... Reply with quote

Newbie

Joined: 25 Jul 2006
Posts: 6

Hi all,

I've read some posts about using IA0X and the JText Adapter and File Extender nodes to do FTP.

I wonder - Has anybody tried to use straight up Java code in a Java compute node to ftp a "message" out as a file?

Does that work? Are there any reasons to do that or not do that?

--Daniel
_________________
--Daniel Max Kestin
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 25, 2006 8:50 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It works. There used to be an FTP Send node that was built like that, I think.

You're probably better off isolating your broker flows from the vaguaries of business partner connectivity, though. I'd tend to use an external file transfer tool, and only use this to pass files TO that external file transfer tool.

Or use such a tool that can read from queues.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
UnclDanMan
PostPosted: Tue Jul 25, 2006 8:54 am    Post subject: Not for a business partner - for a local app Reply with quote

Newbie

Joined: 25 Jul 2006
Posts: 6

Thanks for that.
This wouldn't be for a business partner.
It's for a local application - which we cannot modify - which only takes input by file...

So it wouldn't be appropriate to use an external tool like WPG/WBIC.
It's either broker writing the file out and ftp'ing it OR we write it out to a queue and write another program that picks it up and FTPs it.
_________________
--Daniel Max Kestin
Back to top
View user's profile Send private message
ashoon
PostPosted: Tue Jul 25, 2006 10:48 am    Post subject: Re: Not for a business partner - for a local app Reply with quote

Master

Joined: 26 Oct 2004
Posts: 235

why not use MQ to transport across and then write that program to read messages to a local file-system (skipping the FTP)?

UnclDanMan wrote:
Thanks for that.
This wouldn't be for a business partner.
It's for a local application - which we cannot modify - which only takes input by file...

So it wouldn't be appropriate to use an external tool like WPG/WBIC.
It's either broker writing the file out and ftp'ing it OR we write it out to a queue and write another program that picks it up and FTPs it.
Back to top
View user's profile Send private message
UnclDanMan
PostPosted: Tue Jul 25, 2006 10:52 am    Post subject: Sounds logical - but there's one catch... Reply with quote

Newbie

Joined: 25 Jul 2006
Posts: 6

That would require a local queue manager on the destination host.

We could write an MQ Client on that box to pull stuff off the queue onto a file system...but I'd like to avoid writing extra bits of code to be maintained...

If we can do it all in broker, that'd be best (I think... feel free to convince me otherwise...)
_________________
--Daniel Max Kestin
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 25, 2006 12:06 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So, yes, it is possible to do this from a JCN or a Java plugin node.

You'll want to spend some time doing stress testing to make sure you understand how your code will work under the load you need.

And, of course, you'll need an FTP server on the remote end.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Tue Jul 25, 2006 10:50 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

We used the so called "FTP node" in one of our projects to read in and write out flat files. It even had a timer feature (as in timeout notification node in V 6) which was configurable with month,yr,day and time values.

It had also the feature in which once the file stream was read we could set MRM/XML params on the node to convert it into internal message structure as well.

Worked pretty neatly I must admit though the files were not very huge i must admit.

Regards,
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
elvis_gn
PostPosted: Tue Jul 25, 2006 11:15 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi all,

jbanoop wrote:
It had also the feature in which once the file stream was read we could set MRM/XML params on the node to convert it into internal message structure as well.

It could have done MRM/XML parsing but without validation i suppose....i'd been trying to get validation working using java for the past two weeks...dosen't work.

I would not suggest you pick files from remote and do read on it directly....rather move to a local directory in binary mode and then read locally....Remote read is a costly IO operation.

You should get the ftp classes from google itself...you just got to call the methods to fetch and put...

Regards.
Back to top
View user's profile Send private message Send e-mail
jbanoop
PostPosted: Wed Jul 26, 2006 12:14 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Elvis_gn,

From memory, the file was being read in as a bitstream byte[] and was parsed to the respective XML/MRM setting using
the method
public MbElement createElementAsLastChildFromBitstream(byte[]
bitstream,
String parserName,
String messageType,
String messageSet,
String messageFormat,
int encoding,
int ccsid,
int options)
throws MbException

I would think this would throw an MbException if the parse fails.. I dont remember and have not tried it nw, probably you have already tried this ..
Just thought i'd post the info though.

Regards,
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Using Java nodes to FTP...
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.