users@glassfish.java.net

Re: JDBC configuration in a clustered glassfish

From: Andreas Loew <Andreas.Loew_at_oracle.com>
Date: Thu, 24 May 2012 20:16:34 +0200

Hi Hank,

Am 24.05.2012 17:47, schrieb Henning Verbeek:
> I'm trying to deploy a JEE app on two clusters managed by the same DAS
> (one cluster is a test-system, the other one is for
> integration-tests). Both clusters should use separate (MySQL-)DBs, but
> the app is accessing it via the same JNDI name.
>
> What I'm now learning is that JDBC connection pools and resources
> aren't cluster-specific configuration! They are in a kind of "global
> namespace" (anything that a DAS manages). Obviously I can create a
> reference into the relevant cluster-config, but I cannot specify the
> target JNDI name.
>
> My requirement (deploy the same app unchanged onto multiple clusters,
> managed by the same DAS, and have the container provide different DB
> connections to the clusters) seems not possible. It seems I need a
> second DAS. Is this correct?
you are completely correct that you will need a second DAS - and, IMHO,
for good reason:

A domain combines/groups a set of GF installations (i.e. standalone
managed servers and clusters) for a particular environment (a.k.a.
"domain"), such as (in its broadest definition), your production domain,
integration testing domain, unit testing and development domain - or
even smaller (sub)domains for particular (subsets of your) applications.

Hope this helps & best regards,

Andreas

-- 
Andreas Loew | Senior Java Architect
ORACLE Germany