Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Glenn Holmer wrote: > a) DB trigger on the '400 that wakes up when the record is changed and > calls a Java program (also on the '400), passing the needed parameters > as arguments to main(); the Java program uses JDBC to update the > Postgres database on the Linux server. Pro: probably easy to set up, > Con: new process spawned for each write. IIRC: The DB trigger runs in the job that causes the trigger to fire, so a new process is not created. To make this process light-weight ... you could have the trigger send some basic information to a dataqueue ... and then have your java program watch the dataqueue. > b) A Java program that runs all the time and listens for changes on the > AS/400 database using something like FileListener from the JT400 > toolbox (haven't researched this yet); he would do the same as a). > Pro: single program, Con: don't know if it's possible. FileListener events fire when an operation occurs to the FILE, not a record in the file. Although you might be able to use watch for FileEvent.FILE_MODIFIED type events, I'm not sure that will give you the information you are looking for (FILE_MODIFIED may only be indicated when the file object is changed, not when a record is modified). Mind you, I've never played with this, so I'm not sure about anything. david
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.