geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r722818 - /geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
Date Wed, 03 Dec 2008 09:20:20 GMT
Author: vamsic007
Date: Wed Dec  3 01:20:19 2008
New Revision: 722818

URL: http://svn.apache.org/viewvc?rev=722818&view=rev
Log:
Add support for dependency injection in event listeners.

Modified:
    geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java

Modified: geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java?rev=722818&r1=722817&r2=722818&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
(original)
+++ geronimo/plugins/tuscany/trunk/geronimo-tuscany/src/main/java/org/apache/geronimo/tuscany/TuscanyModuleBuilderExtension.java
Wed Dec  3 01:20:19 2008
@@ -62,6 +62,7 @@
 import org.apache.geronimo.openejb.EjbDeployment;
 import org.apache.geronimo.openejb.deployment.EjbModule;
 import org.apache.geronimo.xbeans.javaee.FilterType;
+import org.apache.geronimo.xbeans.javaee.ListenerType;
 import org.apache.geronimo.xbeans.javaee.ServletType;
 import org.apache.geronimo.xbeans.javaee.WebAppType;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
@@ -222,6 +223,18 @@
             }
         }
 
+        ListenerType[] listeners = webApp.getListenerArray();
+        for(ListenerType listener : listeners) {
+            String listenerClassName = listener.getListenerClass().getStringValue().trim();
+            try {
+                Class listenerClass  = cl.loadClass(listenerClassName);
+                processWebArtifactClass(listenerClass, compContext, holder, thisComponentName);
+            } catch (ClassNotFoundException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+        }
+
         // Add dependency so that EmbeddedRuntime starts before the WebAppContext
         ((GBeanData)earContext.getConfiguration().findGBeanDatas(Collections.singleton(new
AbstractNameQuery(module.getModuleName()))).toArray()[0]).addDependency(abstractName);
         



Mime
View raw message