cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r551752 - in /incubator/cxf/trunk/rt: bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/ transports/jbi/src/main/java/org/apache/cxf/transport/jbi/
Date Fri, 29 Jun 2007 02:03:30 GMT
Author: ffang
Date: Thu Jun 28 19:03:29 2007
New Revision: 551752

URL: http://svn.apache.org/viewvc?view=rev&rev=551752
Log:
message.propertis clean up for JBI binding

Modified:
    incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperInInterceptor.java
    incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperOutInterceptor.java
    incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/Messages.properties
    incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java

Modified: incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java?view=diff&rev=551752&r1=551751&r2=551752
==============================================================================
--- incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java
Thu Jun 28 19:03:29 2007
@@ -84,7 +84,7 @@
         Exception e = message.getContent(Exception.class);
         Fault fault;
         if (e == null) {
-            throw new IllegalStateException("No exception on this message!");
+            throw new IllegalStateException(new Message("NO_EXCEPTION", BUNDLE).toString());
         } else if (e instanceof Fault) {
             fault = (Fault) e;
         } else {
@@ -96,7 +96,7 @@
     protected XMLStreamWriter getWriter(JBIMessage message) {
         XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);
         if (writer == null) {
-            throw new IllegalStateException("No XMLStreamWriter on this message");
+            throw new IllegalStateException(new Message("NO_XML_STREAM_WRITER", BUNDLE).toString());
         }
         return writer;
     }

Modified: incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperInInterceptor.java?view=diff&rev=551752&r1=551751&r2=551752
==============================================================================
--- incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperInInterceptor.java
Thu Jun 28 19:03:29 2007
@@ -69,7 +69,8 @@
         Endpoint ep = message.getExchange().get(Endpoint.class);
         BindingInfo binding = ep.getEndpointInfo().getBinding();
         if (!(binding instanceof JBIBindingInfo)) {
-            throw new IllegalStateException("BindingInfo should be a JbiBindingInfo");
+            throw new IllegalStateException(
+                  new org.apache.cxf.common.i18n.Message("NEED_JBIBINDING", BUNDLE).toString());
         }
 
         if (!StaxUtils.toNextElement(reader)) {
@@ -138,7 +139,7 @@
             }
             message.setContent(List.class, parameters);
         } catch (XMLStreamException e) {
-            throw new RuntimeException("Couldn't parse stream.", e);
+            throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC", BUNDLE),
e);
         }
     }
 

Modified: incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperOutInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperOutInterceptor.java?view=diff&rev=551752&r1=551751&r2=551752
==============================================================================
--- incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperOutInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIWrapperOutInterceptor.java
Thu Jun 28 19:03:29 2007
@@ -68,7 +68,7 @@
             List<?> objs = (List<?>) message.getContent(List.class);        
       
             if (objs.size() < parts.size()) {
                 throw new Fault(new org.apache.cxf.common.i18n.Message(
-                        "The number of arguments is not equal!", BUNDLE));
+                        "NOT_EQUAL_ARG_NUM", BUNDLE));
             }
             for (int idx = 0; idx < parts.size(); idx++) {
                 MessagePartInfo part = parts.get(idx);

Modified: incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/Messages.properties?view=diff&rev=551752&r1=551751&r2=551752
==============================================================================
--- incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/Messages.properties
(original)
+++ incubator/cxf/trunk/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/Messages.properties
Thu Jun 28 19:03:29 2007
@@ -44,4 +44,18 @@
 JBI.TRANSPORT.FACTORY.NOT.FULLY.INITIALIZED=JBITransport factory not fully initalised
 CREATE.SERVER.TRANSPORT=creating JBI server transport
 CREATE.CLIENT.TRANSPORT=creating JBI client transport
-UNKNOWN_OPERATION=unknown operation {0}
\ No newline at end of file
+UNKNOWN_OPERATION=unknown operation {0}
+NO_OPERATION_ELEMENT=no operation element
+NO_JBI_MESSAGE_ELEMENT=no jbi message element
+NO_ENOUGH_PARTS=no enough parts
+NO_JBI_PART_ELEMENT=no jbi part element
+EXPECTED_ELEMENT_IN_PART=expected element in part
+TOO_MUCH_PARTS=too much parts
+ILLEAGAL_JBIFAULT_FORMAT=illeagal jbi fault format
+STAX_READ_EXC=stax read exception
+XML_WRITE_EXC=xml write exception
+STAX_WRITE_EXC=stax write exception
+NOT_EQUAL_ARG_NUM=The number of arguments is not equal
+NEED_JBIBINDING=BindingInfo should be a JbiBindingInfo
+NO_EXCEPTION=No exception on this message
+NO_XML_STREAM_WRITER=No XMLStreamWriter on this message
\ No newline at end of file

Modified: incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java?view=diff&rev=551752&r1=551751&r2=551752
==============================================================================
--- incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java
(original)
+++ incubator/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestination.java
Thu Jun 28 19:03:29 2007
@@ -143,7 +143,11 @@
                 do {
                     MessageExchange exchange = null;
                     synchronized (channel) {
-                        exchange = channel.accept();
+                    	try {
+                    		exchange = channel.accept();
+                    	} catch (Exception e) {
+                    		//ignore
+                    	}
                     }
 
                     if (exchange != null) {



Mime
View raw message