[jboss-cvs] jboss-seam/src/main/org/jboss/seam/ejb ...
Gavin King
gavin.king at jboss.com
Sat Sep 23 11:41:39 EDT 2006
User: gavin
Date: 06/09/23 11:41:39
Modified: src/main/org/jboss/seam/ejb SeamInterceptor.java
Log:
support @PrePassivate, @PostActivate, @PostConstruct for JavaBean components
fix bug in replication of Seam-managed PC used by SFSB
more efficient replication of extended Seam-managed PCs
Revision Changes Path
1.44 +4 -23 jboss-seam/src/main/org/jboss/seam/ejb/SeamInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SeamInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/ejb/SeamInterceptor.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- SeamInterceptor.java 23 Sep 2006 12:29:18 -0000 1.43
+++ SeamInterceptor.java 23 Sep 2006 15:41:39 -0000 1.44
@@ -19,6 +19,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.seam.Component;
import org.jboss.seam.InterceptorType;
+import org.jboss.seam.Seam;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.Lifecycle;
@@ -30,7 +31,7 @@
* for a session bean component
*
* @author Gavin King
- * @version $Revision: 1.43 $
+ * @version $Revision: 1.44 $
*/
public class SeamInterceptor implements Serializable
{
@@ -81,7 +82,7 @@
{
isSeamComponent = true;
componentName = beanClass.getAnnotation(Name.class).value();
- component = componentForName(componentName);
+ component = Seam.componentForName(componentName);
}
else
{
@@ -124,7 +125,7 @@
@PostActivate
public void postActivate(InvocationContext invocation)
{
- if (isSeamComponent) component = componentForName(componentName);
+ if (isSeamComponent) component = Seam.componentForName(componentName);
invokeAndHandle(invocation, EventType.POST_ACTIVATE);
}
@@ -203,24 +204,4 @@
return component!=null && component.getInterceptionType().isActive();
}
- private Component componentForName(String name)
- {
- if ( Contexts.isApplicationContextActive() )
- {
- return Component.forName(name);
- }
- else
- {
- Lifecycle.beginApplication();
- try
- {
- return Component.forName(name);
- }
- finally
- {
- Lifecycle.endApplication();
- }
- }
- }
-
}
More information about the jboss-cvs-commits
mailing list