From: | Adib Saikali <adib(dot)saikali(at)gmail(dot)com> |
---|---|
To: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: A new JDBC driver... |
Date: | 2013-03-14 10:14:20 |
Message-ID: | F7728560-77A9-4C29-B111-62672F9E3473@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I agree on the importance of avoiding conflicts with the class path for the application server. I think jarjar can easily solve such a problem by embedding the required third party libraries in the final jar file in such a way that conflicts with other versions of the same library does not arise https://code.google.com/p/jarjar/ . The spring framework uses jar jar to package internal versions of ASM and CGLIB, the org.springframework. package hierarchy
On 2013-03-14, at 12:56 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> On 03/12/2013 09:19 AM, Kevin Wooten wrote:
>>
>> * Asynchronous I/O engine provided by Netty
>> * All connections share a single group of worker threads
> That's going to cause serious issues on Java EE, especially when unloading applications. Since you're on JDBC4 you can have init and cleanup functions to manage the thread pool, but these are vital. I asked about this re PgJDBC quite some time ago and got some good information that's summarized here:
>
> http://stackoverflow.com/q/8514725/398670
>
> Failure to properly shut the thread pool down when a servlet or application is unloaded will cause classloader leaks, tending to lead to PermGenSpace exhaustion errors and other problems. The driver will probably need application-server-specific integration hooks too.
>
> As for the "multiple JARs" converns, it's trivial to bundle dependencies inside the JDBC driver jar. However, this can cause issues if there's an incompatible version of the same library elsewhere on the classpath. It's OK if you're on a modern application server like JBoss AS 7 that isolates classloader chains, but it can be a real problem on older platforms and standalone applications. For this reason both a rollup version of the jar and a version without bundled libraries would probably be needed, but this is trivial to produce from Maven.
>
> Overall I think this is an intriguing idea, whether it proves to be an ideas testbed or something that becomes appealing to adopt more seriously. Congratulations on tackling it.
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Florent Guillaume | 2013-03-14 11:03:18 | Re: A new JDBC driver... |
Previous Message | Craig Ringer | 2013-03-14 04:56:45 | Re: A new JDBC driver... |