Author: pete.muir(a)jboss.org
Date: 2009-04-06 12:14:09 -0400 (Mon, 06 Apr 2009)
New Revision: 10311
Added:
trunk/src/main/org/jboss/seam/annotations/intercept/PostConstruct.java
Modified:
trunk/src/main/org/jboss/seam/intercept/Interceptor.java
trunk/src/main/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java
trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java
Log:
JBSEAM-3726
Added: trunk/src/main/org/jboss/seam/annotations/intercept/PostConstruct.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/intercept/PostConstruct.java
(rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/intercept/PostConstruct.java 2009-04-06
16:14:09 UTC (rev 10311)
@@ -0,0 +1,19 @@
+package org.jboss.seam.annotations.intercept;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Synonym for {@link javax.ejb.PostConstruct}, for
+ * use in a pre Java EE 5 environment.
+ *
+ * @author Denis Forveille
+ */
+@Target(METHOD)
+@Retention(RUNTIME)
+@Documented
+public @interface PostConstruct {}
Property changes on:
trunk/src/main/org/jboss/seam/annotations/intercept/PostConstruct.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/org/jboss/seam/intercept/Interceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/intercept/Interceptor.java 2009-04-06 12:13:57 UTC (rev
10310)
+++ trunk/src/main/org/jboss/seam/intercept/Interceptor.java 2009-04-06 16:14:09 UTC (rev
10311)
@@ -14,6 +14,7 @@
import org.jboss.seam.annotations.intercept.AroundInvoke;
import org.jboss.seam.annotations.intercept.InterceptorType;
import org.jboss.seam.annotations.intercept.PostActivate;
+import org.jboss.seam.annotations.intercept.PostConstruct;
import org.jboss.seam.annotations.intercept.PrePassivate;
import org.jboss.seam.util.Reflections;
@@ -131,7 +132,7 @@
{
aroundInvokeMethod = method;
}
- if ( method.isAnnotationPresent(POST_CONSTRUCT) )
+ if ( method.isAnnotationPresent(POST_CONSTRUCT) ||
method.isAnnotationPresent(PostConstruct.class))
{
postConstructMethod = method;
}
Modified: trunk/src/main/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java
===================================================================
---
trunk/src/main/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java 2009-04-06
12:13:57 UTC (rev 10310)
+++
trunk/src/main/org/jboss/seam/persistence/EntityManagerProxyInterceptor.java 2009-04-06
16:14:09 UTC (rev 10311)
@@ -3,13 +3,13 @@
import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
import static org.jboss.seam.ComponentType.STATELESS_SESSION_BEAN;
-import javax.annotation.PostConstruct;
-import javax.ejb.PostActivate;
import javax.persistence.EntityManager;
import org.jboss.seam.Component.BijectedAttribute;
import org.jboss.seam.annotations.intercept.AroundInvoke;
import org.jboss.seam.annotations.intercept.Interceptor;
+import org.jboss.seam.annotations.intercept.PostActivate;
+import org.jboss.seam.annotations.intercept.PostConstruct;
import org.jboss.seam.intercept.AbstractInterceptor;
import org.jboss.seam.intercept.InvocationContext;
Modified: trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java
===================================================================
---
trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java 2009-04-06
12:13:57 UTC (rev 10310)
+++
trunk/src/main/org/jboss/seam/persistence/HibernateSessionProxyInterceptor.java 2009-04-06
16:14:09 UTC (rev 10311)
@@ -3,13 +3,12 @@
import static org.jboss.seam.ComponentType.STATEFUL_SESSION_BEAN;
import static org.jboss.seam.ComponentType.STATELESS_SESSION_BEAN;
-import javax.annotation.PostConstruct;
-
import org.hibernate.Session;
import org.jboss.seam.Component.BijectedAttribute;
import org.jboss.seam.annotations.intercept.AroundInvoke;
import org.jboss.seam.annotations.intercept.Interceptor;
import org.jboss.seam.annotations.intercept.PostActivate;
+import org.jboss.seam.annotations.intercept.PostConstruct;
import org.jboss.seam.intercept.AbstractInterceptor;
import org.jboss.seam.intercept.InvocationContext;
import org.jboss.seam.util.Reflections;
Show replies by date