[jboss-cvs] JBossAS SVN: r72276 - in projects: ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/common and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 16 08:38:11 EDT 2008


Author: ALRubinger
Date: 2008-04-16 08:38:11 -0400 (Wed, 16 Apr 2008)
New Revision: 72276

Added:
   projects/ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/common/
   projects/ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/common/CommonInterceptor.java
Removed:
   projects/jboss-aspects/trunk/common/src/main/java/org/jboss/aspects/common/CommonInterceptor.java
Log:
[JBASPECT-2] Put the CommonInterceptor back in EJB3, depends on javax.interceptors

Copied: projects/ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/common/CommonInterceptor.java (from rev 72275, projects/jboss-aspects/trunk/common/src/main/java/org/jboss/aspects/common/CommonInterceptor.java)
===================================================================
--- projects/ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/common/CommonInterceptor.java	                        (rev 0)
+++ projects/ejb3/trunk/interceptors/src/test/java/org/jboss/ejb3/test/interceptors/common/CommonInterceptor.java	2008-04-16 12:38:11 UTC (rev 72276)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+  *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.interceptors.common;
+
+import javax.interceptor.InvocationContext;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A common interceptor without annotation, does nothing useful.
+ * 
+ * Can be used by an annotated interceptor, or one from metadata.
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision$
+ */
+public class CommonInterceptor
+{
+   private static final Logger log = Logger.getLogger(CommonInterceptor.class);
+   
+   public static int preDestroys = 0, postConstructs = 0, aroundInvokes = 0;
+   
+   public void preDestroy(InvocationContext ctx) throws Exception
+   {
+      log.debug("preDestroy " + ctx);
+      preDestroys++;
+      ctx.proceed();
+   }
+   
+   public void postConstruct(InvocationContext ctx) throws Exception
+   {
+      log.debug("postConstruct " + ctx);
+      if(ctx.getTarget() == null)
+         throw new IllegalStateException("target is null");
+      postConstructs++;
+      ctx.proceed();
+   }
+   
+   public Object aroundInvoke(InvocationContext ctx) throws Exception
+   {
+      log.debug("aroundInvoke " + ctx);
+      aroundInvokes++;
+      return ctx.proceed();
+   }
+}

Deleted: projects/jboss-aspects/trunk/common/src/main/java/org/jboss/aspects/common/CommonInterceptor.java
===================================================================
--- projects/jboss-aspects/trunk/common/src/main/java/org/jboss/aspects/common/CommonInterceptor.java	2008-04-16 12:32:51 UTC (rev 72275)
+++ projects/jboss-aspects/trunk/common/src/main/java/org/jboss/aspects/common/CommonInterceptor.java	2008-04-16 12:38:11 UTC (rev 72276)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2007, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
-  *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.aspects.common;
-
-import org.jboss.logging.Logger;
-
-/**
- * A common interceptor without annotation, does nothing useful.
- * 
- * Can be used by an annotated interceptor, or one from metadata.
- *
- * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
- * @version $Revision$
- */
-public class CommonInterceptor
-{
-   private static final Logger log = Logger.getLogger(CommonInterceptor.class);
-   
-   public static int preDestroys = 0, postConstructs = 0, aroundInvokes = 0;
-   
-   public void preDestroy(InvocationContext ctx) throws Exception
-   {
-      log.debug("preDestroy " + ctx);
-      preDestroys++;
-      ctx.proceed();
-   }
-   
-   public void postConstruct(InvocationContext ctx) throws Exception
-   {
-      log.debug("postConstruct " + ctx);
-      if(ctx.getTarget() == null)
-         throw new IllegalStateException("target is null");
-      postConstructs++;
-      ctx.proceed();
-   }
-   
-   public Object aroundInvoke(InvocationContext ctx) throws Exception
-   {
-      log.debug("aroundInvoke " + ctx);
-      aroundInvokes++;
-      return ctx.proceed();
-   }
-}




More information about the jboss-cvs-commits mailing list