svn commit: r1000042 - in /axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms: JMSOutTransportInfo.java JMSUtils.java

2010-09-22 Thread senaka
Author: senaka
Date: Wed Sep 22 15:36:29 2010
New Revision: 142

URL: http://svn.apache.org/viewvc?rev=142&view=rev
Log:
Applying patch for WSCOMMONS-523. Thanks Rajika

Modified:

axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSOutTransportInfo.java

axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java

Modified: 
axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSOutTransportInfo.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSOutTransportInfo.java?rev=142&r1=141&r2=142&view=diff
==
--- 
axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSOutTransportInfo.java
 (original)
+++ 
axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSOutTransportInfo.java
 Wed Sep 22 15:36:29 2010
@@ -171,7 +171,7 @@ public class JMSOutTransportInfo impleme
 return JMSUtils.lookupDestination(context, destinationName, 
destinationType);
 } catch (NamingException e) {
 handleException("Couldn't locate the JMS destination " + 
destinationName
-+ " of type " + destinationType + " extracted from the URL 
" + url);
++ " of type " + destinationType + " extracted from the URL 
" + url, e);
 }
 
 // never executes but keeps the compiler happy
@@ -196,7 +196,7 @@ public class JMSOutTransportInfo impleme
 return JMSUtils.lookupDestination(context, replyDestinationName, 
replyDestinationType);
 } catch (NamingException e) {
 handleException("Couldn't locate the JMS destination " + 
replyDestinationName
-+ " of type " + replyDestinationType + " extracted from 
the URL " + url);
++ " of type " + replyDestinationType + " extracted from 
the URL " + url, e);
 }
 
 // never executes but keeps the compiler happy
@@ -219,7 +219,7 @@ public class JMSOutTransportInfo impleme
 jmsConnectionFactory.getContext(), replyDest, 
replyDestinationType);
 } catch (NamingException e) {
 handleException("Couldn't locate the JMS destination " + replyDest
-+ " of type " + replyDestinationType);
++ " of type " + replyDestinationType, e);
 }
 
 // never executes but keeps the compiler happy

Modified: 
axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java?rev=142&r1=141&r2=142&view=diff
==
--- 
axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java
 (original)
+++ 
axis/axis2/java/transports/trunk/modules/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java
 Wed Sep 22 15:36:29 2010
@@ -194,7 +194,7 @@ public class JMSUtils extends BaseUtils 
// create temporary queue to receive the reply
replyDestination = createTemporaryDestination(session);
} catch (JMSException e) {
-   handleException("Error creating temporary queue for response");
+   handleException("Error creating temporary queue for response", 
e);
}
 }
 




svn commit: r1000074 - in /axis/axis2/java/core/trunk/modules/kernel: src/org/apache/axis2/transport/http/SOAPMessageFormatter.java src/org/apache/axis2/util/Utils.java test/org/apache/axis2/misc/Misc

2010-09-22 Thread scheu
Author: scheu
Date: Wed Sep 22 16:35:29 2010
New Revision: 174

URL: http://svn.apache.org/viewvc?rev=174&view=rev
Log:
AXIS2-4828
Committer:Rich Scheuerle
Summary:
Changed SOAPMessageFormatter to use an OutputStream to buffer the data.  This 
will allow components to access
the OutputStream.
Added a unit validation test.

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java

axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/misc/MiscTest.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java?rev=174&r1=173&r2=174&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
 Wed Sep 22 16:35:29 2010
@@ -65,13 +65,22 @@ public class SOAPMessageFormatter implem
 
 try {
 if (!(format.isOptimized()) && format.isDoingSWA()) {
-StringWriter bufferedSOAPBody = new StringWriter();
+// Write the SOAPBody to an output stream
+// (We prefer an OutputStream because it is faster)
+if (log.isDebugEnabled()) {
+log.debug("Doing SWA and the format is not optimized.  
Buffer the SOAPBody in an OutputStream");
+}
+ByteArrayOutputStream bufferedSOAPBodyBAOS = new 
ByteArrayOutputStream();
 if (preserve) {
-element.serialize(bufferedSOAPBody, format);
+element.serialize(bufferedSOAPBodyBAOS, format);
 } else {
-element.serializeAndConsume(bufferedSOAPBody, format);
+element.serializeAndConsume(bufferedSOAPBodyBAOS, format);
 }
-writeSwAMessage(msgCtxt, bufferedSOAPBody, out, format);
+// Convert the ByteArrayOutputStream to StreamWriter so that 
SWA can 
+// be added.
+String bufferedSOAPBody = 
Utils.BAOS2String(bufferedSOAPBodyBAOS, format.getCharSetEncoding());
+StringWriter bufferedSOAPBodySW = 
Utils.String2StringWriter(bufferedSOAPBody);
+writeSwAMessage(msgCtxt, bufferedSOAPBodySW, out, format);
 } else {
 if (preserve) {
 element.serialize(out, format);
@@ -100,12 +109,17 @@ public class SOAPMessageFormatter implem
 ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
 if (!format.isOptimized()) {
 if (format.isDoingSWA()) {
+if (log.isDebugEnabled()) {
+log.debug("Doing SWA and the format is not optimized.  
Buffer the SOAPBody in an OutputStream");
+}
 // Why are we creating a new OMOutputFormat
 OMOutputFormat format2 = new OMOutputFormat();
 format2.setCharSetEncoding(format.getCharSetEncoding());
-StringWriter bufferedSOAPBody = new StringWriter();
-element.serializeAndConsume(bufferedSOAPBody, format2);
-writeSwAMessage(msgCtxt, bufferedSOAPBody, bytesOut, 
format);
+ByteArrayOutputStream bufferedSOAPBodyBAOS = new 
ByteArrayOutputStream();
+element.serializeAndConsume(bufferedSOAPBodyBAOS, format2);
+String bufferedSOAPBody = 
Utils.BAOS2String(bufferedSOAPBodyBAOS, format2.getCharSetEncoding());
+StringWriter bufferedSOAPBodySW = 
Utils.String2StringWriter(bufferedSOAPBody);
+writeSwAMessage(msgCtxt, bufferedSOAPBodySW, bytesOut, 
format);
 } else {
 element.serializeAndConsume(bytesOut, format);
 }

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java?rev=174&r1=173&r2=174&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java 
(original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/util/Utils.java 
Wed Sep 22 16:35:29 2010
@@ -57,7 +57,11 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
+
+import java.io.ByteArrayOutp

svn commit: r1000122 - /axis/axis2/java/sandesha/trunk/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties

2010-09-22 Thread scheu
Author: scheu
Date: Wed Sep 22 18:21:33 2010
New Revision: 1000122

URL: http://svn.apache.org/viewvc?rev=1000122&view=rev
Log:
SANDESHA2-203
Contributor:Rick Slade
Committer:Rich Scheuerle
Summary:
Adjustments to the resource.properties file.
Some messages are removed.
Other messages are fixed.

Modified:

axis/axis2/java/sandesha/trunk/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties

Modified: 
axis/axis2/java/sandesha/trunk/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties?rev=1000122&r1=1000121&r2=1000122&view=diff
==
--- 
axis/axis2/java/sandesha/trunk/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
 (original)
+++ 
axis/axis2/java/sandesha/trunk/modules/core/src/main/resources/org/apache/sandesha2/i18n/resource.properties
 Wed Sep 22 18:21:33 2010
@@ -39,23 +39,19 @@
 
 cannotInitInMemoryStorageManager=Cannot initialize the given in-memory storage 
manager due to exception {0}.
 cannotInitPersistentStorageManager=Cannot initialize the given persistent 
storage manager due to exception {0}.
-cannotProceedDueToStorageManager=Sandesha2 Internal Error: the StorageManager 
is not available due to exception {0}.
 cannotGetStorageKey=Sandesha2 Internal Error: could not obtain the sandesha2 
storage key in order to store the message.
 cannotGetStorageManager=Sandesha2 Internal Error: could not load the specified 
storage manager. 
-storageManagerMustImplement=StorageManager {0} must implement the 
org.apache.sandesha2.storage.StorageManager interface.
+storageManagerMustImplement=StorageManager must implement the 
org.apache.sandesha2.storage.StorageManager interface.
 cannotInitSecurityManager=Cannot initialize the given security manager due to 
exception {0}.
 securityManagerMustImplement=SecurityManager {0} must implement the 
org.apache.sandesha2.storage.StorageManager interface.
 cannotInitEPRDecorator=Cannot initialize the given epr decorator due to 
exception {0}.
 eprDecoratorMustImplement=EPRDecorator {0} must implement the 
org.apache.sandesha2.addressing.EPRDecorator interface.
 cannotInitContextManager=Cannot initialize the given context manager due to 
exception {0}.
 contextManagerMustImplement=ContextManager {0} must implement the 
org.apache.sandesha2.context.ContextManager interface.
-cannotFindModulePolicies=No policies were found in the module.xml at the 
module initiation time.
 cannotPauseThread=Cannot pause a non-running thread.
 internalError=An internal error was encountered due to an unexpcted condition.
 
-commitError=Exception thrown when trying to commit the transaction: {0}.
 rollbackError=Exception thrown when trying to rollback the transaction: {0}.
-deadlock=Sandesha2 Internal Error: deadlock detected. Transaction details 
''{0}'', Bean details ''{1}''.
 noTransaction=Sandesha2 Internal Error: current thread does not have a 
transaction.
 inMsgError=Sandesha2 got an exception when processing an in message: {0}.
 outMsgError=Sandesha2 got an exception when processing an out message: {0}.
@@ -69,17 +65,17 @@ sequenceMEPWarning=The received CreateSe
 noValidSyncResponse=Sandesha2 sender thread has not received a valid 
synchronous response.
 classLoaderNotFound=Module class loader not found.
 
-defaultPropertyBeanNotSet=Sandesha2 Internal Error: ''DefaultPropertyBean'' is 
not set.
-propertyBeanNotSet=Sandesha2 Internal Error: ''PropertyBean'' is not set.
-optionsObjectNotSet=Sandesha2 Internal Error: ''Options'' object is not set.
-serviceContextNotSet=Sandesha2 Internal Error: ''ServiceContext'' is not set.
-sequenceIdBeanNotSet=Sandesha2 Internal Error: ''SequenceIdBean'' is not set.
-configContextNotSet=Sandesha2 Internal Error: ''ConfigurationContext'' is not 
set.
+defaultPropertyBeanNotSet=Sandesha2 Internal Error: 'DefaultPropertyBean' is 
not set.
+propertyBeanNotSet=Sandesha2 Internal Error: 'PropertyBean' is not set.
+optionsObjectNotSet=Sandesha2 Internal Error: 'Options' object is not set.
+serviceContextNotSet=Sandesha2 Internal Error: 'ServiceContext' is not set.
+sequenceIdBeanNotSet=Sandesha2 Internal Error: 'SequenceIdBean' is not set.
+configContextNotSet=Sandesha2 Internal Error: 'ConfigurationContext' is not 
set.
 soapEnvNotSet=Sandesha2 Internal Error:  SOAP envelope is not set.
 soapBodyNotPresent=Invalid SOAP message: the body is not present.
 unknownSoapVersion=Unknown SOAP version {0}.
-axisServiceIsNull=Sandesha2 Internal Error: ''AxisService'' is null.
-msgContextNotSet=Sandesha2 Internal Error: ''MessageContext'' is null.
+axisServiceIsNull=Sandesha2 Internal Error: 'AxisService' is null.
+msgContextNotSet=Sandesha2 Internal Error: 'MessageContext' is null.
 transportOutNotPresent=Sandesha2 Internal Error: original transport sender is 
not pres