Re: Parallel Transactions
Posted in 2000
Topics: Java & JDBC Development
news You may want to open a pool of connections instead of 1 connection. That way you can assign a new thread to a client as it comes in and attach the client to a free connection in your pool. HTH Sujit "news.uswest.net" <jsnodgrass1@uswest.net> on 12/16/2000 01:07:00 PM Please respond to "news.uswest.net" <jsnodgrass1@uswest.net> To: informix-list@iiug.org cc: Subject: Parallel Transactions I am writing a "transaction manager" for Universe database which calls subroutines on behalf of multiple clients. I want to only open one session and then run all these subroutines and pass the data back to the clients. I am currently using Java Uni-objects for the connection and to call the subroutines. How do I run all these subroutines in parallel since they each have different run-times and keep straight which routine just finished running?
Sujit.Pal@bankofamerica.com wrote: > You may want to open a pool of connections instead of 1 connection. That way you > can assign a new thread to a client as it comes in and attach the client to a > free connection in your pool. Your suggestion makes sense in the classic Informix client/server type architecture, but doesn't really work in the U2 (UniVerse or UniData) worlds. There, the application and the database access code are all in the same process, rather like a C-ISAM application. So, the process is the connection. > "news.uswest.net" <jsnodgrass1@uswest.net> on 12/16/2000 01:07:00 PM > Please respond to "news.uswest.net" <jsnodgrass1@uswest.net> > > To: informix-list@iiug.org > Subject: Parallel Transactions > > I am writing a "transaction manager" for Universe database which calls > subroutines on behalf of multiple clients. I want to only open one session > and then run all these subroutines and pass the data back to the clients. I > am currently using Java Uni-objects for the connection and to call the > subroutines. How do I run all these subroutines in parallel since they each > have different run-times and keep straight which routine just finished > running? I'm not sure whether Data BASIC, which is used to write U2 applications, supports multi-threading. I don't think so, given what (little) I know about the RedBack Application Server which works with U2 databases. I think that having one session for all clients will not work. However, you should treat that as semi-informed opinion from someone who is not, by any stretch of my imagination, an expert in the U2 databases. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"