[Design of JBossCache] - Re: Name change for PojoCache annotation
by ben.wang@jboss.com
"genman" wrote : For inheritence, it seems appropriate to add an attribute rather than a separate annotation, for example:
|
| @Replicable(instanceOf=true)
| or
| @Replicable(subclasses=true)
|
| There might be some sort of relation term that would fit better than "instanceof", that means "child classes also".
|
Idea of using attribute is very good but it won't work as is. If you look at jbosscache-aop.xml, you will see that the now @InstanceOfPojoCacheable tag is used inside the JBoss Aop prepare statement:
| <prepare expr="field(!static * $instanceof{(a)org.jboss.cache.pojo.annotation.InstanceOfPojoCacheable}->*)" />
|
So replace that with a generic annotation with additional attribute won't work.
"sub-class" in better than InstanceOf (I am following the JBoss Aop usage, as you can see here), but SubClassOfReplicable, e.g., seems wordy?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986033#3986033
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986033
19 years, 4 months
[Design of POJO Server] - Serilizability of aop proxy
by scott.stark@jboss.org
When I tried the JndiBinding in the server where the naming service serializes the entries, its failing because the wrapping aop container proxy is not:
| Caused by: java.io.NotSerializableException: AOPContainerProxy$0
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
|
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
| at java.rmi.MarshalledObject.<init>(MarshalledObject.java:92)
| at org.jnp.interfaces.MarshalledValuePair.<init>(MarshalledValuePair.jav
| a:65)
| at org.jnp.interfaces.NamingContext.bind(NamingContext.java:562)
| ... 76 more
|
I updated the org.jboss.test.microcontainer.test.JndiLifeCycleTestCase to serialize the bindngs, and although its not failing with this error, its not unserializing the bean correctly. Is the proxy expected to reproduce the underlying object behavior with regard to serialization?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986024#3986024
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986024
19 years, 4 months