cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1180026 - in /cxf/trunk/services/wsn: ./ src/main/java/org/apache/cxf/wsn/ src/main/java/org/apache/cxf/wsn/jaxws/ src/main/java/org/apache/cxf/wsn/jms/
Date Fri, 07 Oct 2011 12:47:50 GMT
Author: gnodet
Date: Fri Oct  7 12:47:49 2011
New Revision: 1180026

URL: http://svn.apache.org/viewvc?rev=1180026&view=rev
Log:
[CXF-3848] [wsn] use cxf-parent, disable checkstyle, fix pmd violations

Modified:
    cxf/trunk/services/wsn/pom.xml
    cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java
    cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
    cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java
    cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java
    cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java
    cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java
    cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java

Modified: cxf/trunk/services/wsn/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/pom.xml?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/pom.xml (original)
+++ cxf/trunk/services/wsn/pom.xml Fri Oct  7 12:47:49 2011
@@ -27,13 +27,21 @@
 
     <parent>
         <groupId>org.apache.cxf</groupId>
-        <artifactId>cxf</artifactId>
+        <artifactId>cxf-parent</artifactId>
         <version>2.5.0-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
+
+    <properties>
+        <checkstyle.skip>true</checkstyle.skip>
+    </properties>
 	
 	<dependencies>
         <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jaxws_2.2_spec</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
             <version>1.6.1</version>

Modified: cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java (original)
+++ cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractCreatePullPoint.java Fri
Oct  7 12:47:49 2011
@@ -38,7 +38,7 @@ import org.w3c.dom.Element;
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.CreatePullPoint")
 public abstract class AbstractCreatePullPoint extends AbstractEndpoint implements CreatePullPoint
{
 
-    private final Logger logger = LoggerFactory.getLogger(AbstractCreatePullPoint.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractCreatePullPoint.class);
 
     private IdGenerator idGenerator;
 
@@ -68,7 +68,7 @@ public abstract class AbstractCreatePull
                       partName = "CreatePullPointRequest")
             org.oasis_open.docs.wsn.b_2.CreatePullPoint createPullPointRequest) throws UnableToCreatePullPointFault
{
 
-        logger.debug("CreatePullEndpoint");
+        LOGGER.debug("CreatePullEndpoint");
         return handleCreatePullPoint(createPullPointRequest, null);
     }
 
@@ -91,7 +91,7 @@ public abstract class AbstractCreatePull
             success = true;
             return response;
         } catch (EndpointRegistrationException e) {
-            logger.warn("Unable to register new endpoint", e);
+            LOGGER.warn("Unable to register new endpoint", e);
             UnableToCreatePullPointFaultType fault = new UnableToCreatePullPointFaultType();
             throw new UnableToCreatePullPointFault("Unable to register new endpoint", fault,
e);
         } finally {
@@ -100,7 +100,7 @@ public abstract class AbstractCreatePull
                 try {
                     pullPoint.destroy();
                 } catch (UnableToDestroyPullPointFault e) {
-                    logger.info("Error destroying pullPoint", e);
+                    LOGGER.info("Error destroying pullPoint", e);
                 }
             }
         }

Modified: cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
(original)
+++ cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractNotificationBroker.java
Fri Oct  7 12:47:49 2011
@@ -76,7 +76,7 @@ public abstract class AbstractNotificati
     public static final QName TOPIC_EXPRESSION_DIALECT_QNAME = new QName(NAMESPACE_URI, "TopicExpressionDialect",
PREFIX);
     public static final QName TOPIC_SET_QNAME = new QName(NAMESPACE_URI, "TopicSet", PREFIX);
 
-    private final Logger logger = LoggerFactory.getLogger(AbstractNotificationBroker.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractNotificationBroker.class);
 
     private IdGenerator idGenerator;
 
@@ -117,7 +117,7 @@ public abstract class AbstractNotificati
                       partName = "Notify")
             Notify notify) {
 
-        logger.debug("Notify");
+        LOGGER.debug("Notify");
         handleNotify(notify);
     }
 
@@ -170,7 +170,7 @@ public abstract class AbstractNotificati
             SubscribeCreationFailedFault, TopicExpressionDialectUnknownFault, TopicNotSupportedFault,
             UnacceptableInitialTerminationTimeFault, UnsupportedPolicyRequestFault, UnrecognizedPolicyRequestFault
{
 
-        logger.debug("Subscribe");
+        LOGGER.debug("Subscribe");
         return handleSubscribe(subscribeRequest, null);
     }
 
@@ -197,7 +197,7 @@ public abstract class AbstractNotificati
             success = true;
             return response;
         } catch (EndpointRegistrationException e) {
-            logger.warn("Unable to register new endpoint", e);
+            LOGGER.warn("Unable to register new endpoint", e);
             SubscribeCreationFailedFaultType fault = new SubscribeCreationFailedFaultType();
             throw new SubscribeCreationFailedFault("Unable to register new endpoint", fault,
e);
         } finally {
@@ -206,7 +206,7 @@ public abstract class AbstractNotificati
                 try {
                     subscription.unsubscribe();
                 } catch (UnableToDestroySubscriptionFault e) {
-                    logger.info("Error destroying subscription", e);
+                    LOGGER.info("Error destroying subscription", e);
                 }
             }
         }
@@ -242,7 +242,7 @@ public abstract class AbstractNotificati
             MultipleTopicsSpecifiedFault, NoCurrentMessageOnTopicFault, ResourceUnknownFault,
             TopicExpressionDialectUnknownFault, TopicNotSupportedFault {
 
-        logger.debug("GetCurrentMessage");
+        LOGGER.debug("GetCurrentMessage");
         NoCurrentMessageOnTopicFaultType fault = new NoCurrentMessageOnTopicFaultType();
         throw new NoCurrentMessageOnTopicFault("There is no current message on this topic.",
fault);
     }
@@ -269,7 +269,7 @@ public abstract class AbstractNotificati
             PublisherRegistrationFailedFault, PublisherRegistrationRejectedFault, ResourceUnknownFault,
             TopicNotSupportedFault {
 
-        logger.debug("RegisterPublisher");
+        LOGGER.debug("RegisterPublisher");
         return handleRegisterPublisher(registerPublisherRequest);
     }
 
@@ -287,7 +287,7 @@ public abstract class AbstractNotificati
             success = true;
             return response;
         } catch (EndpointRegistrationException e) {
-            logger.warn("Unable to register new endpoint", e);
+            LOGGER.warn("Unable to register new endpoint", e);
             PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
             throw new PublisherRegistrationFailedFault("Unable to register new endpoint",
fault, e);
         } finally {
@@ -295,7 +295,7 @@ public abstract class AbstractNotificati
                 try {
                     publisher.destroy();
                 } catch (ResourceNotDestroyedFault e) {
-                    logger.info("Error destroying publisher", e);
+                    LOGGER.info("Error destroying publisher", e);
                 }
             }
         }
@@ -312,7 +312,7 @@ public abstract class AbstractNotificati
         javax.xml.namespace.QName getResourcePropertyRequest
     ) throws ResourceUnavailableFault, ResourceUnknownFault, InvalidResourcePropertyQNameFault
{
 
-        logger.debug("GetResourceProperty");
+        LOGGER.debug("GetResourceProperty");
         return handleGetResourceProperty(getResourcePropertyRequest);
     }
 

Modified: cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java (original)
+++ cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/AbstractPullPoint.java Fri Oct
 7 12:47:49 2011
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.PullPoint")
 public abstract class AbstractPullPoint extends AbstractEndpoint implements PullPoint, NotificationConsumer
{
 
-    private final Logger logger = LoggerFactory.getLogger(AbstractPullPoint.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractPullPoint.class);
 
     protected AbstractCreatePullPoint createPullPoint;
 
@@ -65,7 +65,7 @@ public abstract class AbstractPullPoint 
                       partName = "Notify")
             Notify notify) {
 
-        logger.debug("Notify");
+        LOGGER.debug("Notify");
         for (NotificationMessageHolderType messageHolder : notify.getNotificationMessage())
{
             store(messageHolder);
         }
@@ -88,7 +88,7 @@ public abstract class AbstractPullPoint 
                       partName = "GetMessagesRequest")
             GetMessages getMessagesRequest) throws ResourceUnknownFault, UnableToGetMessagesFault
{
 
-        logger.debug("GetMessages");
+        LOGGER.debug("GetMessages");
         BigInteger max = getMessagesRequest.getMaximumNumber();
         List<NotificationMessageHolderType> messages = getMessages(max != null ? max.intValue()
: 0);
         GetMessagesResponse response = new GetMessagesResponse();
@@ -113,7 +113,7 @@ public abstract class AbstractPullPoint 
                       partName = "DestroyPullPointRequest")
             DestroyPullPoint destroyPullPointRequest) throws ResourceUnknownFault, UnableToDestroyPullPointFault
{
 
-        logger.debug("Destroy");
+        LOGGER.debug("Destroy");
         createPullPoint.destroyPullPoint(getAddress());
         return new DestroyPullPointResponse();
     }

Modified: cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java (original)
+++ cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jaxws/JaxwsPublisher.java Fri
Oct  7 12:47:49 2011
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.brw_2.PublisherRegistrationManager")
 public class JaxwsPublisher extends JmsPublisher {
 
-    private final Logger logger = LoggerFactory.getLogger(JaxwsPublisher.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(JaxwsPublisher.class);
 
     protected JaxwsNotificationBroker notificationBroker;
     private NotificationProducer notificationProducer;
@@ -66,7 +66,7 @@ public class JaxwsPublisher extends JmsP
             SubscribeResponse response = notificationProducer.subscribe(subscribeRequest);
             return WSNHelper.getPort(response.getSubscriptionReference(), SubscriptionManager.class);
         } catch (Exception e) {
-            logger.info("Error while subscribing on-demand publisher", e);
+            LOGGER.info("Error while subscribing on-demand publisher", e);
             return null;
         }
     }
@@ -76,7 +76,7 @@ public class JaxwsPublisher extends JmsP
         try {
             ((SubscriptionManager) sub).unsubscribe(new Unsubscribe());
         } catch (Exception e) {
-            logger.info("Error while unsubscribing on-demand publisher", e);
+            LOGGER.info("Error while unsubscribing on-demand publisher", e);
         }
     }
 

Modified: cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java (original)
+++ cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPublisher.java Fri Oct
 7 12:47:49 2011
@@ -53,7 +53,7 @@ import org.slf4j.LoggerFactory;
 
 public abstract class JmsPublisher extends AbstractPublisher implements ConsumerListener
{
 
-    private final Logger logger = LoggerFactory.getLogger(JmsPublisher.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(JmsPublisher.class);
 
     private Connection connection;
 
@@ -61,8 +61,6 @@ public abstract class JmsPublisher exten
 
     private JAXBContext jaxbContext;
 
-    private Topic jmsTopic;
-
     private List<ConsumerEventSource> advisories;
 
     private Map<Destination, Object> producers;
@@ -99,17 +97,17 @@ public abstract class JmsPublisher exten
             Message message = session.createTextMessage(writer.toString());
             producer.send(message);
         } catch (JMSException e) {
-            logger.warn("Error dispatching message", e);
+            LOGGER.warn("Error dispatching message", e);
         } catch (JAXBException e) {
-            logger.warn("Error dispatching message", e);
+            LOGGER.warn("Error dispatching message", e);
         } catch (InvalidTopicException e) {
-            logger.warn("Error dispatching message", e);
+            LOGGER.warn("Error dispatching message", e);
         } finally {
             if (session != null) {
                 try {
                     session.close();
                 } catch (JMSException e) {
-                    logger.debug("Error closing session", e);
+                    LOGGER.debug("Error closing session", e);
                 }
             }
         }
@@ -121,7 +119,7 @@ public abstract class JmsPublisher exten
             TopicNotSupportedFault {
         super.validatePublisher(registerPublisherRequest);
         try {
-            jmsTopic = topicConverter.toActiveMQTopic(topic);
+            topicConverter.toActiveMQTopic(topic);
         } catch (InvalidTopicException e) {
             InvalidTopicExpressionFaultType fault = new InvalidTopicExpressionFaultType();
             throw new InvalidTopicExpressionFault(e.getMessage(), fault);

Modified: cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java (original)
+++ cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsPullPoint.java Fri Oct
 7 12:47:49 2011
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
 
 public class JmsPullPoint extends AbstractPullPoint {
 
-    private final Logger logger = LoggerFactory.getLogger(JmsPullPoint.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(JmsPullPoint.class);
 
     private JAXBContext jaxbContext;
 
@@ -86,18 +86,18 @@ public class JmsPullPoint extends Abstra
             Message message = session.createTextMessage(writer.toString());
             producer.send(message);
         } catch (JMSException e) {
-            logger.warn("Error storing message", e);
+            LOGGER.warn("Error storing message", e);
             if (session != null) {
                 try {
                     session.close();
                 } catch (JMSException inner) {
-                    logger.debug("Error closing session", inner);
+                    LOGGER.debug("Error closing session", inner);
                 } finally {
                     session = null;
                 }
             }
         } catch (JAXBException e) {
-            logger.warn("Error storing message", e);
+            LOGGER.warn("Error storing message", e);
         }
     }
 
@@ -122,12 +122,12 @@ public class JmsPullPoint extends Abstra
             }
             return messages;
         } catch (JMSException e) {
-            logger.info("Error retrieving messages", e);
+            LOGGER.info("Error retrieving messages", e);
             if (session != null) {
                 try {
                     session.close();
                 } catch (JMSException inner) {
-                    logger.debug("Error closing session", inner);
+                    LOGGER.debug("Error closing session", inner);
                 } finally {
                     session = null;
                 }
@@ -135,7 +135,7 @@ public class JmsPullPoint extends Abstra
             UnableToGetMessagesFaultType fault = new UnableToGetMessagesFaultType();
             throw new UnableToGetMessagesFault("Unable to retrieve messages", fault, e);
         } catch (JAXBException e) {
-            logger.info("Error retrieving messages", e);
+            LOGGER.info("Error retrieving messages", e);
             UnableToGetMessagesFaultType fault = new UnableToGetMessagesFaultType();
             throw new UnableToGetMessagesFault("Unable to retrieve messages", fault, e);
         }

Modified: cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java?rev=1180026&r1=1180025&r2=1180026&view=diff
==============================================================================
--- cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java (original)
+++ cxf/trunk/services/wsn/src/main/java/org/apache/cxf/wsn/jms/JmsSubscription.java Fri Oct
 7 12:47:49 2011
@@ -67,7 +67,7 @@ import org.w3c.dom.Element;
 
 public abstract class JmsSubscription extends AbstractSubscription implements MessageListener
{
 
-    private final Logger logger = LoggerFactory.getLogger(JmsSubscription.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(JmsSubscription.class);
 
     private Connection connection;
 
@@ -203,7 +203,7 @@ public abstract class JmsSubscription ex
                 doNotify(notify);
             }
         } catch (Exception e) {
-            logger.warn("Error notifying consumer", e);
+            LOGGER.warn("Error notifying consumer", e);
         }
     }
 
@@ -219,7 +219,7 @@ public abstract class JmsSubscription ex
                 Boolean ret = (Boolean) exp.evaluate(content, XPathConstants.BOOLEAN);
                 return ret.booleanValue();
             } catch (XPathExpressionException e) {
-                logger.warn("Could not filter notification", e);
+                LOGGER.warn("Could not filter notification", e);
             }
             return false;
         }



Mime
View raw message