Changes between Version 1 and Version 2 of DatabaseConnectionsForThreadsAndNewPool


Ignore:
Timestamp:
01/31/11 23:14:13 (14 years ago)
Author:
simonp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DatabaseConnectionsForThreadsAndNewPool

    v1 v2  
    1010== Overview ==
    1111
    12 Database connections (jeeves/src/main/java/jeeves/resources/dbms/Dbms.java) in Jeeves are handled by a ResourceManager (jeeves/src/main/java/jeeves/server/resources/ResourceManager.java) and pooled by a ResourceProvider (jeeves/src/main/java/jeeves/resources/dbms/DbmsPool.java).
     12Database connections (jeeves/src/main/java/jeeves/resources/dbms/Dbms.java) in Jeeves are handled by a !ResourceManager (jeeves/src/main/java/jeeves/server/resources/ResourceManager.java) and pooled by a !ResourceProvider (jeeves/src/main/java/jeeves/resources/dbms/DbmsPool.java).
    1313
    1414A jeeves service that needs a database connection will typically open one using a call like:
     
    1616Dbms dbms = (Dbms) context.getResourceManager().open(Geonet.Res.MAIN_DB);
    1717
    18 This can be done any number of times by methods called by the service. As each Dbms object is opened the ResourceManager keeps a reference to it in an internal hashtable.
     18This can be done any number of times by methods called by the service. As each Dbms object is opened the !ResourceManager keeps a reference to it in an internal hashtable.
    1919
    2020If the service completes without exception, all database connections are closed by Jeeves using context.getResourceManager().close() or if there is an exception raised context.getResourceManager().abort()
     
    2222However there is a need for threads that want a database connection to obtain a connection and hold that connection open even though the service that started the thread may have closed.
    2323
    24 This proposal will add the following calls to the ResourceManager to support threads that need a database connection in GeoNetwork/Jeeves:
     24This proposal will add the following calls to the !ResourceManager to support threads that need a database connection in GeoNetwork/Jeeves:
    2525
    2626* openDirect(): essentially does the same as open but does not keep a reference to the Dbms resource in the ResourceManager hashtable