geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: developing a server wide database connection plan for oracle
Date Thu, 08 Jun 2006 16:29:11 GMT
Wait, scratch that.

If you have a server-wide database pool, both applications should list
the pool as a parent just so they'll be able to find the pool for
resource references and stuff.  Then neither application needs the
Oracle JAR on its classpath -- they'll get it from the pool module's
class loader anyway.

My original answer would apply only if you're trying to *avoid* using
a server-wide database pool.

Thanks,
    Aaron

On 6/8/06, Aaron Mulder <ammulder@alumni.princeton.edu> wrote:
> I think you're OK having separate copies of the Oracle JAR loaded in
> separate applications.  I believe the problem with Derby is that it is
> (or can be) an in-memory database, and so different copies of the JAR
> in memory would have unexpected effects.  Oracle doesn't have the same
> issue.  So I think you could go either way -- create a common parent
> module with only the Oracle JAR on the classpath, or add the Oracle
> JAR separately to both applications.
>
> Thanks,
>      Aaron
>
> On 6/8/06, Lin Sun <linsun.unc@gmail.com> wrote:
> >
> >
> >
> >
> > Hi there,
> >
> >
> >
> > I am trying to understand the classloaders for database jdbc drivers in 1.1…
> > Here's the user scenario I have:  I had a server wide database connection
> > plan for my oracle database that works with Geronimo 1.0.  If I ran the
> > upgrader tool, I have the following in the plan:
> >
> >
> >
> >         <dep:dependencies>
> >
> >             <dep:dependency>
> >
> >                 <dep:groupId>oracle</dep:groupId>
> >
> >                 <dep:artifactId>classes12</dep:artifactId>
> >
> >                 <dep:version>10g</dep:version>
> >
> >                 <dep:type>jar</dep:type>
> >
> >             </dep:dependency>
> >
> >         </dep:dependencies>
> >
> >
> >
> > Since I ran into classloader problems with derby when I had derby jar as the
> > dependency (see my other post titled "unable to run a simple jsp
> > application"), is this the right approach for Oracle?   If I have 2
> > applications that both datasources require oracle classes12-10.jar as the
> > dependency would I run into similar classloader issue?  Or the datasource of
> > the second application should depend on the moduleId of the first
> > datasource?   This seems bad when I uninstall the first datasource.
> >
> >
> >
> > Please let me know what the best approach is.
> >
> >
> >
> > TIA, Lin
> >
> >
>

Mime
View raw message