1 7 package org.jboss.jms.client.container; 8 9 import org.jboss.aop.advice.Interceptor; 10 import org.jboss.aop.joinpoint.Invocation; 11 import org.jboss.jms.JBossJMSException; 12 13 20 public class JMSExceptionInterceptor 21 implements Interceptor 22 { 23 25 27 29 public static JMSExceptionInterceptor singleton = new JMSExceptionInterceptor(); 30 31 33 35 37 public String getName() 38 { 39 return "JMSExceptionInterceptor"; 40 } 41 42 public Object invoke(Invocation invocation) throws Throwable 43 { 44 try 45 { 46 return invocation.invokeNext(); 47 } 48 catch (Throwable t) 49 { 50 throw JBossJMSException.handle(t); 51 } 52 } 53 54 56 58 60 } 62 | Popular Tags |