I may be able to use setConnectTimeOut method.

Next question: Is CAS service supported by java.net.URL?
I will google and see after getting some sleep, but in the meantime, if someone 
knows the answer and volunteers, that would save my day! (I mean night)

Thanks.


--- On Wed, 2012/4/4, s4...@yahoo.co.jp <s4...@yahoo.co.jp> wrote:

Somesh:
Thank you for the tip.
 
Yes, it worked. I was able to intercept the web-flow before reaching the 
end-state.
I used java (checkDeadOrAlive) to check whether the server is alive or not. 

if (HttpURLConnection) url.openConnection().getResponseCode() == 200) { 
   //is alive
 
Now my next move is how to determine "quickly" if the server is not available.
It took about 15 seconds, which needs to come down to some acceptable value 
(may be 5/6/7 seconds?).
 
Cheers.
 
 
 

--- On Tue, 2012/4/3, Somesh Kumar <someshku...@gmail.com> wrote:



you can create a decision state and based on the result redirect the flow to a 
different state or end state

for eg 
 <decision-state id="endStateDec">
         <if test="flowScope.serverUP == 'yes'" then ="some state"/>
         <if test="flowScope.serverDown == 'no'" then ="some other state"/>
     </decision-state>     


~s.


On Mon, Apr 2, 2012 at 3:00 PM, <s4...@yahoo.co.jp> wrote:






Hi All,
I want to intercept the spring web flow before it reaches the end-state. 
Because, when I am at the end-state, and when the authenticating server down, I 
am stuck there, waiting for the timeout. 
 
My requirement is that if one of the servers is down, go to the other one and 
check, and if that is down as well, then ask the user to get authenticated 
locally (that is, show a login page)
 
So, I registered two parentCAS server urls in the flow registry.(see previous 
mail-- also included down below)
 
Now, let's say the first url is inquired, and the control arrives at the 
end-state.
 
But before that, let's assume I devised a contraption, like:
 
<action-state id="interceptHere">
  <evaluate expression="checkDeadOrAlive(flowRequestContext)" />
        <transition on="seemsAlive" to="proceedToEndState" />
        <transition on="dead" to="goToThe2ndItemOfTheFlowRegistry" /> 
 </action-state>
 
I can write a java class to check whether a server is online or offline, and 
return "seemsAlive" or "dead"accordingly.
 
My problem is how to short-circuit the the rest of the flow (of the 1st url) 
and go to the beginning of the 2nd  url in case the 1st url is down.
 
Please share some thoughts!
 
Thanks.
 
 
 
 
 


--- On Fri, 2012/3/30, s4...@yahoo.co.jp <s4...@yahoo.co.jp> wrote:







Marvin,

https://issues.jasig.org/browse/CAS-993 talked about hanging authentication. 
handler.
The "hanging" part is similar to my case.

https://issues.jasig.org/browse/CAS-994 also talks about "monitoring".
But they were no help to me.



--- On Fri, 2012/3/30, s4...@yahoo.co.jp <s4...@yahoo.co.jp> wrote:








Marvin:
(1)I have registered 3 webflows in "flowRegistry" in the file cas-servlet.xml, 
which I "believe" call them one by one. Each webflow tries to check with a 
parentCAS whether the user has been authenticated or not.
 
<webflow:flow-registry id="flowRegistry" flow-builder-services="builder">
        <webflow:flow-location path="/WEB-INF/login-webflow-parent1.xml" 
id="login_p1" />
......
</webflow:flow-registry>
 
Inside the "login-webflow-parent1.xml", after some branching off, I end up at 
the following "end-state":
 
<end-state id="serviceEndState" 
view="externalRedirect:contextRelative:/login?service=${flowScope.service.id}"/>
 
My unresponsive urlString looks just like that:
 
https://parentCAS1:8443/cas/login?service=https%3A%2F%2FchildCAS-server%3A8443%2Fcas%2Flogin_p1&gateway=true
 
 
When the parentCAS1 is up and running, and when the user has not been 
authenticated by the parentCAS1, another iteration takes place and this time it 
is "parentCAS2, ..login_p2.. etc.
 
When the parentCAS1 is down, control  is not passed to the caller, it remains 
with the "end-state".
 
It may well be that my login-webflows are incorrectly implemented. I mean, if 
there is no point of return from the end-state in case of server down, then I 
will need to learn to re-write the webflow, right? 
 
Or, may be there is yet another view which does the job when 
"externalRedirect:contextRelative:/login?service=${flowScope.service.id" is 
alive and kicking, but returns the control to its caller if not.
 
I am learning while trying to answer your questions, so it is helpful. Thank 
you for your contnued interest.
 
Cheers.
 
 
 
 
 
 

--- On Thu, 2012/3/29, Marvin S. Addison <marvin.addi...@gmail.com> wrote:



> I cannot get out from the situation when one of my casServerLoginUrl
> is down.... Elsewhere, I am checking some other casServers  (I have
> been calling them "parentCAS") and if all stakeholders are  up and
> running, and if no SSO is found, a login screen is shown (that's what
> I want!) , but I get stuck when one of the servers is down.

Could you clarify what behavior you would like when a CAS server is
unavailable?  Also, it's not clear whether the problem is related to the 
specific parent-child CAS architecture you've developed.  It would be helpful 
if you clarified where the cited configuration lives in the context of 
parent-child CAS if that's what you're talking about.

M

-- You are currently subscribed to cas-user@lists.jasig.org as: 
s4...@yahoo.co.jp
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user
-- 
You are currently subscribed to cas-user@lists.jasig.org as: s4...@yahoo.co.jp

To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user-- 
You are currently subscribed to cas-user@lists.jasig.org as: s4...@yahoo.co.jp

To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
someshku...@gmail.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user
-- 
You are
 currently subscribed to cas-user@lists.jasig.org as: s4...@yahoo.co.jp
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user
-- 
You are currently subscribed to cas-user@lists.jasig.org as: s4...@yahoo.co.jp
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user
-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to