mirror of https://github.com/apache/activemq.git
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:
parent
da5139c24b
commit
4b5bc5eb2d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue