Works for me now. Thanks a lot!
Andrus
On Feb 11, 2007, at 6:42 PM, David Jencks (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/GERONIMO-2809?
> page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> David Jencks closed GERONIMO-2809.
> ----------------------------------
>
> Resolution: Fixed
> Assignee: David Jencks
>
> Fixed in rev 506176. I reversed the iff condition. Let me know if
> there are further problems.
>
>> TransactionManagerImpl.getTransactionStatus() shouldn't throw on
>> no tx (with patch)
>> ---------------------------------------------------------------------
>> --------------
>>
>> Key: GERONIMO-2809
>> URL: https://issues.apache.org/jira/browse/
>> GERONIMO-2809
>> Project: Geronimo
>> Issue Type: Bug
>> Security Level: public(Regular issues)
>> Components: transaction manager
>> Affects Versions: 2.0
>> Reporter: Andrus Adamchik
>> Assigned To: David Jencks
>> Fix For: 2.0
>>
>> Attachments: patch.txt
>>
>>
>> org.apache.geronimo.transaction.manager.TransactionManagerImpl,
>> implementation of
>> "TransactionSynchronizationRegistry.getTransactionStatus()" method
>> throws an IllegalStateException when called outside of active
>> transaction. I believe this behavior is wrong. According to JTA
>> javadocs:
>> "int getTransactionStatus()
>> Return the status of the transaction bound to the current thread
>> at the time this method is called. This is the result of executing
>> TransactionManager.getStatus() in the context of the transaction
>> bound to the current thread at the time this method is called.
>> Returns: the status of the transaction bound to the current thread
>> at the time this method is called."
>> So no exception is specified in the spec. Also current behavior
>> caused grief when implementing a JPA provider. Most methods on the
>> EntityManager have this note: "throws TransactionRequiredException
>> if invoked on a container-managed entity manager of type
>> PersistenceContextType.TRANSACTION and there is no transaction.",
>> but currently the provider can't even check the tx status
>> consistently, since this unexpected exception is thrown.
>> See attached patch for the trivial fix.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
|