You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ian Zabel <ia...@ezabel.com> on 2008/09/24 17:58:48 UTC

Shutting down Connection Pool at runtime (for maintenance)

Very soon we're releasing our first build of our legacy app using
iBATIS! We've converted about 10% of our legacy SQL to iBATIS so far,
and it's really working great. Things are 15-30% faster compared to
our old framework (homegrown SOAP server for all data access).

We're using iBATIS with Tomcat 5.5 and DBCP over JNDI.

Every Sunday our Oracle DB is backed up cold. This means that all
connections to the DB must be closed. During this backup, our SOAP
server is shutdown. Now that we're moving forward with iBATIS, we have
another connection pool that we have to manage. This will eventually
become the only connection pool as we phase out the SOAP server.
However, during this cold backup, we would prefer to keep the Tomcat
server running so as to avoid losing all of our in-memory caches.

So, the question: Is it possible to somehow shutdown DBCP (or close
all of its connections) for a time while the backup occurs, yet leave
Tomcat running? And, after the backup is finished, start it back up?

Of course, the application would be inaccessible during this backup;
but that's how it's always been. I can't find anything on Tomcat,
DBCP, or iBATIS mailing lists that really discuss this issue, which of
course makes me question if we're doing this right.

Any thoughts?
Thanks,
Ian.

Re: Shutting down Connection Pool at runtime (for maintenance)

Posted by Jason Kratz <ja...@firm58.com>.
Just one last note on the backup procedures.  Make sure that whomever is 
responsible for that backup understands that you're going to lose any 
data between backups should a problem occur.   Are you willing to lose a 
full day's worth of data?    If it's a production database you shouldn't 
be running in noarchivelog mode (ie: closed backups).   You'll be able 
to recover far more data in archivelog mode where you can apply archived 
log files to your last backup.

Jason

Ian Zabel wrote:
> Quick update on this: We've found that we're able to shutdown and
> restart the database at will, and DBCP is able to recover connections
> once the database is back up. So for now, we do not need to restart
> our app servers, and there's no immediate need to change the backup
> procedures.
>
> We're looking into the suggestions offered, however. Thanks for the thoughts!
>
> Ian.
>
> On Wed, Sep 24, 2008 at 11:58 AM, Ian Zabel <ia...@ezabel.com> wrote:
>   
>> Very soon we're releasing our first build of our legacy app using
>> iBATIS! We've converted about 10% of our legacy SQL to iBATIS so far,
>> and it's really working great. Things are 15-30% faster compared to
>> our old framework (homegrown SOAP server for all data access).
>>
>> We're using iBATIS with Tomcat 5.5 and DBCP over JNDI.
>>
>> Every Sunday our Oracle DB is backed up cold. This means that all
>> connections to the DB must be closed. During this backup, our SOAP
>> server is shutdown. Now that we're moving forward with iBATIS, we have
>> another connection pool that we have to manage. This will eventually
>> become the only connection pool as we phase out the SOAP server.
>> However, during this cold backup, we would prefer to keep the Tomcat
>> server running so as to avoid losing all of our in-memory caches.
>>
>> So, the question: Is it possible to somehow shutdown DBCP (or close
>> all of its connections) for a time while the backup occurs, yet leave
>> Tomcat running? And, after the backup is finished, start it back up?
>>
>> Of course, the application would be inaccessible during this backup;
>> but that's how it's always been. I can't find anything on Tomcat,
>> DBCP, or iBATIS mailing lists that really discuss this issue, which of
>> course makes me question if we're doing this right.
>>
>> Any thoughts?
>> Thanks,
>> Ian.
>>
>>     


Re: Shutting down Connection Pool at runtime (for maintenance)

Posted by Ian Zabel <ia...@ezabel.com>.
Quick update on this: We've found that we're able to shutdown and
restart the database at will, and DBCP is able to recover connections
once the database is back up. So for now, we do not need to restart
our app servers, and there's no immediate need to change the backup
procedures.

We're looking into the suggestions offered, however. Thanks for the thoughts!

Ian.

On Wed, Sep 24, 2008 at 11:58 AM, Ian Zabel <ia...@ezabel.com> wrote:
> Very soon we're releasing our first build of our legacy app using
> iBATIS! We've converted about 10% of our legacy SQL to iBATIS so far,
> and it's really working great. Things are 15-30% faster compared to
> our old framework (homegrown SOAP server for all data access).
>
> We're using iBATIS with Tomcat 5.5 and DBCP over JNDI.
>
> Every Sunday our Oracle DB is backed up cold. This means that all
> connections to the DB must be closed. During this backup, our SOAP
> server is shutdown. Now that we're moving forward with iBATIS, we have
> another connection pool that we have to manage. This will eventually
> become the only connection pool as we phase out the SOAP server.
> However, during this cold backup, we would prefer to keep the Tomcat
> server running so as to avoid losing all of our in-memory caches.
>
> So, the question: Is it possible to somehow shutdown DBCP (or close
> all of its connections) for a time while the backup occurs, yet leave
> Tomcat running? And, after the backup is finished, start it back up?
>
> Of course, the application would be inaccessible during this backup;
> but that's how it's always been. I can't find anything on Tomcat,
> DBCP, or iBATIS mailing lists that really discuss this issue, which of
> course makes me question if we're doing this right.
>
> Any thoughts?
> Thanks,
> Ian.
>