0 Replies Latest reply on Aug 18, 2004 11:49 AM by Pedro Salazar

    RW/RO EJB invalidation pattern not working

    Pedro Salazar Newbie

      Greetings,

      I created a read-only ejb Primitive that I pretend to invalidate through the read-write ejb PrimitiveRW. Both extends Standard CMP 2.x EntityBean with cache invalidation configuration (the read only extends CMP extended life time but this configuration extends the other configuration with longer passivation timeout).

      I simply do a lookup for a RW ejb instance, which I set the name to the same older name to generate a invalidation to other instances beans:

      myRWbean.setName(myRWbean.getName());
      


      But my RO bean isn't invalidated (the load never happens) when I do a new lookup!?

      I'm using jboss 3.2.5 and below is my jboss.xml:
      <jboss>
      
       <enterprise-beans>
      
       <entity>
       <ejb-name>Primitive</ejb-name>
       <local-jndi-name>ejb/PrimitiveLocal</local-jndi-name>
       <read-only>true</read-only>
       <configuration-name>CMP extended life time</configuration-name>
      
       <method-attributes>
       </method-attributes>
      
       <clustered>true</clustered>
       <cluster-config>
       <partition-name>DefaultPartition</partition-name>
       <home-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</home-load-balance-policy>
       <bean-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</bean-load-balance-policy>
       </cluster-config>
      
       <cache-invalidation>true</cache-invalidation>
       <cache-invalidation-config>
       <invalidation-group-name>PrimitiveCacheGroup</invalidation-group-name>
       </cache-invalidation-config>
       </entity>
      
       <entity>
       <ejb-name>PrimitiveRW</ejb-name>
       <local-jndi-name>ejb/PrimitiveRWLocal</local-jndi-name>
       <configuration-name>Standard CMP 2.x EntityBean with cache invalidation </configuration-name>
      
       <method-attributes>
       <method>
       <method-name>getName</method-name>
       <read-only>false</read-only>
       </method>
       <method>
       <method-name>setName</method-name>
       <read-only>false</read-only>
       </method>
       </method-attributes>
      
       <clustered>true</clustered>
       <cluster-config>
       <partition-name>DefaultPartition</partition-name>
       <home-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</home-load-balance-policy>
       <bean-load-balance-policy>org.jboss.ha.framework.interfaces.RoundRobin</bean-load-balance-policy>
       </cluster-config>
      
       <cache-invalidation>false</cache-invalidation>
       <cache-invalidation-config>
       <invalidation-group-name>PrimitiveCacheGroup</invalidation-group-name>
       </cache-invalidation-config>
       </entity>
      
      <container-configurations>
      
       <container-configuration
       extends="Standard CMP 2.x EntityBean with cache invalidation">
       <container-name>CMP extended life time</container-name>
       <container-cache-conf>
       <cache-policy>
       org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
       </cache-policy>
       <cache-policy-conf>
       <min-capacity>50</min-capacity>
       <max-capacity>1000000</max-capacity>
       <overager-period>300</overager-period>
       <max-bean-age>86400</max-bean-age>
       <resizer-period>400</resizer-period>
       <max-cache-miss-period>60</max-cache-miss-period>
       <min-cache-miss-period>1</min-cache-miss-period>
       <cache-load-factor>0.75</cache-load-factor>
       </cache-policy-conf>
       </container-cache-conf>
      </container-configuration>
      
      </container-configurations>
      
      </jboss>
      


      Regards,
      Pedro Salazar.