[Sparql4j-devel] Design issue: connection management and pooling
Status: Pre-Alpha
Brought to you by:
jsaarela
From: Janne S. <jan...@pr...> - 2005-11-15 12:28:12
|
Hi all Can I have some of your cpu time for thinking how we should manage connection objects in sparql4j project? As sparql currently does not support state management (cursors or anything of the sort), there is no need to manage state in the Connection object internally. How the connections are passed between Driver, Connection and Statement (or PreparedStatement) classes is something we should design right so that eventual state management would be easier to add in the future. I am thinking that the Driver.getConnection() method could return nothing but a Connection object which internally manages HTTP connections to SPARQL servers. Once a (Prepared)Statement.execute() method (or variants of it) is executed, the actual protocol call is created within the Connection object. This would centralize HTTP code management to the Connection class leaving room for internal connection pool management if HTTP connections were e.g. persisted and left open for future calls. I don't see a reason to pool Connection objects in the Driver level at this time. Janne -- Janne Saarela <janne.saarela at profium.com> Profium, Lars Sonckin kaari 12, 02600 Espoo, Finland Internet: http://www.profium.com |