dev@glassfish.java.net

migration: weblogic -> glassfish : multiconnection pool and multi data sources

From: Sreeram Duvur <Sreeram.Duvur_at_Sun.COM>
Date: Mon, 19 Nov 2007 21:48:06 -0800

> GlassFish has 1:1 jdbc-resource-> jdbc-connection-pool mapping. With
> clustered pool, it will be 1:* jdbc-resource-> multiple connection
> pools. This would help to provide load balancing and fail-over behavior.
>
IMO, the load balancing and failover do come with some assumptions that
are worth noting.

- load balancing works well with read only data. may be this is the
common use case?
- if writes load balanced across multiple data sources will cause data
inconsistency issues. write to one and read from another.
non-determinacy issues for applications.
- if failover occurs, user has to ensure that the new resource has all
the writes done to the previous resource

I wonder if Weblogic mirrors the writes to all databases to avoid
inconsistency issues? That could solve consistency issues. But one could
get into distributed transactions issue, where TM would have to deal
with two resources that actually represent one physical resource.
Solvable but complicated.

May be there are some nice use cases where this is perfect.

> AFAIK, multi datasource and multi pools will behave the same,
> difference being the way in which they are represented in configuration.
>
That was my conclusion too after a quick look.