tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1511186 - /tomee/tomee/trunk/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java
Date Wed, 07 Aug 2013 06:04:48 GMT
Author: rmannibucau
Date: Wed Aug  7 06:04:47 2013
New Revision: 1511186

URL: http://svn.apache.org/r1511186
Log:
TOMEE-1016 webapp rest ejbs for ears are not filtered from their origin

Modified:
    tomee/tomee/trunk/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java

Modified: tomee/tomee/trunk/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java?rev=1511186&r1=1511185&r2=1511186&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java
(original)
+++ tomee/tomee/trunk/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java
Wed Aug  7 06:04:47 2013
@@ -98,7 +98,7 @@ public abstract class RESTService implem
             return;
         }
 
-        final Map<String, EJBRestServiceInfo> restEjbs = getRestEjbs(appInfo);
+        final Map<String, EJBRestServiceInfo> restEjbs = getRestEjbs(appInfo, webApp.moduleId);
 
         final ClassLoader classLoader = getClassLoader(webContext.getClassLoader());
         final Collection<Injection> injections = webContext.getInjections();
@@ -544,7 +544,7 @@ public abstract class RESTService implem
                 Thread.currentThread().setContextClassLoader(appClassLoader);
 
                 try {
-                    final Map<String, EJBRestServiceInfo> restEjbs = getRestEjbs(appInfo);
+                    final Map<String, EJBRestServiceInfo> restEjbs = getRestEjbs(appInfo,
null);
                     if (restEjbs.isEmpty()) {
                         return;
                     }
@@ -639,9 +639,13 @@ public abstract class RESTService implem
 
     protected abstract boolean containsJaxRsConfiguration(final Properties properties);
 
-    protected Map<String, EJBRestServiceInfo> getRestEjbs(final AppInfo appInfo) {
+    protected Map<String, EJBRestServiceInfo> getRestEjbs(final AppInfo appInfo, final
String webapp) {
         final Map<String, BeanContext> beanContexts = new HashMap<String, BeanContext>();
         for (final EjbJarInfo ejbJar : appInfo.ejbJars) {
+            if (ejbJar.webapp && webapp != null && !ejbJar.moduleId.equals(webapp))
{
+                continue;
+            }
+
             for (final EnterpriseBeanInfo bean : ejbJar.enterpriseBeans) {
                 if (bean.restService) {
                     final BeanContext beanContext = containerSystem.getBeanContext(bean.ejbDeploymentId);



Mime
View raw message