[JBoss JIRA] Created: (JBCACHE-893) Create a pluggable PojoCache Collection class implementation
by Ben Wang (JIRA)
Create a pluggable PojoCache Collection class implementation
------------------------------------------------------------
Key: JBCACHE-893
URL: http://jira.jboss.com/jira/browse/JBCACHE-893
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: PojoCache
Reporter: Ben Wang
Assigned To: Ben Wang
Fix For: PojoCache
Currently PojoCache only …
[View More]supports a single flavor of Collection classes, e.g., HashMap, HashSet, and ArrayList. To fully support different flavor of Collection implementation, we can either:
1. Enable array interception from Jboss Aop such that we can instrument all Collection implementation classes (including java.util.*). But JBoss Aop currently doesn't support it yet, and issues of instrumenting the Sun system classes also is problematic.
2. Create a pluggable architecture for different flavor of Collection implementation.
I think Option #2 is more realistic now. What I propose is this:
1. Will need to implement a specific flavor of collection interceptor and cache impl. E.g., in the case of List, it will be CachedListInterceptor and CachedListImpl.
2. Register the specific impl and the corresponding Collection class name to a registry
During runtime, when we encounter Collection classes, we will check the registry first to see which interceptor (and the corresponding cache impl) that we will use for this case.
Performance impact should be minimal since this is needed only for attach phase.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
17 years, 10 months
[JBoss JIRA] Created: (JBCACHE-750) PojoCache to deal with POJO without no-arg constructor
by Ben Wang (JIRA)
PojoCache to deal with POJO without no-arg constructor
------------------------------------------------------
Key: JBCACHE-750
URL: http://jira.jboss.com/jira/browse/JBCACHE-750
Project: JBoss Cache
Issue Type: Task
Security Level: Public (Everyone can see)
Components: PojoCache
Reporter: Ben Wang
Assigned To: Ben Wang
Fix For: PojoCache
This came up from a forum post that uses …
[View More]SynchronizedCollection. Here is the problem that Professor Chiba pointed out:
------
Ben,
SynchronizedRandomAccessList class has only the following constructors:
static class SynchronizedRandomAccessList<E>
extends SynchronizedList<E>
implements RandomAccess {
SynchronizedRandomAccessList(List<E> list) {
super(list);
}
SynchronizedRandomAccessList(List<E> list, Object mutex) {
super(list, mutex);
}
:
}
I can modify Javassist so that the above constructors (visible only within the pacakge) will be copied to the generated class. But I am not sure that PojoCache can work with that generated class since it does not have a no-arg constructor.
Chiba
--------
No easy solution to this problem now. Maybe use the exisiting serialization for once during replication?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
17 years, 10 months
[JBoss JIRA] Updated: (JBCACHE-603) PojoCache perf test error
by Jason T. Greene (JIRA)
[ http://jira.jboss.com/jira/browse/JBCACHE-603?page=all ]
Jason T. Greene updated JBCACHE-603:
------------------------------------
Assignee: Jason T. Greene (was: Ben Wang)
> PojoCache perf test error
> -------------------------
>
> Key: JBCACHE-603
> URL: http://jira.jboss.com/jira/browse/JBCACHE-603
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> …
[View More]Reporter: Ben Wang
> Assigned To: Jason T. Greene
> Fix For: PojoCache
>
>
> During the perf test for PojoCache, once a while I ran into this error. It seems this error happens initially when there are lots of thread contention. Note that this error is absent when there is just single thread. This may involve Javassit or JBossAop.
> Caused by: java.lang.RuntimeException: javassist.NotFoundException: field: address in org.jboss.cache.data.Person
> at org.jboss.aop.annotation.AnnotationElement.getVisibleAnnotation(AnnotationElement.java:111)
> at org.jboss.aop.Advisor.resolveAnnotation(Advisor.java:292)
> at org.jboss.cache.aop.CachedType.hasSerializableAnnotation(CachedType.java:252)
> at org.jboss.cache.aop.TreeCacheAopDelegate._regularPutObject(TreeCacheAopDelegate.java:382)
> at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:164)
> at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:640)
> at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:400)
> ... 4 more
> Caused by: javassist.NotFoundException: field: address in org.jboss.cache.data.Person
> at javassist.CtClassType.getField(CtClassType.java:567)
> at org.jboss.aop.util.ReflectToJavassist.fieldToJavassist(ReflectToJavassist.java:34)
> at org.jboss.aop.annotation.AnnotationElement.getVisibleAnnotation(AnnotationElement.java:102)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
17 years, 10 months