Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / October 2003

Tip: Looking for answers? Try searching our database.

TOMCAT REALM dosn't work after DB was down

Thread view: 
Frank Hartel - 16 Oct 2003 20:25 GMT
Hello everybody,

I work with Tomcat 4.1.18 and an Oracle DB 8i. My JSP-Application needs
authentication via BASIC-Authentification.

Everytime when the database is halted an restarted again, the users can't
logon to my applicatons.
After restarting Tomcat everything works fine again.
I think that the JDBC-Realm of Tomcat is not able to reconnect to the
database.

Is that right?

What are my possibilities?
I want to run a failovercluster with a round-robin router, two hw-servers,
one Apache Web-Server running on each and 2 Tomcats on every hw-server,
session-replicated by javagroups.
So if the database was down, many processes have to be reactivated.

I would appreciate any help.
Best Regards

Frank

PGP: A0CD 6C7E 696D BEBC 5929  E7F6 2615 A61E 1988 9653

F@Hartel-Net.de
Paul Thomas - 17 Oct 2003 09:59 GMT
> Hello everybody,
>
[quoted text clipped - 7 lines]
>
> Is that right?

I think its because the jdbc connection which it creates to do the
suthentication is no longer valid and it doesn't have the logic to create
a new connection and try again. Connection pools have the same problem
under Tomcat. BTW, I've found that if you declare your JDBC realm within
your application context, simply restarting the application using
Tomcat's Manager application works.

Signature

Paul Thomas
+------------------------------+---------------------------------------------+

| Thomas Micro Systems Limited | Software Solutions for the Smaller Business |
| Computer Consultants         | http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+
X_AWemner_X - 23 Oct 2003 07:15 GMT
> I think its because the jdbc connection which it creates to do the
> suthentication is no longer valid and it doesn't have the logic to create
> a new connection and try again. Connection pools have the same problem
> under Tomcat.

Is it still so, that current releases of DBCP pooling cannot use "isAlive"
query to verify the connection and drop dead ones?

I think a proper pooling should have at least the following parameters:
isAliveQuery = Select * From Dual (or something else to run a simple query)
isAliveInterval=5 (run isalive every 5sec for acquired connections)

isAliveInterval can be used so that if connection instance is not being used
by clients within given interval, then isalive query is run on it. Dead
instance is dropped and new one created. This will avoid unnecessary isalive
queries if instances is taken from and put back to the pool with rapid
intervals. We will assume it still works if worked fine within last 5
seconds.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.