-
1. Re: ejb3 SFSB with load-balancing but without replication
brian.stansberry Jan 24, 2007 10:31 AM (in response to mindflyer)You can set the CacheMode attribute in ejb3-clustered-sfsbcache-service.xml to LOCAL and that will disable replication. That will affect all EJB3 SFSBs though.
The org.jboss.annotation.ejb3.cache.tree.CacheConfig annotation has a name attribute which allows you to specify the ObjectName of the JBoss Cache instance. You could set up a separate cache, similar to ejb3-clustered-sfsbcache-service.xml but with CacheMode LOCAL. Then use the CacheConfig annotation on your beans to specify the use of that cache.
Haven't tried the 2nd paragraph, but should work.
Hmm. You'd also need to remove the cache loader and the eviction configuration from the cache, or it will try to serialize your bean for passivation. You thus lose the ability to passivate your bean.
It's also possible to do standard serialization tricks like making certain field transient, etc. -
2. Re: ejb3 SFSB with load-balancing but without replication
mindflyer Jan 26, 2007 4:02 AM (in response to mindflyer)Thanks!
I specified @CacheConfig.name for separate cache with CacheMode LOCAL and @Cache for my implementation of StatefulCache. It works. -
3. Re: ejb3 SFSB with load-balancing but without replication
brian.stansberry Jan 26, 2007 10:00 AM (in response to mindflyer)Great! I appreciate your telling me it works; I thought it would but now I know. :-)