ClassNotFoundException Using shared/classes

2004-01-14 Thread Mike Miller
I just wanted to post this info so that other users don't make the same
mistake I made.I was attempting to use the
catalina_home/shared/classes for some shared class files and was getting
ClassNotFoundException.   When I copied those files to the
catalina_home/common/classes directory everything worked fine.   I
finally found the issue, which I didn't see documented anywhere:   I
created my myweb.xml file by copying either the admin.xml or
manager.xml.  The problem is that those files contain privileged="true".
Once I reset that to false (or removed the parm), I was able to load the
classes in shared/classes.






Options to prevent web app from being available if DB not available?

2005-09-26 Thread Mike Miller
Hi, 

I am looking for options to prevent my web application from being
available if our database is not available. I've used context listeners
in the past, but since you can return a bad return code they don't like
the cleanest approach.  

 

I have tried registering a context listener and then throwing a
RuntimeException if the database is not available but that seems like a
kludge.

Any other options?

 

Thanks in advance,

Mike



RE: Options to prevent web app from being available if DB not available?

2005-09-26 Thread Mike Miller
Thanks for the replies - several suggested filters.  I guess I have two
concerns with that approach:

1) Since this doesn't happen very often, I'm not sure I want to add
additional processing to EVERY request processed by the system.  I may
be wrong and it may not be much extra?

2) we have several servlets that are init'd in a specific order.  If the
database is not available, I don't even want them to be called.  If I
used a filter, I guess I could just configure the same filter to each
servlet...


-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 26, 2005 1:22 PM
To: Tomcat Users List
Subject: Re: Options to prevent web app from being available if DB not
available?

Servlet filter.

The filter can check the database status on init. Then the filter could
be 
made smart enough to let all traffic through if the database comes back
to 
life. (or conversely also goes away)

-Tim

Mike Miller wrote:

> Hi, 
> 
> I am looking for options to prevent my web application from being
> available if our database is not available. I've used context
listeners
> in the past, but since you can return a bad return code they don't
like
> the cleanest approach.  
> 
>  
> 
> I have tried registering a context listener and then throwing a
> RuntimeException if the database is not available but that seems like
a
> kludge.
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]