tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1528727 - in /tomee/tomee/trunk/server: openejb-cxf/src/test/java/org/apache/openejb/server/cxf/ openejb-webservices/src/main/java/org/apache/openejb/server/webservices/ openejb-webservices/src/main/java/org/apache/openejb/server/webservic...
Date Thu, 03 Oct 2013 05:59:44 GMT
Author: rmannibucau
Date: Thu Oct  3 05:59:43 2013
New Revision: 1528727

URL: http://svn.apache.org/r1528727
Log:
fixing build + fixing path/host in ws service (was in wrong order) + fixing wsjmxtest which
was waiting 1000000....too long ;)

Modified:
    tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/WsJMXTest.java
    tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/OpenEJBHttpWsRegistry.java
    tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsRegistry.java
    tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
    tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/MessageFactoryImpl.java
    tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajUniverse.java

Modified: tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/WsJMXTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/WsJMXTest.java?rev=1528727&r1=1528726&r2=1528727&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/WsJMXTest.java
(original)
+++ tomee/tomee/trunk/server/openejb-cxf/src/test/java/org/apache/openejb/server/cxf/WsJMXTest.java
Thu Oct  3 05:59:43 2013
@@ -42,7 +42,7 @@ import static org.junit.Assert.assertTru
 @EnableServices("jax-ws")
 @RunWith(ApplicationComposer.class)
 public class WsJMXTest {
-    private static ObjectName name;
+    private static ObjectName[] names = new ObjectName[2];
 
     @Module
     @Classes({AnEjbEndpoint.class, AnPojoEndpoint.class})
@@ -65,37 +65,35 @@ public class WsJMXTest {
 
     @BeforeClass
     public static void before() throws MalformedObjectNameException {
-        name = new ObjectName("openejb.management:j2eeType=JAX-WS,J2EEServer=openejb,J2EEApplication=<empty>,EndpointType=EJB,name="
+ AnEjbEndpoint.class.getName());
+        names[0] = new ObjectName("openejb.management:j2eeType=JAX-WS,J2EEServer=openejb,J2EEApplication=<empty>,EndpointType=EJB,name=AnEjbEndpoint");
+        names[1] = new ObjectName("openejb.management:j2eeType=JAX-WS,J2EEServer=openejb,J2EEApplication=<empty>,EndpointType=POJO,name=AnPojoEndpoint");
     }
 
     @Test
     public void checkServiceWasDeployed() throws Exception {
-        Thread.currentThread().sleep(10000000000l);
-        assertTrue(LocalMBeanServer.get().isRegistered(name));
+        assertTrue(LocalMBeanServer.get().isRegistered(names[0]));
+        assertTrue(LocalMBeanServer.get().isRegistered(names[1]));
     }
 
     @AfterClass
     public static void after() {
-        assertFalse(LocalMBeanServer.get().isRegistered(name));
+        assertFalse(LocalMBeanServer.get().isRegistered(names[0]));
+        assertFalse(LocalMBeanServer.get().isRegistered(names[1]));
     }
 
     @Singleton
     @Lock(LockType.READ)
     @WebService
     public static class AnEjbEndpoint {
-
         public String sayHello(final String me) {
             return "Hello " + me;
         }
-
     }
 
     @WebService
     public static class AnPojoEndpoint {
-
         public String sayHi(final String me) {
             return "Hi " + me;
         }
-
     }
 }

Modified: tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/OpenEJBHttpWsRegistry.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/OpenEJBHttpWsRegistry.java?rev=1528727&r1=1528726&r2=1528727&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/OpenEJBHttpWsRegistry.java
(original)
+++ tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/OpenEJBHttpWsRegistry.java
Thu Oct  3 05:59:43 2013
@@ -25,31 +25,35 @@ import org.apache.openejb.server.httpd.O
 import java.util.List;
 
 public class OpenEJBHttpWsRegistry extends OpenEJBHttpRegistry implements WsRegistry {
-    public List<String> setWsContainer(HttpListener httpListener,
-                                        ClassLoader classLoader,
-                                        String context, String virtualHost, ServletInfo servletInfo,
-                                        String realmName, String transportGuarantee, String
authMethod) throws Exception {
+    @Override
+    public List<String> setWsContainer(final HttpListener httpListener,
+                                       final ClassLoader classLoader,
+                                       final String context, final String virtualHost, final
ServletInfo servletInfo,
+                                       final String realmName, final String transportGuarantee,
final String authMethod) throws Exception {
 
         final String path = servletInfo.mappings.iterator().next();
         return addWsContainer(httpListener, classLoader, context, virtualHost, path, realmName,
transportGuarantee, authMethod);
     }
 
-    public void clearWsContainer(String context, String virtualHost, ServletInfo servletInfo)
{
+    @Override
+    public void clearWsContainer(final String context, final String virtualHost, final ServletInfo
servletInfo) {
         final String path = servletInfo.mappings.iterator().next();
         removeWsContainer(path);
     }
 
-    public List<String> addWsContainer(HttpListener httpListener,
-                                        ClassLoader classLoader,
-                                        String context,
-                                        String virtualHost, // ignored
-                                        String path,
-                                        String realmName, // ignored
-                                        String transportGuarantee, // ignored
-                                        String authMethod // ignored
-                                        ) throws Exception {
+    @Override
+    public List<String> addWsContainer(final HttpListener inputListener,
+                                       final ClassLoader classLoader,
+                                       final String context,
+                                       final String virtualHost,
+                                       final String path,
+                                       final String realmName,
+                                       final String transportGuarantee, // ignored
+                                       final String authMethod) throws Exception {
 
         if (path == null) throw new NullPointerException("contextRoot is null");
+
+        HttpListener httpListener = inputListener;
         if (httpListener == null) throw new NullPointerException("httpListener is null");
 
         if ("BASIC".equals(authMethod)) {
@@ -79,6 +83,7 @@ public class OpenEJBHttpWsRegistry exten
         return getResolvedAddresses(deployedPath.toString());
     }
 
+    @Override
     public void removeWsContainer(String path) {
         registry.removeHttpListener(path);
     }

Modified: tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsRegistry.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsRegistry.java?rev=1528727&r1=1528726&r2=1528727&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsRegistry.java
(original)
+++ tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsRegistry.java
Thu Oct  3 05:59:43 2013
@@ -29,9 +29,14 @@ public interface WsRegistry {
 
     void clearWsContainer(String context, String virtualHost, ServletInfo servletInfo);
 
-    List<String> addWsContainer(HttpListener httpListener,
+    List<String> addWsContainer(HttpListener inputListener,
                                 ClassLoader classLoader,
-                                String realmName, String transportGuarantee, String authMethod)
throws Exception;
+                                String context,
+                                String virtualHost,
+                                String path,
+                                String realmName,
+                                String transportGuarantee, // ignored
+                                String authMethod) throws Exception;
 
     void removeWsContainer(String path);
 }

Modified: tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java?rev=1528727&r1=1528726&r2=1528727&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
(original)
+++ tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/WsService.java
Thu Oct  3 05:59:43 2013
@@ -302,7 +302,7 @@ public abstract class WsService implemen
                             if (context == null && !OLD_WEBSERVICE_DEPLOYMENT) {
                                 context = ejbJar.moduleName;
                             }
-                            final List<String> addresses = wsRegistry.addWsContainer(container,
classLoader, context, location, virtualHost, realm, transport, auth);
+                            final List<String> addresses = wsRegistry.addWsContainer(container,
classLoader, context, virtualHost, location, realm, transport, auth);
 
                             // one of the registered addresses to be the canonical address
                             final String address = HttpUtil.selectSingleAddress(addresses);

Modified: tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/MessageFactoryImpl.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/MessageFactoryImpl.java?rev=1528727&r1=1528726&r2=1528727&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/MessageFactoryImpl.java
(original)
+++ tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/MessageFactoryImpl.java
Thu Oct  3 05:59:43 2013
@@ -16,19 +16,16 @@
  */
 package org.apache.openejb.server.webservices.saaj;
 
-import java.io.IOException;
-import java.io.InputStream;
-
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.MimeHeaders;
 import javax.xml.soap.SOAPException;
 import javax.xml.soap.SOAPMessage;
+import java.io.IOException;
+import java.io.InputStream;
 
 public class MessageFactoryImpl extends MessageFactory {
     private MessageFactory getMessageFactory() throws SOAPException {
-        MessageFactory factory = 
-            (MessageFactory) SaajFactoryFinder.find("javax.xml.soap.MessageFactory");
-        return factory;
+        return (MessageFactory) SaajFactoryFinder.find("javax.xml.soap.MessageFactory");
     }
     
     public SOAPMessage createMessage() throws SOAPException {

Modified: tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajUniverse.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajUniverse.java?rev=1528727&r1=1528726&r2=1528727&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajUniverse.java
(original)
+++ tomee/tomee/trunk/server/openejb-webservices/src/main/java/org/apache/openejb/server/webservices/saaj/SaajUniverse.java
Thu Oct  3 05:59:43 2013
@@ -16,10 +16,10 @@
  */
 package org.apache.openejb.server.webservices.saaj;
 
-import java.util.LinkedList;
-
-import org.apache.openejb.util.Logger;
 import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
+
+import java.util.LinkedList;
 
 public class SaajUniverse {
     private static final Logger logger = Logger.getInstance(LogCategory.OPENEJB_WS, SaajUniverse.class);
@@ -74,9 +74,8 @@ public class SaajUniverse {
         final LinkedList<Type> universeList = currentUniverse.get();
         if (universeList != null && !universeList.isEmpty()) {
             return universeList.getLast();
-        } else {
-            return null;
-        }                
+        }
+        return null;
     }
        
 }



Mime
View raw message