Author: bimargulies
Date: Tue Aug 31 00:28:44 2010
New Revision: 991046

URL: http://svn.apache.org/viewvc?rev=991046&view=rev
Log:
Fix checkstyle issues.

Added:
    cxf/trunk/distribution/src/main/release/samples/java_first_jms/build.xml   
(with props)
Modified:
    cxf/trunk/distribution/src/main/release/samples/java_first_jms/   (props 
changed)
    
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientHTTP.java
    
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java
    
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerHTTP.java
    
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
    
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/HelloWorld.java
    
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java

Propchange: cxf/trunk/distribution/src/main/release/samples/java_first_jms/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Aug 31 00:28:44 2010
@@ -0,0 +1,2 @@
+build
+activemq-data

Added: cxf/trunk/distribution/src/main/release/samples/java_first_jms/build.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/build.xml?rev=991046&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/java_first_jms/build.xml 
(added)
+++ cxf/trunk/distribution/src/main/release/samples/java_first_jms/build.xml 
Tue Aug 31 00:28:44 2010
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project name="Java-first JMS sample" default="build" basedir=".">
+
+    <import file="../common_build.xml"/>        
+        
+    <target name="client" description="run demo client" depends="build">
+        <property name="param" value=""/>
+        <cxfrun classname="demo.client.ClientJMS"
+            param1="" 
+            param2="${op}" 
+            param3="${param}"/>
+    </target> 
+        
+    <target name="server" description="run demo server" depends="build">
+        <cxfrun classname="demo.server.ServerJMS" param1="-activemqbroker"/>
+    </target>
+       
+</project>

Propchange: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientHTTP.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientHTTP.java?rev=991046&r1=991045&r2=991046&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientHTTP.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientHTTP.java
 Tue Aug 31 00:28:44 2010
@@ -21,26 +21,27 @@ package demo.client;
 
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
-import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 
 import demo.service.HelloWorld;
 
+
+
 public final class ClientHTTP {
+    private ClientHTTP() {
+        //
+    }
 
-     public static void main(String args[]) throws Exception {
-       Logger.getLogger("").setLevel(Level.FINE);
+    public static void main(String args[]) throws Exception {
+        Logger.getLogger("").setLevel(Level.FINE);
         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
-        factory.getInInterceptors().add(new LoggingInInterceptor());
-        factory.getOutInterceptors().add(new LoggingInInterceptor());
-       factory.setServiceClass(HelloWorld.class);
-       factory.setAddress("http://localhost:9000/helloWorld";);
-       HelloWorld client = (HelloWorld) factory.create();
-       
-       String reply = client.sayHi("HI");
+        factory.setServiceClass(HelloWorld.class);
+        factory.setAddress("http://localhost:9000/helloWorld";);
+        HelloWorld client = (HelloWorld)factory.create();
+
+        String reply = client.sayHi("HI");
         System.out.println("Server said: " + reply);
-        System.exit(0); 
+        System.exit(0);
     }
 
 }

Modified: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java?rev=991046&r1=991045&r2=991046&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/client/ClientJMS.java
 Tue Aug 31 00:28:44 2010
@@ -20,18 +20,20 @@
 package demo.client;
 
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
-
 import demo.service.HelloWorld;
 
 public final class ClientJMS {
+    private ClientJMS() {
+        //
+    }
 
-       public static void main(String[] args) throws Exception {
-               JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
-       factory.setServiceClass(HelloWorld.class);
-       factory.setAddress("jms://");
-       HelloWorld client = (HelloWorld) factory.create();
-               String reply = client.sayHi("HI");
-               System.out.println(reply);
-               System.exit(0);
-       }
+    public static void main(String[] args) throws Exception {
+        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
+        factory.setServiceClass(HelloWorld.class);
+        factory.setAddress("jms://");
+        HelloWorld client = (HelloWorld)factory.create();
+        String reply = client.sayHi("HI");
+        System.out.println(reply);
+        System.exit(0);
+    }
 }

Modified: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerHTTP.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerHTTP.java?rev=991046&r1=991045&r2=991046&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerHTTP.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerHTTP.java
 Tue Aug 31 00:28:44 2010
@@ -19,14 +19,16 @@
 
 package demo.server;
 
-import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
-
 import demo.service.HelloWorld;
 import demo.service.impl.HelloWorldImpl;
 
 
-public class ServerHTTP {
+
+public final class ServerHTTP {
+    private ServerHTTP() {
+        //
+    }
 
     public static void main(String args[]) throws Exception {
         System.out.println("Starting Server");
@@ -36,8 +38,6 @@ public class ServerHTTP {
         svrFactory.setServiceClass(HelloWorld.class);
         svrFactory.setAddress("http://localhost:9000/helloWorld";);
         svrFactory.setServiceBean(implementor);
-        svrFactory.getInInterceptors().add(new LoggingInInterceptor());
-        svrFactory.getOutInterceptors().add(new LoggingInInterceptor());
         svrFactory.create();
 
         System.in.read();

Modified: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java?rev=991046&r1=991045&r2=991046&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/server/ServerJMS.java
 Tue Aug 31 00:28:44 2010
@@ -26,30 +26,35 @@ import org.apache.cxf.jaxws.JaxWsServerF
 import demo.service.HelloWorld;
 import demo.service.impl.HelloWorldImpl;
 
-public class ServerJMS {
+
+public final class ServerJMS {
+    private ServerJMS() {
+        //
+    }
 
     public static void main(String args[]) throws Exception {
 
-       boolean amqBroker = args.length > 0 && 
"-activemqbroker".equals(args[0]);
-       if (amqBroker) {
-           /*
-            * The following make it easier to run this against something other 
than ActiveMQ.
-            * You will have to get a JMS broker onto the right port of 
localhost.
-            */
-               Class<?> brokerClass = 
ServerJMS.class.getClassLoader().loadClass("org.apache.activemq.broker.BrokerService");
-               if (brokerClass == null) {
-                   System.err.println("ActiveMQ is not in the classpath, 
cannot launch broker.");
-                   return;
-               }
-               Object broker = brokerClass.newInstance();
-               Method addConnectorMethod = 
brokerClass.getMethod("addConnector", String.class);
-               addConnectorMethod.invoke(broker, "tcp://localhost:61616");
-               Method startMethod = brokerClass.getMethod("start");
-               startMethod.invoke(broker);
-       }
+        boolean amqBroker = args.length > 0 && 
"-activemqbroker".equals(args[0]);
+        if (amqBroker) {
+            /*
+             * The following make it easier to run this against something 
other than ActiveMQ. You will have
+             * to get a JMS broker onto the right port of localhost.
+             */
+            Class<?> brokerClass = ServerJMS.class.getClassLoader()
+                .loadClass("org.apache.activemq.broker.BrokerService");
+            if (brokerClass == null) {
+                System.err.println("ActiveMQ is not in the classpath, cannot 
launch broker.");
+                return;
+            }
+            Object broker = brokerClass.newInstance();
+            Method addConnectorMethod = brokerClass.getMethod("addConnector", 
String.class);
+            addConnectorMethod.invoke(broker, "tcp://localhost:61616");
+            Method startMethod = brokerClass.getMethod("start");
+            startMethod.invoke(broker);
+        }
 
-       Object implementor = new HelloWorldImpl();
-       JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
+        Object implementor = new HelloWorldImpl();
+        JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
         svrFactory.setServiceClass(HelloWorld.class);
         svrFactory.setAddress("jms://");
         svrFactory.setServiceBean(implementor);

Modified: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/HelloWorld.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/HelloWorld.java?rev=991046&r1=991045&r2=991046&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/HelloWorld.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/HelloWorld.java
 Tue Aug 31 00:28:44 2010
@@ -24,6 +24,6 @@ import javax.jws.WebService;
 
 @WebService
 public interface HelloWorld {
-       @WebMethod
-       public abstract String sayHi(@WebParam(name="name") String name);
-}
\ No newline at end of file
+    @WebMethod
+    String sayHi(@WebParam(name = "name") String name);
+}

Modified: 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java?rev=991046&r1=991045&r2=991046&view=diff
==============================================================================
--- 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java
 (original)
+++ 
cxf/trunk/distribution/src/main/release/samples/java_first_jms/src/main/java/demo/service/impl/HelloWorldImpl.java
 Tue Aug 31 00:28:44 2010
@@ -24,10 +24,11 @@ import demo.service.HelloWorld;
 
 @WebService
 public class HelloWorldImpl implements HelloWorld {
-  /* (non-Javadoc)
- * @see test.IHello#sayHi(java.lang.String)
- */
-public String sayHi(String name) {
-    return "Hello " + name;
-  }
-}
\ No newline at end of file
+    /*
+     * (non-Javadoc)
+     * @see test.IHello#sayHi(java.lang.String)
+     */
+    public String sayHi(String name) {
+        return "Hello " + name;
+    }
+}


Reply via email to