[jboss-cvs] JBossAS SVN: r77488 - 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 Aug 26 10:18:38 EDT 2008


Author: wolfc
Date: 2008-08-26 10:18:38 -0400 (Tue, 26 Aug 2008)
New Revision: 77488

Added:
   projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/InvocationHelper.java
Log:
EJBTHREE-1474: query the context of an invocation

Added: projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/InvocationHelper.java
===================================================================
--- projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/InvocationHelper.java	                        (rev 0)
+++ projects/ejb3/trunk/interceptors/src/main/java/org/jboss/ejb3/interceptors/container/InvocationHelper.java	2008-08-26 14:18:38 UTC (rev 77488)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class InvocationHelper
+{
+   public static boolean isInjection(Invocation invocation)
+   {
+      // FIXME: determine this properly, this is just a wild guess
+      return invocation == null;
+   }
+   
+   public static boolean isLifecycleCallback(Invocation invocation)
+   {
+      assert invocation != null : "invocation is null";
+      // FIXME: determine this properly, right now EJBContainer uses ConstructionInvocation
+      return !(invocation instanceof MethodInvocation);
+   }
+}




More information about the jboss-cvs-commits mailing list