Results 1 to 10 of 10
  1. #1
    juamd is offline Member
    Join Date
    Apr 2010
    Posts
    25
    Rep Power
    0

    Default Problem with pool connections

    Hi !!!


    I have an application with which creates a pool connections using OracleConnectionManager and OracleDataSource. I wonder if I have to close the connections or OracleConnectionManeger does it for me.

    Thanks a lot.

  2. #2
    juamd is offline Member
    Join Date
    Apr 2010
    Posts
    25
    Rep Power
    0

    Default

    I posted it in the wrong forum, that's why I am here posting it again.

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    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?

  4. #4
    juamd is offline Member
    Join Date
    Apr 2010
    Posts
    25
    Rep Power
    0

    Default

    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.

  5. #5
    juamd is offline Member
    Join Date
    Apr 2010
    Posts
    25
    Rep Power
    0

    Default 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 ?

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    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.

  7. #7
    juamd is offline Member
    Join Date
    Apr 2010
    Posts
    25
    Rep Power
    0

    Default

    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.

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    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.

  9. #9
    juamd is offline Member
    Join Date
    Apr 2010
    Posts
    25
    Rep Power
    0

    Default

    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 ?

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    Since I have no idea what exactly it is you're doing I really can't advise you.
    This is an architectural problem to some extent, and so requires a good knowledge of the ins and outs of your architecture...which is simply not going to happen on a website forum.

Similar Threads

  1. Help with pool connections
    By juamd in forum Threads and Synchronization
    Replies: 1
    Last Post: 06-01-2011, 07:02 PM
  2. DB Active connections
    By userj2ee in forum Advanced Java
    Replies: 0
    Last Post: 01-13-2011, 06:00 AM
  3. Are LAN only connections possible?
    By paul pasciak in forum Networking
    Replies: 1
    Last Post: 10-01-2010, 03:55 AM
  4. Jdbc Connections closed..
    By swati.jyoti in forum New To Java
    Replies: 3
    Last Post: 05-20-2009, 11:45 AM
  5. Connections to data bases
    By Albert in forum JDBC
    Replies: 1
    Last Post: 06-09-2007, 04:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •