[jboss-svn-commits] JBL Code SVN: r19679 - labs/jbosslabs/labs-3.0-build/integration/src/main/java/org/jboss/labs/injection/seam.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Apr 22 03:37:29 EDT 2008


Author: wrzep
Date: 2008-04-22 03:37:29 -0400 (Tue, 22 Apr 2008)
New Revision: 19679

Removed:
   labs/jbosslabs/labs-3.0-build/integration/src/main/java/org/jboss/labs/injection/seam/LabsSeamInjectionInterceptor.java
Log:
JBLAB-928 removing old interceptor


Deleted: labs/jbosslabs/labs-3.0-build/integration/src/main/java/org/jboss/labs/injection/seam/LabsSeamInjectionInterceptor.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/integration/src/main/java/org/jboss/labs/injection/seam/LabsSeamInjectionInterceptor.java	2008-04-22 01:18:31 UTC (rev 19678)
+++ labs/jbosslabs/labs-3.0-build/integration/src/main/java/org/jboss/labs/injection/seam/LabsSeamInjectionInterceptor.java	2008-04-22 07:37:29 UTC (rev 19679)
@@ -1,93 +0,0 @@
-/*
-* JBoss Labs. http://labs.jboss.com/jbosslabs
-*
-* Copyright © 2008  Red Hat Middleware, LLC. All rights reserved.
-*
-* This copyrighted material is made available to anyone wishing to use,
-* modify, copy, or redistribute it subject to the terms and conditions
-* of the GNU Lesser General Public License, v. 2.1.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT A WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License, v.2.1 along with this distribution; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-* 02110-1301, USA.
-*
-* Red Hat Author(s): Bob McWhirter, Przemyslaw Dej, Ryszard Kozmik,
-*     Tomasz Szymanski, Adam Warski, Pawel Wrzeszcz
-*/
-
-package org.jboss.labs.injection.seam;
-
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.intercept.AroundInvoke;
-import org.jboss.seam.annotations.intercept.Interceptor;
-import org.jboss.seam.intercept.AbstractInterceptor;
-import org.jboss.seam.intercept.InvocationContext;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * @author Pawel Wrzeszcz (pwrzeszcz [at] jboss . org)
- */
- at Interceptor
-public class LabsSeamInjectionInterceptor extends AbstractInterceptor
-{
-    private Log log = Logging.getLog(LabsSeamInjectionInterceptor.class);
-    
-    private static final long serialVersionUID = -6716553117162905303L;
-
-    private static final ConcurrentHashMap<Class, Injector> INJECTOR_CACHE
-                                    = new ConcurrentHashMap<Class, Injector>();
-
-    @AroundInvoke
-    public Object aroundInvoke(InvocationContext invocationContext) throws Exception 
-    {
-//        String moduleBeanName = invocationContext.getMethod().getDeclaringClass().getAnnotation(Guice.class).value();
-//
-//        Module module = null;
-//
-//        if ((moduleBeanName != null) && (moduleBeanName.length() > 0)) {
-//
-//             module = (Module) Component.getInstance(moduleBeanName);
-//             log.info("value() " + moduleBeanName);
-//        }
-//
-//        if (module == null) {
-//
-//           Class clazz = invocationContext.getMethod().getDeclaringClass().getAnnotation(Guice.class).module();
-//
-//           module = (Module) clazz.newInstance();
-//
-//            log.info("module() " + clazz);
-//        }
-
-        Module module = (Module) Component.getInstance("org.jboss.labs.injection.seam.guiceModule");
-
-        if (module != null)
-        {
-
-           log.info("Injecting members for: "
-				+ invocationContext.getTarget().getClass().getName()
-                + " using module " + module);
-
-            Injector injector = com.google.inject.Guice.createInjector(module);
-            injector.injectMembers(invocationContext.getTarget());
-        }
-        else
-        {
-            log.warn("Guice module not found");   
-        }
-
-
-        return invocationContext.proceed();
-    }
-}




More information about the jboss-svn-commits mailing list