On Nov 8, 11:36 pm, Sergi Vladykin <sergi.vlady...@gmail.com> wrote: > > The main reason is that those connections are configured basing on > > data received from a client (databaseName, user, password) while we > > already have pre-configured connections pointing to a proper database > > used by application. > > May be you should configure your clients properly instead of PgServer? > > Of course you can prepare the patch, > seehttp://h2database.com/html/build.html#providing_patches > but anyways in my view PgServer should not use DataSource directly, it > should be some kind of connection factory interface and its default > implementation should do just that PgServerThread does now to create > new connection. In implementation for your application then you can > wrap DataSource or get connections from anywhere you want.
Definitely, connection factory is something we are looking for and I was just thinking about DataSource as a standard interface used for such purposes. But we can also use approch you suggested creating the own interface for this. The use case we are trying to solve with PgServer is exposing our application DB via ODBC and relying on client configuration might be not safe in our case. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to h2-datab...@googlegroups.com. To unsubscribe from this group, send email to h2-database+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.