You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Elin <po...@gmail.com> on 2010/08/20 13:54:30 UTC

Capturing hibernate exception

I have a project where im using hibernate with Tapestry. Everything works
fine. Following the tutorials, i created my Hibernate entities, i created my
DAOs where i inject the hibernate session at and i use them for my data
access. The problem comes when my database fails (its down, unreachable or
whatever). I get a weird tapestry error page cause of the components trying
to access to data.

Is it possible to configure tapestry (or tomcat, dunno who should manage the
exception at this point) so i can capture if database connection with
hibernate fails and im redirected to a custom error page? Alternative
options are wellcome too.

Thx in advance.
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/Capturing-hibernate-exception-tp2642048p2642048.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Capturing hibernate exception

Posted by Sven Homburg <ho...@googlemail.com>.
http://tapestry.apache.org/tapestry5.1/cookbook/exceptions.html

with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org





2010/8/20 Elin <po...@gmail.com>:
>
> I have a project where im using hibernate with Tapestry. Everything works
> fine. Following the tutorials, i created my Hibernate entities, i created my
> DAOs where i inject the hibernate session at and i use them for my data
> access. The problem comes when my database fails (its down, unreachable or
> whatever). I get a weird tapestry error page cause of the components trying
> to access to data.
>
> Is it possible to configure tapestry (or tomcat, dunno who should manage the
> exception at this point) so i can capture if database connection with
> hibernate fails and im redirected to a custom error page? Alternative
> options are wellcome too.
>
> Thx in advance.
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Capturing-hibernate-exception-tp2642048p2642048.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Capturing hibernate exception

Posted by Kalle Korhonen <ka...@gmail.com>.
(The database should not fail - but when it does...) For handling
those the irrecoverable errors you could use Tynamo's
tapestry-exceptionpage module, see
http://tynamo.org/tapestry-exceptionpage+guide for details.

Kalle


On Fri, Aug 20, 2010 at 4:54 AM, Elin <po...@gmail.com> wrote:
>
> I have a project where im using hibernate with Tapestry. Everything works
> fine. Following the tutorials, i created my Hibernate entities, i created my
> DAOs where i inject the hibernate session at and i use them for my data
> access. The problem comes when my database fails (its down, unreachable or
> whatever). I get a weird tapestry error page cause of the components trying
> to access to data.
>
> Is it possible to configure tapestry (or tomcat, dunno who should manage the
> exception at this point) so i can capture if database connection with
> hibernate fails and im redirected to a custom error page? Alternative
> options are wellcome too.
>
> Thx in advance.
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Capturing-hibernate-exception-tp2642048p2642048.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org