[jboss-cvs] JBossAS SVN: r69211 - projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jan 22 15:10:06 EST 2008


Author: wolfc
Date: 2008-01-22 15:10:06 -0500 (Tue, 22 Jan 2008)
New Revision: 69211

Added:
   projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/DestructionInvocation.java
Log:
Implemented PreDestroy

Added: projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/DestructionInvocation.java
===================================================================
--- projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/DestructionInvocation.java	                        (rev 0)
+++ projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/DestructionInvocation.java	2008-01-22 20:10:06 UTC (rev 69211)
@@ -0,0 +1,73 @@
+/*
+ * 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.interceptors.container;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.InvocationBase;
+import org.jboss.logging.Logger;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class DestructionInvocation extends InvocationBase
+{
+   private static final long serialVersionUID = 1L;
+   
+   private static final Logger log = Logger.getLogger(DestructionInvocation.class);
+
+   public DestructionInvocation(Interceptor interceptors[])
+   {
+      super(interceptors);
+   }
+   
+   public Invocation copy()
+   {
+      return new DestructionInvocation(interceptors);
+   }
+
+   public Invocation getWrapper(Interceptor[] newchain)
+   {
+      return new DestructionInvocation(newchain);
+   }
+   
+   @Override
+   public Object invokeNext() throws Throwable
+   {
+      if (interceptors != null && currentInterceptor < interceptors.length)
+      {
+         try
+         {
+            return interceptors[currentInterceptor++].invoke(this);
+         }
+         finally
+         {
+            // so that interceptors like clustering can reinvoke down the chain
+            currentInterceptor--;
+         }
+      }
+      return null;
+   }
+}


Property changes on: projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/DestructionInvocation.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native




More information about the jboss-cvs-commits mailing list