This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

@PostConstruct exception handling

 
Ganesh Podaralla
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic