I need to split my application into application and web tiers (a
political requirement, to comply with company wide architecture
guidelines, not a technical one).

I use remote statefull session bean to implement large files transfers
between application tires. My statefull bean uses BEAN transaction
management. When I issue UserTransaction::commit() an
IllegalMonitorStateException is thrown.

If I invoke SFSB locally it works, but remote calls throw that Exception.

I've prepared a sample to illustrate that problem:
https://github.com/ksmigrod/remotestatefull
Unfortunately it is a monstrosity using Arquillian and two TomEE 7.0.4
containers.
Passing local test is method localUpload of
me.noip.ksmigrod.experiments.remotestatefull.CheckTest class.
Failing remote test is method uploadViaRest of the same class.

Is it a misconfiguraton on my part, a flawed flow control or a bug in TomEE?

Regards,
Krzysztof Śmigrodzki

 java.lang.IllegalMonitorStateException
        at
java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:151)
        at
java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1261)
        at
java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
        at
org.apache.openejb.resource.jdbc.managed.local.LocalXAResource.end(LocalXAResource.java:94)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:588)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:567)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:414)
        at
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:262)
        at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
        at
org.apache.openejb.core.CoreUserTransaction.commit(CoreUserTransaction.java:91)
        at
me.noip.ksmigrod.experiments.remotestatefull.control.FileAttachmentUploadBean.close(FileAttachmentUploadBean.java:135)

Reply via email to