[jboss-user] [JBossCache] - Is Fqn reuseable?
adamw
do-not-reply at jboss.com
Tue Feb 5 09:40:02 EST 2008
Hello,
I'm using JBoss Cache 1.4.1 (the one bundled with Seam) and have the following method:
| public void testCache1() {
| pojoCache.remove("/a");
| pojoCache.put("/a/b", 1, 1);
| }
|
In my test (which runs inside a Seam app), I start a transaction, invoke testCache1() and commit the transaction, and then repeat it once again. And it works without problems.
Now, I have another version of this method (which I though would be more efficient :) ):
| private static Fqn fqn1 = new Fqn("a");
| private static Fqn fqn2 = new Fqn(fqn1, "b");
|
| public void testCache2() {
| pojoCache.remove(fqn1);
| pojoCache.put(fqn2, 1, 1);
| }
|
When I repeat the test with testCache2(), it hangs on the second invocation of the put(fqn2,...) method.
The only difference between the two is that once I use the private static fqn-s, and once not. So can I reuse Fqn's, and if not, why?
--
Regards,
Adam Warski
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126562#4126562
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126562
More information about the jboss-user
mailing list