each of CacheLoaderInterceptor, ReplicationInterceptor, and TransactionInterceptor
has a list of transactions for which they have been registered. after transaction
completion, the transactions are not removed from the list, so the lists grow without
bound. since these interceptors use List.contains, the lookups are linear, so you can
see this problem manifest itself with the following program:import
org.jboss.cache.TreeCache;
| import org.jboss.cache.DummyTransactionManagerLookup;
| import org.jboss.cache.transaction.DummyUserTransaction;
| import org.jboss.cache.transaction.DummyTransactionManager;
| import javax.transaction.UserTransaction;
|
| public class foo
| {
| public static void main(String[] argv)
| throws Exception
| {
| TreeCache tc;
| UserTransaction tx;
|
| tc = new TreeCache();
| tc.setTransactionManagerLookup(new DummyTransactionManagerLookup());
| tc.start();
|
| tx = new DummyUserTransaction(DummyTransactionManager.getInstance());
| tx.begin();
| tc.put("/foo/1", "item", new Integer(1));
| tx.commit();
|
| while (true)
| {
| long start = System.currentTimeMillis();
| for (int i = 0; i < 100; i++)
| {
| tx = new DummyUserTransaction(DummyTransactionManager.getInstance());
| tx.begin();
| tc.get("/foo/1", "item");
| tx.commit();
| }
| long stop = System.currentTimeMillis();
| System.out.println("took: " + (stop - start));
| }
| }
| }
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3853135#3853135
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3853135
-------------------------------------------------------
This Newsletter Sponsored by: Macrovision
For reliable Linux application installations, use the industry's leading
setup authoring tool, InstallShield X. Learn more and evaluate
today. http://clk.atdmt.com/MSI/go/ins0030000001msi/direct/01/
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development