tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject tomee git commit: TOMEE-1460 using right host for all ejb deployment mode (soap)
Date Mon, 01 Dec 2014 09:53:17 GMT
Repository: tomee
Updated Branches:
  refs/heads/develop 4f83cf1fa -> c55366ff6


TOMEE-1460 using right host for all ejb deployment mode (soap)


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/c55366ff
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/c55366ff
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/c55366ff

Branch: refs/heads/develop
Commit: c55366ff640671977f9adef6cfe6594aa80421fe
Parents: 4f83cf1
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Mon Dec 1 10:45:03 2014 +0100
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Mon Dec 1 10:45:03 2014 +0100

----------------------------------------------------------------------
 .../openejb/server/webservices/WsService.java      | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/c55366ff/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
----------------------------------------------------------------------
diff --git a/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
b/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
index 5c2a1e4..07e768b 100644
--- a/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
+++ b/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
@@ -270,6 +270,8 @@ public abstract class WsService implements ServerService, SelfManaging
{
             }
             contextData.put("ejbJarId", ejbJar.moduleName);
 
+            final String host = host(ejbJar, appInfo);
+
             for (final EnterpriseBeanInfo bean : ejbJar.enterpriseBeans) {
                 if (bean instanceof StatelessBeanInfo || bean instanceof SingletonBeanInfo)
{
 
@@ -314,7 +316,8 @@ public abstract class WsService implements ServerService, SelfManaging
{
                             if (context == null && !OLD_WEBSERVICE_DEPLOYMENT) {
                                 context = ejbJar.moduleName;
                             }
-                            final List<String> addresses = wsRegistry.addWsContainer(container,
classLoader, context, virtualHost, location, realm, transport, auth);
+
+                            final List<String> addresses = wsRegistry.addWsContainer(container,
classLoader, context, host, location, realm, transport, auth);
                             alreadyDeployed.add(beanContext);
 
                             // one of the registered addresses to be the canonical address
@@ -344,6 +347,18 @@ public abstract class WsService implements ServerService, SelfManaging
{
         } // else called because of ear case where new ejbs are deployed in webapps
     }
 
+    private String host(final EjbJarInfo jar, final AppInfo app) {
+        for (final WebAppInfo web : app.webApps) {
+            if (jar.moduleId.equals(web.moduleId)) {
+                if (web.host != null) {
+                    return web.host;
+                }
+                break;
+            }
+        }
+        return virtualHost;
+    }
+
     protected void setWsdl(final HttpListener listener, final String wsdl) {
         // no-op
     }


Mime
View raw message