[jboss-cvs] jboss-seam/src/main/org/jboss/seam/interceptors ...
Gavin King
gavin.king at jboss.com
Thu Aug 3 10:44:53 EDT 2006
User: gavin
Date: 06/08/03 10:44:53
Modified: src/main/org/jboss/seam/interceptors
AbstractInterceptor.java
Log:
fix lifecycle callback methods
Revision Changes Path
1.5 +28 -3 jboss-seam/src/main/org/jboss/seam/interceptors/AbstractInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/interceptors/AbstractInterceptor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- AbstractInterceptor.java 2 Aug 2006 17:50:26 -0000 1.4
+++ AbstractInterceptor.java 3 Aug 2006 14:44:53 -0000 1.5
@@ -1,8 +1,9 @@
-//$Id: AbstractInterceptor.java,v 1.4 2006/08/02 17:50:26 gavin Exp $
+//$Id: AbstractInterceptor.java,v 1.5 2006/08/03 14:44:53 gavin Exp $
package org.jboss.seam.interceptors;
import javax.ejb.PostActivate;
import javax.ejb.PrePassivate;
+import javax.interceptor.InvocationContext;
import org.jboss.seam.Component;
@@ -22,15 +23,39 @@
}
@PrePassivate
- public void initComponentName()
+ public void initComponentName(InvocationContext invocation)
{
+ try
+ {
+ invocation.proceed();
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("exception in @PrePassivate", e);
+ }
componentName = component.getName();
}
@PostActivate
- public void initComponent()
+ public void initComponent(InvocationContext invocation)
{
component = Component.forName(componentName);
+ try
+ {
+ invocation.proceed();
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("exception in @PostActivate", e);
+ }
}
}
More information about the jboss-cvs-commits
mailing list