Thank you, I will look at hibernate and c3p0... But actually I already have a "pool manager" - in the form of pgbouncer in front of my PostgreSQL server
Regards Alex On Sat, Jun 4, 2016 at 10:02 PM, Steve Sobol - Lobos Studios < [email protected]> wrote: > Are you sure you wouldn't prefer to use a connection manager of some sort? > > I use Hibernate and c3p0 on my J2EE projects. c3p0 or something similar > might work well for you. > > > ------ Original Message ------ > From: "Alexander Farber" <[email protected]> > > I am working on a word game, moving it > from AJAX/PHP to Websockets/Jetty. > Most of code is in stored procedures for PostgreSQL anyway. > > Being a Servlets and JDBC newbie I have a question please: > > If you would have a custom WebSocketHandler like > > https://github.com/afarber/jetty-newbie/blob/master/WebsocketHandler/src/main/java/de/afarber/MyHandler.java > > And a custom WebSocketListener similar to > > https://github.com/afarber/jetty-newbie/blob/master/WebsocketHandler/src/main/java/de/afarber/MyListener.java > > where would you be opening JDBC connection? > > I.e. where would you call code like > > Connection conn = DriverManager.getConnection("jdbc:postgresql:// > 127.0.0.1/", props); > > so that you could use it in onWebSocketConnect and onWebSocketText? > > Maybe there is even some 3rd object in > Jetty life cycle which would suit well? > >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
