added synchronization around marshal/unmarshal

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@472421 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-11-08 08:23:08 +00:00
parent da5139c24b
commit 4b5bc5eb2d
1 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ final public class OpenWireFormat implements WireFormat {
return version;
}
public ByteSequence marshal(Object command) throws IOException {
public synchronized ByteSequence marshal(Object command) throws IOException {
if( cacheEnabled ) {
runMarshallCacheEvictionSweep();
@ -190,7 +190,7 @@ final public class OpenWireFormat implements WireFormat {
return sequence;
}
public Object unmarshal(ByteSequence sequence) throws IOException {
public synchronized Object unmarshal(ByteSequence sequence) throws IOException {
bytesIn.restart(sequence);
//DataInputStream dis = new DataInputStream(new ByteArrayInputStream(sequence));
@ -208,7 +208,7 @@ final public class OpenWireFormat implements WireFormat {
return command;
}
public void marshal(Object o, DataOutput dataOut) throws IOException {
public synchronized void marshal(Object o, DataOutput dataOut) throws IOException {
if( cacheEnabled ) {
runMarshallCacheEvictionSweep();