Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: OCCI Connection Pool on Oracle RAC

Re: OCCI Connection Pool on Oracle RAC

From: Joe Weinstein <joeNOSPAM_at_bea.com>
Date: Tue, 27 Sep 2005 07:58:53 -0700
Message-ID: <43395E2D.8020401@bea.com>

jose_luis_fdez_diaz_news_at_yahoo.es wrote:

> Hi,
>
> In a OCCI program I use a connection pool to connect to a Oracle RAC
> with two instances:
>
> . . .
> if ( env_general == NULL )
> {
> //env_general =
> Environment::createEnvironment(Environment::OBJECT);
> env_general =
> Environment::createEnvironment(Environment::THREADED_MUTEXED);
> }
> if (connPool_general == NULL)
> connPool_general = env_general->createConnectionPool(poolUserName,
> poolPassword,
> connectString, minConn, maxConn, incrConn);
> . . .
>
>
> I connect with:
>
> conn = connPool_general->createConnection (user, passwd);
>
>
>
> When there is a instance change I loss the connection. Is it a Oracle
> configuration problem or must I resume the connection calling
> "terminateConnectionPool" and "createConnectionPool" again ?

Hi. After a RAC failover, all existing connections are dead. Yes you have to remake connections at that time. If your application is read-only, you *might* consider TAF (which tries to automatically reconnect connections), but if you do any transactional stuff or if the data is changing, you may have problems with TAF, and should just reconnect. Here is a link to Oracle docs that describe the limitations of TAF that make it less than it appears to be at first:

(http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=97926.1)

Joe Weinstein at BEA Systems

>
>
>
> Thanks in advance,
> Jose Luis
>
Received on Tue Sep 27 2005 - 09:58:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US