Shared connection or individual connection?
Posted by: newbie Shai
Date: March 08, 2012 11:49PM

Dear All,
I would like to ask your opinion on this. We have a java socket application which will keep receiving data from devices then each data will go through numerous different sql query selects, inserts and updates. The problem now we are looking into two solution
Send
1.Solution 1
For the socket connection build one thread and read the data and enqueue. Thenan other thread called is the dbprocessor to dequeue the data and do the processing of the different sql queries. The dbprocessor thread will just share on db connection for all messages being processed.

2. Solution 2.
The socket connection and both db processor are all in one single thread. For each socket connection open one db connection and keep processing the sql queries for each input data and finally close the db connection.

So which one is advice the share connection or each single d/b connection. We are using the share connection but at times the queue size becomes big and that worries us.

Options: ReplyQuote


Subject
Written By
Posted
Shared connection or individual connection?
March 08, 2012 11:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.