I have managed to replicate this.
It's a race condition due to >1 threads concurrently deserializing the message.
The fix seems to be trivial. So hopefully will be in the next release.
In the mean-time you should be able to work around by synchronizing on the
underlying message as you mentioned. Although is slightly more complex since
the message you have is actually a proxy.
You need to do something like:
|
| OjbectMessage m = (ObjectMessage)consumer.receive();
|
| MessageProxy mp = (MessageProxy)m;
|
| JBossMessage jbm = mp.getMessage();
|
| synchronized (mp.getMessage())
| {
|
| Object myObject = m.getObject();
| }
|
|
I haven't tried it but it should work.
Of course the above is completely non portable so you want to remove it once
the fix is applied.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946267#3946267
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3946267
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user