[jboss-cvs] JBossAS SVN: r101947 - in projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi: deployment and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Mar 5 06:52:02 EST 2010
Author: jaikiran
Date: 2010-03-05 06:52:02 -0500 (Fri, 05 Mar 2010)
New Revision: 101947
Added:
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/DependencyBasedInjector.java
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/EJBContainerENCInjector.java
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InjectorFactory.java
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InstanceInjector.java
Modified:
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java
projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/deployment/EJB3Deployment.java
Log:
EJBTHREE-2010 Container SPI changes
Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java 2010-03-05 11:50:16 UTC (rev 101946)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/EJBContainer.java 2010-03-05 11:52:02 UTC (rev 101947)
@@ -21,6 +21,12 @@
*/
package org.jboss.ejb3.container.spi;
+import java.util.List;
+
+import javax.naming.Context;
+
+import org.jboss.ejb3.container.spi.injection.EJBContainerENCInjector;
+import org.jboss.ejb3.container.spi.injection.InstanceInjector;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
/**
@@ -80,4 +86,26 @@
*/
InterceptorRegistry getInterceptorRegistry();
+ /**
+ * Returns the ENC context associated with this container
+ * @return
+ */
+ Context getENC();
+
+ /**
+ * Returns the classloader associated with this container
+ * @return
+ */
+ ClassLoader getClassLoader();
+
+ void setENCInjectors(List<EJBContainerENCInjector> encInjectors);
+
+ List<EJBContainerENCInjector> getENCInjectors();
+
+ void setEJBInjectors(List<InstanceInjector> injectors);
+
+ List<InstanceInjector> getEJBInjectors();
+
+
+
}
Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java 2010-03-05 11:50:16 UTC (rev 101946)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/InterceptorRegistry.java 2010-03-05 11:52:02 UTC (rev 101947)
@@ -29,6 +29,8 @@
import javax.ejb.PrePassivate;
import javax.interceptor.Interceptors;
+import org.jboss.ejb3.container.spi.injection.InstanceInjector;
+
/**
*
* <p>
@@ -55,7 +57,7 @@
* @return
*/
EJBContainer getEJBContainer();
-
+
/**
* Run the <code>targetBeanContext</code> against any applicable interceptor methods for
* {@link PostConstruct}.
@@ -85,7 +87,7 @@
* for the <code>targetBeanContext</code>.
*/
void invokePreDestroy(BeanContext targetBeanContext) throws Exception;
-
+
/**
* Run the <code>targetBeanContext</code> against any applicable interceptor methods for
* {@link PrePassivate}.
@@ -99,7 +101,7 @@
* for the <code>targetBeanContext</code>.
*/
void invokePrePassivate(BeanContext targetBeanContext) throws Exception;
-
+
/**
* Run the <code>targetBeanContext</code> against any applicable interceptor methods for
* {@link PostActivate}.
@@ -113,7 +115,7 @@
* for the <code>targetBeanContext</code>.
*/
void invokePostActivate(BeanContext targetBeanContext) throws Exception;
-
+
/**
* Intercepts a {@link ContainerInvocation}.
* <p>
@@ -128,7 +130,7 @@
* <code>target</code> object
*/
Object intercept(ContainerInvocation containerInvocation, BeanContext targetBeanContext) throws Exception;
-
+
/**
* Returns a ordered list of interceptor classes which are applicable for the bean
* represented by this {@link InterceptorRegistry}. Returns an empty list if no such
@@ -149,5 +151,9 @@
* @return
*/
List<Class<?>> getInterceptorClasses();
-
+
+ List<InstanceInjector> getInterceptorInjectors();
+
+ void setInterceptorInjectors(List<InstanceInjector> interceptorInjectors);
+
}
Modified: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/deployment/EJB3Deployment.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/deployment/EJB3Deployment.java 2010-03-05 11:50:16 UTC (rev 101946)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/deployment/EJB3Deployment.java 2010-03-05 11:52:02 UTC (rev 101947)
@@ -92,4 +92,5 @@
* this {@link EJB3Deployment}
*/
void removeEJBContainer(EJBContainer ejbContainer) throws IllegalArgumentException;
+
}
Added: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/DependencyBasedInjector.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/DependencyBasedInjector.java (rev 0)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/DependencyBasedInjector.java 2010-03-05 11:52:02 UTC (rev 101947)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.container.spi.injection;
+
+import java.util.List;
+
+/**
+ * DependencyBasedInjector
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface DependencyBasedInjector
+{
+ public void addDependency(String dep);
+
+ public List<String> getDependencies();
+}
Added: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/EJBContainerENCInjector.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/EJBContainerENCInjector.java (rev 0)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/EJBContainerENCInjector.java 2010-03-05 11:52:02 UTC (rev 101947)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.container.spi.injection;
+
+import org.jboss.ejb3.container.spi.EJBContainer;
+
+/**
+ * EJBContainerENCInjector
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface EJBContainerENCInjector extends DependencyBasedInjector
+{
+
+ public void inject(EJBContainer container);
+
+}
Added: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InjectorFactory.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InjectorFactory.java (rev 0)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InjectorFactory.java 2010-03-05 11:52:02 UTC (rev 101947)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.container.spi.injection;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+
+/**
+ * InjectorFactory
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface InjectorFactory
+{
+ public List<EJBContainerENCInjector> createENCInjectors(JBossEnterpriseBeanMetaData enterpriseBeanMetaData);
+
+ public EJBContainerENCInjector createENCInjector(Method method);
+
+ // TODO: This applies only when there is a "injection-target" element specified in the metadata
+ //public List<InstanceInjector> createBeanInstanceInjectors(JBossEnterpriseBeanMetaData enterpriseBeanMetaData);
+
+ public InstanceInjector createInstanceInjector(Method method);
+
+ // more methods for field and class injection to be added later
+}
Added: projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InstanceInjector.java
===================================================================
--- projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InstanceInjector.java (rev 0)
+++ projects/ejb3/components/container/trunk/spi/src/main/java/org/jboss/ejb3/container/spi/injection/InstanceInjector.java 2010-03-05 11:52:02 UTC (rev 101947)
@@ -0,0 +1,38 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.container.spi.injection;
+
+import org.jboss.ejb3.container.spi.BeanContext;
+
+/**
+ * Injector
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+public interface InstanceInjector extends DependencyBasedInjector
+{
+
+ public void inject(BeanContext beanContext, Object instanceToBeInjected);
+
+
+}
More information about the jboss-cvs-commits
mailing list