cristof commented on code in PR #321:
URL: https://github.com/apache/openjpa/pull/321#discussion_r4674543370


##########
openjpa-kernel/src/main/java/org/apache/openjpa/event/BeanLifecycleCallbacks.java:
##########
@@ -23,73 +23,69 @@
 import java.io.ObjectOutput;
 import java.lang.reflect.Method;
 
-import org.apache.openjpa.lib.util.J2DoPrivHelper;
-import org.apache.openjpa.lib.util.Localizer;
-import org.apache.openjpa.util.UserException;
+import org.apache.openjpa.cdi.InjectionManager;
+import org.apache.openjpa.cdi.CDIInjectionService;
 
 /**
  * Performs a callback method on a cached bean instance.
  *
  * @author Steve Kim
  */
-public class BeanLifecycleCallbacks
+public class BeanLifecycleCallbacks<T>
     extends MethodLifecycleCallbacks {
 
-    private static final Localizer _loc = Localizer.forPackage
-        (BeanLifecycleCallbacks.class);
-
-    private transient Object _listener;
-
+    private final Class<T> listenerClass;
+    
+    private InjectionManager<T> injectorManager;
+    
     /**
      * Constructor. Make the callback on an instance of the given type.
      *
      * @param arg whether another argument is expected such as AfterDetach
      */
-    public BeanLifecycleCallbacks(Class<?> cls, String method, boolean arg,
-        Class<?> type) {
-        this(cls, getMethod(cls, method, arg ? new Class[]{ Object.class,
-            type } : new Class[]{ type }), arg);
+    public BeanLifecycleCallbacks(Class<T> cls, String method, boolean arg, 
Class<?> type, CDIInjectionService injectionService) {

Review Comment:
   Kept binary compatibility in new proposed impl.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to