Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-14 Thread Martin Grigorov
Hi Stefan,

Can you share the code of this Border for others who may need something
similar ?
Thanks!


On Fri, Dec 14, 2012 at 8:41 PM, Stefan Renz  wrote:

> Hi,
>
> time to share -- after playing with the suggested solutions, I finally
> decided on implementing a Border: it basically hides its
> BorderBodyContainer if the service is not reachable. It shows an alert
> message instead, which is part of the Border. All this show/hide is done
> with behaviors attached to the BorderBodyContainer and alert message
> component.
>
> Thanks for your suggestions.
> Bye
> Stefan
>
>
> Stefan Renz wrote:
> > Hi,
> >
> > my searches didn't turn up anything, so I figured I ask on the mailing
> list:
> >
> > Consider the following scenario: a Page contains a number of Panels, one
> > of which displays data retrieved by a web service, typically by means of
> > LoadableDetachableModel or IDataProvider.
> >
> > In my case, the WebService used is a Hessian-Endpoint, which is
> > conveniently available to the caller as a Proxy of an Interface. Such an
> > interface doesn't expose any transport layer exceptions; rather, the
> > Proxy takes care of converting any underlying IOException, such as
> > ConnectException, into a RuntimeException.
> >
> > I would like to exchange the Panel with an error message panel saying
> > that the service is not available rather than showing an entire error
> > page (which is something we do for other kind of exceptions, thanks to
> > the fabulous Wicket framework).
> >
> > How could I achieve something like that? Something like this can happen
> > during rendering time, not necessarily in onInitialize(), where I could
> > do an alive check and exchange the panel.
> >
> > Where should I look? What would be your suggestions? Should I come up
> > with a Quickstart as an executable example (without the service -- just
> > any Exception from within a LoadableDetachableModel#load() will do
> nicely)?
> >
> > Thanks in advance,
> > bye
> > Stefan
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
>
> --
> im Auftrag der eFonds Solutions AG, +49-89-579494-3417
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-14 Thread Stefan Renz
Hi,

time to share -- after playing with the suggested solutions, I finally
decided on implementing a Border: it basically hides its
BorderBodyContainer if the service is not reachable. It shows an alert
message instead, which is part of the Border. All this show/hide is done
with behaviors attached to the BorderBodyContainer and alert message
component.

Thanks for your suggestions.
Bye
Stefan


Stefan Renz wrote:
> Hi,
> 
> my searches didn't turn up anything, so I figured I ask on the mailing list:
> 
> Consider the following scenario: a Page contains a number of Panels, one
> of which displays data retrieved by a web service, typically by means of
> LoadableDetachableModel or IDataProvider.
> 
> In my case, the WebService used is a Hessian-Endpoint, which is
> conveniently available to the caller as a Proxy of an Interface. Such an
> interface doesn't expose any transport layer exceptions; rather, the
> Proxy takes care of converting any underlying IOException, such as
> ConnectException, into a RuntimeException.
> 
> I would like to exchange the Panel with an error message panel saying
> that the service is not available rather than showing an entire error
> page (which is something we do for other kind of exceptions, thanks to
> the fabulous Wicket framework).
> 
> How could I achieve something like that? Something like this can happen
> during rendering time, not necessarily in onInitialize(), where I could
> do an alive check and exchange the panel.
> 
> Where should I look? What would be your suggestions? Should I come up
> with a Quickstart as an executable example (without the service -- just
> any Exception from within a LoadableDetachableModel#load() will do nicely)?
> 
> Thanks in advance,
> bye
> Stefan
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
im Auftrag der eFonds Solutions AG, +49-89-579494-3417


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Stefan Renz
heapifyman wrote:
> Maybe an AjaxLazyLoadPanel could help?
> I think you could catch service exceptions in getLazyLoadComponent() and
> return an error panel instead of the real one.

That probably makes sense in any case because one can never be sure that
the RPC-style call returns in acceptable time. That way, slow response
times of the service have some indication, too.

Thanks, bye
Stefan
> 
> 
> 2012/12/13 Stefan Renz 
> 
>> Hi,
>>
>> my searches didn't turn up anything, so I figured I ask on the mailing
>> list:
>>
>> Consider the following scenario: a Page contains a number of Panels, one
>> of which displays data retrieved by a web service, typically by means of
>> LoadableDetachableModel or IDataProvider.
>>
>> In my case, the WebService used is a Hessian-Endpoint, which is
>> conveniently available to the caller as a Proxy of an Interface. Such an
>> interface doesn't expose any transport layer exceptions; rather, the
>> Proxy takes care of converting any underlying IOException, such as
>> ConnectException, into a RuntimeException.
>>
>> I would like to exchange the Panel with an error message panel saying
>> that the service is not available rather than showing an entire error
>> page (which is something we do for other kind of exceptions, thanks to
>> the fabulous Wicket framework).
>>
>> How could I achieve something like that? Something like this can happen
>> during rendering time, not necessarily in onInitialize(), where I could
>> do an alive check and exchange the panel.
>>
>> Where should I look? What would be your suggestions? Should I come up
>> with a Quickstart as an executable example (without the service -- just
>> any Exception from within a LoadableDetachableModel#load() will do nicely)?
>>
>> Thanks in advance,
>> bye
>> Stefan
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 

-- 
im Auftrag der eFonds Solutions AG, +49-89-579494-3417


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Stefan Renz
Sven Meier wrote:
> You could probe the model in #onConfigure(), catching exceptions and
> replacing the panel. If your model is a LDM, how should it fail on
> successive accesses during actual rendering?

Theoretically because the web service can become unavailable at any
given time. However, I think that #onConfigure() should catch most
cases, in particular any "forgot to start the service" scenario.

I'll give it shot and see if I can get away with probing in #onConfigure().

Thanks for your suggestion.

Bye
Stefan

T
> 
> Sven
> 
> On 12/13/2012 09:46 PM, Stefan Renz wrote:
>> Hi,
>>
>> my searches didn't turn up anything, so I figured I ask on the mailing
>> list:
>>
>> Consider the following scenario: a Page contains a number of Panels, one
>> of which displays data retrieved by a web service, typically by means of
>> LoadableDetachableModel or IDataProvider.
>>
>> In my case, the WebService used is a Hessian-Endpoint, which is
>> conveniently available to the caller as a Proxy of an Interface. Such an
>> interface doesn't expose any transport layer exceptions; rather, the
>> Proxy takes care of converting any underlying IOException, such as
>> ConnectException, into a RuntimeException.
>>
>> I would like to exchange the Panel with an error message panel saying
>> that the service is not available rather than showing an entire error
>> page (which is something we do for other kind of exceptions, thanks to
>> the fabulous Wicket framework).
>>
>> How could I achieve something like that? Something like this can happen
>> during rendering time, not necessarily in onInitialize(), where I could
>> do an alive check and exchange the panel.
>>
>> Where should I look? What would be your suggestions? Should I come up
>> with a Quickstart as an executable example (without the service -- just
>> any Exception from within a LoadableDetachableModel#load() will do
>> nicely)?
>>
>> Thanks in advance,
>> bye
>>  Stefan
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
im Auftrag der eFonds Solutions AG, +49-89-579494-3417


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Sven Meier
You could probe the model in #onConfigure(), catching exceptions and 
replacing the panel. If your model is a LDM, how should it fail on 
successive accesses during actual rendering?


Sven

On 12/13/2012 09:46 PM, Stefan Renz wrote:

Hi,

my searches didn't turn up anything, so I figured I ask on the mailing list:

Consider the following scenario: a Page contains a number of Panels, one
of which displays data retrieved by a web service, typically by means of
LoadableDetachableModel or IDataProvider.

In my case, the WebService used is a Hessian-Endpoint, which is
conveniently available to the caller as a Proxy of an Interface. Such an
interface doesn't expose any transport layer exceptions; rather, the
Proxy takes care of converting any underlying IOException, such as
ConnectException, into a RuntimeException.

I would like to exchange the Panel with an error message panel saying
that the service is not available rather than showing an entire error
page (which is something we do for other kind of exceptions, thanks to
the fabulous Wicket framework).

How could I achieve something like that? Something like this can happen
during rendering time, not necessarily in onInitialize(), where I could
do an alive check and exchange the panel.

Where should I look? What would be your suggestions? Should I come up
with a Quickstart as an executable example (without the service -- just
any Exception from within a LoadableDetachableModel#load() will do nicely)?

Thanks in advance,
bye
 Stefan


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread heapifyman
Maybe an AjaxLazyLoadPanel could help?
I think you could catch service exceptions in getLazyLoadComponent() and
return an error panel instead of the real one.


2012/12/13 Stefan Renz 

> Hi,
>
> my searches didn't turn up anything, so I figured I ask on the mailing
> list:
>
> Consider the following scenario: a Page contains a number of Panels, one
> of which displays data retrieved by a web service, typically by means of
> LoadableDetachableModel or IDataProvider.
>
> In my case, the WebService used is a Hessian-Endpoint, which is
> conveniently available to the caller as a Proxy of an Interface. Such an
> interface doesn't expose any transport layer exceptions; rather, the
> Proxy takes care of converting any underlying IOException, such as
> ConnectException, into a RuntimeException.
>
> I would like to exchange the Panel with an error message panel saying
> that the service is not available rather than showing an entire error
> page (which is something we do for other kind of exceptions, thanks to
> the fabulous Wicket framework).
>
> How could I achieve something like that? Something like this can happen
> during rendering time, not necessarily in onInitialize(), where I could
> do an alive check and exchange the panel.
>
> Where should I look? What would be your suggestions? Should I come up
> with a Quickstart as an executable example (without the service -- just
> any Exception from within a LoadableDetachableModel#load() will do nicely)?
>
> Thanks in advance,
> bye
> Stefan
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


How to handle failing calls to external systems within a Component without resorting to an error page?

2012-12-13 Thread Stefan Renz
Hi,

my searches didn't turn up anything, so I figured I ask on the mailing list:

Consider the following scenario: a Page contains a number of Panels, one
of which displays data retrieved by a web service, typically by means of
LoadableDetachableModel or IDataProvider.

In my case, the WebService used is a Hessian-Endpoint, which is
conveniently available to the caller as a Proxy of an Interface. Such an
interface doesn't expose any transport layer exceptions; rather, the
Proxy takes care of converting any underlying IOException, such as
ConnectException, into a RuntimeException.

I would like to exchange the Panel with an error message panel saying
that the service is not available rather than showing an entire error
page (which is something we do for other kind of exceptions, thanks to
the fabulous Wicket framework).

How could I achieve something like that? Something like this can happen
during rendering time, not necessarily in onInitialize(), where I could
do an alive check and exchange the panel.

Where should I look? What would be your suggestions? Should I come up
with a Quickstart as an executable example (without the service -- just
any Exception from within a LoadableDetachableModel#load() will do nicely)?

Thanks in advance,
bye
Stefan


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org