|
From: David K. <dav...@al...> - 2003-09-05 12:09:43
|
Hi! I'm currently using Babeldoc (tracking CVS HEAD) to build a small newsfeed integration app for my company, where we will receive realtime news in xml format via ftp to our servers. First: I reeeeally like Babeldoc! Nice work, people! I am having a slight problem with the DirectoryScanner as it is implemented right now. It uses a static IConfigInfo, which means that I cannot define two instances with separate config for each in my scanner/config.properties, since one of the config blocks ends up being applied to and used by both of the scanner workers. My solution right now is to do this: public final IConfigInfo scannerInfo = new ...; instead of this: public static final IConfigInfo scannerInfo = new ...; in the DirectoryScanner (only scanner I currently use), which seems to work nicely. Also, when checking the other scanner implementations, the only one having an IConfigInfo member that is *not* static is the SqlScanner. It seems to me that every scanner needing configuration data should have a non-static IConfigInfo member rather than a static one? Also, I have put together two very simple pipeline stages: - SqlPreparedWriter; similar to the SqlWriter but it supports enumerating each parameter to go into the query, and then uses PreparedStatement.setFoo(index, ...) to set it. I had to do this to be able to properly escape large text blocks which may or may not contain embedded html into the database, which in this case is MySQL. I failed to make the SqlWriter do this without MySQL balking at the input. - FileTransfer; very simple stage to move data from one stream to another. In my case I use this to stream associated files via http from the news provider's website to the filesystem on our servers, based on links embedded in the news xml. It is required for us to know if any transfer failed as well as recording where the transfered files ended up in the filesystem and add this information to the master news xml document before final processing and insertion into the target database via the stage above. Works somewhat like a FileReader directly piped to a FileWriter without affecting the master document and still providing feedback (status) to it. If there is any interest in the above (very simple!) stages, I would be happy to submit them for inclusion and refinement into Babeldoc proper. Oh, if the devel list is not the proper place for posts like this, I apologize. I haven't seen any traffic at all on the users list so... Best regards, David Kinnvall |