
| Key: |
CORE-3255
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Duplicate
|
| Priority: |
Blocker
|
| Assignee: |
Unassigned
|
| Reporter: |
Guido Anzuoni
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
JPOX Core
Created: 08/May/07 11:57 AM
Updated: 04/Jul/07 01:50 PM
|
|
| Component/s: |
Transactions
|
| Affects Version/s: |
1.2.0-beta-2
|
| Fix Version/s: |
None
|
|
|
Current implementation of isActive() is:
public boolean isActive()
{
boolean isActive = super.isActive();
if( isActive )
{
//do not join transaction if org.jpox.Transaction already started
return true;
}
joinTransaction();
return isActive;
}
The following fragment causes a
org.jpox.jdo.exceptions.TransactionNotActiveException on makePersistente() call
PersistenceManager pm = pmf.getPersistenceManager();
ut.setTransactionTimeout(300);
ut.begin();
Product product = new Product("Sony Discman", "A standard discman from Sony", 200.00);
pm.makePersistent(product);
Using the debugger it is clear that if
boolean isActive = super.isActive();
returns false, the active JTA transaction is correctly joined with the call to joinTransaction(); that
correctly toggles active flag to true in the superclass.
unfortunately local method variable isActive is not updated so the result is still false.
|
|
Description
|
Current implementation of isActive() is:
public boolean isActive()
{
boolean isActive = super.isActive();
if( isActive )
{
//do not join transaction if org.jpox.Transaction already started
return true;
}
joinTransaction();
return isActive;
}
The following fragment causes a
org.jpox.jdo.exceptions.TransactionNotActiveException on makePersistente() call
PersistenceManager pm = pmf.getPersistenceManager();
ut.setTransactionTimeout(300);
ut.begin();
Product product = new Product("Sony Discman", "A standard discman from Sony", 200.00);
pm.makePersistent(product);
Using the debugger it is clear that if
boolean isActive = super.isActive();
returns false, the active JTA transaction is correctly joined with the call to joinTransaction(); that
correctly toggles active flag to true in the superclass.
unfortunately local method variable isActive is not updated so the result is still false.
|
Show » |
|