On 8/8/06, Steven Tomcavage <[EMAIL PROTECTED]> wrote:
I'd like to setup the connection pool to restrict the number of
simultaneous connections to be within our license. I'm rolling this
application out in the next month or so, so I don't have the option
of waiting.

Take a look at Jakarta Commons Pool: http://jakarta.apache.org/commons/pool/

That said, I considered object pooling way back when I started
developing with UOJ, and decided against it.  I haven't done any
profiling, but my feeling is that creating a connection is cheap
compared to opening files and reading records.

Trying to keep UniSessions connected, making sure they got cleaned up
properly, etc., was more trouble than it was worth.  I have a Factory
[1] that creates sessions, and I just close and discard them when I'm
done. YMMV -- my apps are not heavily used.

I'm now using the Spring framework, and letting it handle creating
sessions and injecting them into the objects that need them.

I'm also working on 'Spring UOJ' which (like Spring JDBC on which it's
based) uses the template method pattern to pull all of the exception
handling into the framework, and leave application code to concentrate
on calling subroutines and reading records.

Let me know if any of that sounds interesting...

[1] http://www.pickwiki.com/cgi-bin/wiki.pl?FailoverUniSessionFactory

--
Wendy
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to