users@glassfish.java.net

Re: JDBC connection in failover

From: Sreeram Duvur <Sreeram.Duvur_at_Sun.COM>
Date: Fri, 06 Jun 2008 08:47:51 -0700

On Jun 6, 2008, at 3:05 AM, 真嶌 晋 wrote:

>
> Hello Forks,
>
> I wonder how GF works about JDBC connection in failover.
>
> When I configure clusters and one instance fails how GF acts
> concerning with JDBC.
> I mean JDBC connection on failed instance is copied to another
> instance.
> Does anyone answer my question ?
>
> Thanks in advance,
>
> Susumu Majima
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>


The requests failover to a new instance in cluster. If the request is
configured for automatic retry it is retried by the load balancer
(which also handles failover).

Any JDBC connections held on failed instance are lost and re-
established when the request is re-issued. It is not possible to
really carry over JDBC connection from the failed instance. The new
instance will have an identical pool so the application will failover
smoothly.

Any simple transactions in flight are also reset by the database. If
there were any 2 Phase-Commit transactions, they are recovered by
another instance in cluster.

HTH

Sreeram