| Author |
@PostConstruct exception handling
|
Ganesh Podaralla
Greenhorn
Joined: Feb 22, 2010
Posts: 23
|
|
Hi,
I defined @PostConstruct method in my backing bean and I am using JBossInjectionProvider for handling PostConstruct. I defined a filter to catch all the errors/exceptions thrown by the application. In my PostConstruct method, I am trying to fetch the details from the database. If any error/runtime exception is thrown, I assumed that it will be catched by the filter but looks like JBossInjectionProvider is catching a Throwable instance. So, even if an error is thrown from the PostConstruct method, it is being catched by PostConstruct and it is trying to just ignore the error. Please let me know if you have any ideas for making filter to catch the Throwable instance instead of handling by PostConstruct.
Thanks,
Ganesh
|
 |
shashank nagabhushan maddali
Greenhorn
Joined: Jun 23, 2008
Posts: 5
|
|
Hi,
Try giving a Sysout inside a catch block.
Catch the exception and use a <exceptiovariable>.getMessage function.
See if this will work.
- Regards
|
 |
shashank nagabhushan maddali
Greenhorn
Joined: Jun 23, 2008
Posts: 5
|
|
Hi,
Try giving a Sysout inside a catch block.
Catch the exception and use a <exceptiovariable>.getMessage function.
This will just give you an idea on what the exception was.
Please let me know if you do discover the solution to problem mentioned below. I am interested.
- Regards
|
 |
 |
|
|
subject: @PostConstruct exception handling
|
|
|