Results 1 to 10 of 10
Thread: Problem with pool connections
- 06-01-2011, 09:16 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 25
- Rep Power
- 0
- 06-01-2011, 09:58 PM #2
Member
- Join Date
- Apr 2010
- Posts
- 25
- Rep Power
- 0
I posted it in the wrong forum, that's why I am here posting it again.
- 06-02-2011, 09:38 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
And I answered in the other bit of the forum.
Don't you think it might have been an idea to refer to that somehow?
- 06-02-2011, 03:25 PM #4
Member
- Join Date
- Apr 2010
- Posts
- 25
- Rep Power
- 0
You are right, I haven't seen all of the message, I will close all connections in order to return it to connectionmanager.
Thanks a lot.
- 06-02-2011, 03:52 PM #5
Member
- Join Date
- Apr 2010
- Posts
- 25
- Rep Power
- 0
Problem with pool connections.
Imagine this situation: My application works as follows: we have a client who sends a request to the server, the server sends a request to another application owned by another company, when the server receives another's company checks it, if the answer is ok then the server inserts in own database. All of these in a thread but sometimes when the server is trying to insert in the database it lost the connection. I can't do a rollback in the other's company database. What can I do solve this problem ?
- 06-02-2011, 03:58 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Common problem.
What if you changed the order.
Insert into your db...while the transaction is open (not good I admit) call the other server to check for "ok". If not "ok" then rollback.
- 06-02-2011, 04:23 PM #7
Member
- Join Date
- Apr 2010
- Posts
- 25
- Rep Power
- 0
I thought in that way but I also need to store some information that is returned to the server from the other company, and it will need to do an update on the table.
- 06-02-2011, 04:28 PM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
OK.
Then all you can do is have the remote server provide a way to rewind a change.
Of course how easy that is entirely depends on what data changes that remote server is doing.
- 06-02-2011, 06:21 PM #9
Member
- Join Date
- Apr 2010
- Posts
- 25
- Rep Power
- 0
Unfortunately the other company said to us that they can't let us to execute rollbacks on their database, so I have some ideas in mind and the number one and which seems very good to me is to have a collection like an arraylist in which each item is an object with the info I want to insert and I couldn't. The collection in mind will be a static member of the class so every thread can access to it. What I want to do is check if the collection has items, if so insert those items in the database. What do you think about this method ?
- 06-02-2011, 06:32 PM #10
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Similar Threads
-
Help with pool connections
By juamd in forum Threads and SynchronizationReplies: 1Last Post: 06-01-2011, 06:02 PM -
DB Active connections
By userj2ee in forum Advanced JavaReplies: 0Last Post: 01-13-2011, 05:00 AM -
Are LAN only connections possible?
By paul pasciak in forum NetworkingReplies: 1Last Post: 10-01-2010, 02:55 AM -
Jdbc Connections closed..
By swati.jyoti in forum New To JavaReplies: 3Last Post: 05-20-2009, 10:45 AM -
Connections to data bases
By Albert in forum JDBCReplies: 1Last Post: 06-09-2007, 03:50 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks