Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java (Front End), Informix (Back End)

Status
Not open for further replies.

ttkong

Programmer
Jun 5, 2002
22
MY
Hi all,

1) We have application written in Informix 4GL but we web-enable the application by re-writing the front end interface using JAVA and leaving the business logic in 4GL. Is there better way to perform the interaction between Java and Informix 4GL?

2) On top of that, the Java front-end will capture the user input and calling "fglgo <4glprogram>" by passing parameters to 4gl program. However, the user can not cancel the 4GL process as the communication between Java (front end) and 4GL (back end) is already disconnected. Can anyone help?

Thank you.

Regards,
TTKong
 
There are several thoughts - One way of passing messages back and forth between java and informix is to use an informix table as a message stack. I assume that you are using java's runtime exec method to spawn the fglgo function. Passing some kind of unique identifier to the fglgo and then using that as a key to access the table. That way you can JDBC information to the table and accept it back again. Your 4gl can periodically pole the table to see if a cancel has been issued.

The process class also has a destroy method.

Another thought is to directly link your java and informix using JNI, though this is a tricky process and you may have problems with Java being inherently multi threaded and informix 4gl being single threaded - also you have to go through the pain of creating custom runners and shared objects.

Using somekind of client/server architecture is also an option - communicate using CORBA or shared memory (If the processes are running on the same box - Also tricky to accomplish - more custom runners and shared objects
 
Hi MarkTyrer,

Thanks for your valuable input. I am now trying the 1st option, but thinking how to include the 4GL code for table verification (to know whether process has been cancelled by user). Is there any special 4GL command to verify the table and terminate 4gl process directly instead of writing code manually to verify table regularly within a selected process loop.

Regards,
TTKong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top