Instructions on using DataStore with concurrent J2EE transactions

Description

ContentFeatureSource is currently referencing a single transaction object, causing problems when it is accessed by multiple threads that work against different transactions (a common occurrence in J2EE environments).

I propose to add an indirection, so transactions can be cached and accessed on a thread-local basis:

public abstract class ContentFeatureSource {
public void setTransactionCache(TransactionCache transactionCache){
this.transactionCache = transactionCache;
}
}

public interface TransactionCache {
// returns a thread-local transaction
Transaction getTransaction();

}

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Priority

Medium
Configure