You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Greg Dritschler <gr...@gmail.com> on 2008/04/13 01:18:02 UTC

issues with transaction itest

The transaction itest has some policy issues.

WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
following are unfulfilled intents for component implementation -
TransferServiceComponent
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}managedTransaction.global]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
are unfulfilled intents for binding in reference - savings
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}propagatesTransaction]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
are unfulfilled intents for binding in reference - checking
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}propagatesTransaction]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
following are unfulfilled intents for component implementation -
SavingsAccountServiceComponent
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}managedTransaction.global]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
following are unfulfilled intents for binding in service - AccountService
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}propagatesTransaction]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
following are unfulfilled intents for component implementation -
CheckingAccountServiceComponent
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}managedTransaction.global]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
following are unfulfilled intents for binding in service - AccountService
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}propagatesTransaction]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
are unfulfilled intents for binding in reference - checking
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}propagatesTransaction]
Apr 12, 2008 5:27:14 PM
org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 problem
WARNING: Policy related exception:
org.apache.tuscany.sca.assembly.builder.impl.PolicyComputationException: The
are unfulfilled intents for binding in reference - savings
Unfulfilled Intents = [{
http://www.osoa.org/xmlns/sca/1.0}propagatesTransaction]

I believe the problem is with the appliesTo expressions in the policy sets
which use "implementation" and "binding".  I tried changing these to
"sca:implementation.java" and "sca:binding.sca".  (I had to use a namespace
prefix.  "implementation.java" and "binding.sca" without a prefix didn't
help.  I'm not sure if that's expected.)  This eliminated the warnings
related to the implementation intents but not the binding intents.  I
realized that the .composite file doesn't have binding.sca elements.  I
added them and the warnings went away.  Ideally it should not be necessary
to add binding.sca elements to the composite to get the applicable policy
sets to work.

After making the above corrections the TransactionTestCase fails with the
following exception.

java.lang.IllegalStateException: Thread already associated with another
transaction
    at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.resume(TransactionManagerImpl.java:172)
    at
org.apache.tuscany.sca.policy.transaction.TransactionManagerHelper.suspendsTransactionPostInvoke(TransactionManagerHelper.java:85)
    at
org.apache.tuscany.sca.policy.transaction.TransactionManagerHelper.handlesInbound(TransactionManagerHelper.java:199)
    at
org.apache.tuscany.sca.policy.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:97)
    at
org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
    at
org.apache.tuscany.sca.policy.transaction.TransactionInterceptor$TransactionalInvocation.run(TransactionInterceptor.java:117)
    at
org.apache.tuscany.sca.policy.transaction.TransactionInterceptor$TransactionalInvocation.run(TransactionInterceptor.java:106)
    at
org.apache.tuscany.sca.policy.transaction.TransactionManagerHelper.run(TransactionManagerHelper.java:156)
    at
org.apache.tuscany.sca.policy.transaction.TransactionManagerHelper.handlesOutbound(TransactionManagerHelper.java:137)
    at
org.apache.tuscany.sca.policy.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
    at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
    at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
    at $Proxy8.getAccounts(Unknown Source)
    at
org.apache.tuscany.sca.itest.transaction.TransactionTestCase.testTransaction(TransactionTestCase.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:612)
    at
org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
    at
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
    at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
    at
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
    at
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
    at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:75)
    at
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
    at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
    at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
    at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
    at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)

This is happening as TransferService is returning to the client.  I'm not
sure what the problem is here.

Greg