[jboss-user] [JBoss Seam] - Exception handling with interceptors

nickarls do-not-reply at jboss.com
Fri Feb 8 07:44:17 EST 2008


Hi,

I have most reuseable database queries isolated to a DAOish class and would like to add some logging and exception handling like


  | Object result = null;
  | try {
  | 	result = context.proceed();
  | 	// log called methods, parameters and result
  | } catch (PersistenceException e) {
  | 	// get error context from invocation context and lookup
  | 	// from message bundles etc...
  | }
  | return result;
  | 

The problem however is that the connection seems to have gone sour anyway, which leads to ugly "Transaction is not active" errors in my long running conversation. 

Is there any way to recover from this? Do you have any experience with using interceptors for centralized error logging/management and recovery?

Thanks in advance,

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127789#4127789

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127789



More information about the jboss-user mailing list