Re: RE??: live disable realm

2004-10-14 Thread QM
On Thu, Oct 14, 2004 at 03:26:04PM +0200, Boulay Arnaud wrote:
: QM, I agree with you that code MUST be clear,efficient and stable but a Realm can 
use and external resource (that's the aim ;-) and if that resource is "out of order", 
the webapp could automaticly switch to an another one and garantees a continued 
service.

I see your point; but I prefer to solve problems at their source.  =)
If a realm's resource is "out of order" then I see the code-level fix as
more of a bandage than a solution.

At least there's a choice in how to fix it.  Once again, Perl's motto of
TIMTOWDI holds true. 


-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE : live disable realm

2004-10-14 Thread Boulay Arnaud
Ok "merci beaucoup" Yoav !!!
QM, I agree with you that code MUST be clear,efficient and stable but a Realm can use 
and external resource (that's the aim ;-) and if that resource is "out of order", the 
webapp could automaticly switch to an another one and garantees a continued service.
Regards,
Arnaud

 Message d'origine 
De: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Date: jeu. 14/10/2004 14:56 
Ã: Tomcat Users List 
    Cc: 
    Objet: RE: live disable realm




Hi,

>On Thu, Oct 14, 2004 at 11:14:52AM +0200, Boulay Arnaud wrote:
>: My webapp is defined with a realm X.
>: When the webapp starts, the realm is not available (break down
somewhere
>...).
>: How can I dynamicly say to my webapp to use the realm Y without
change
>the Context declaration ?
>
>I don't think this is possible.

It's possible.  You'd have to write a bit of Tomcat-specific code,
namely:

- Walk down the container hierarchy to your Context,
- Create and initialize your new Realm (Realm Y in the above text)
- Call YourContext.setRealm(Realm Y)
- Et voila...

But as I said, the code is Tomcat-specific.  It also has to reside in
common/lib or common/classes, not WEB-INF/lib or WEB-INF/classes.  And
it might be that you need to set privileged="true" in your Context
declaration for this to work.

Yoav



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary and/or 
privileged.  This e-mail is intended only for the individual(s) to whom it is 
addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  
If you are not the(an) intended recipient, please immediately delete this e-mail from 
your computer system and notify the sender.  Thank you.


-
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]

RE: live disable realm

2004-10-14 Thread Shapira, Yoav

Hi,

>On Thu, Oct 14, 2004 at 11:14:52AM +0200, Boulay Arnaud wrote:
>: My webapp is defined with a realm X.
>: When the webapp starts, the realm is not available (break down
somewhere
>...).
>: How can I dynamicly say to my webapp to use the realm Y without
change
>the Context declaration ?
>
>I don't think this is possible.

It's possible.  You'd have to write a bit of Tomcat-specific code,
namely:

- Walk down the container hierarchy to your Context,
- Create and initialize your new Realm (Realm Y in the above text)
- Call YourContext.setRealm(Realm Y)
- Et voila...

But as I said, the code is Tomcat-specific.  It also has to reside in
common/lib or common/classes, not WEB-INF/lib or WEB-INF/classes.  And
it might be that you need to set privileged="true" in your Context
declaration for this to work.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: live disable realm

2004-10-14 Thread QM
On Thu, Oct 14, 2004 at 11:14:52AM +0200, Boulay Arnaud wrote:
: My webapp is defined with a realm X.
: When the webapp starts, the realm is not available (break down somewhere ...).
: How can I dynamicly say to my webapp to use the realm Y without change the Context 
declaration ?

I don't think this is possible.

Let's look at the root cause: why is Realm X not available on app
startup?  You may have to make your Realm source more robust, e.g. look
into failover/clustering/etc.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



live disable realm

2004-10-14 Thread Boulay Arnaud
Hello !
I'd like to solve this problem :
My webapp is defined with a realm X.
When the webapp starts, the realm is not available (break down somewhere ...).
How can I dynamicly say to my webapp to use the realm Y without change the Context 
declaration ?
Thank.,
regards,
Arnaud