Community

How exactly PojoCache.detach(Fqn fqn) works ... ?

created by Ajuba Ajuba in JBoss Cache POJO Edition - View the full discussion

I am using PojoCache version 3.0.x "Nana" with JobssAS 5.0.1

 

 

I am using JDBC CacheLoader "org.jboss.cache.loader.JDBCCacheLoader" for persisting the Nodes.

 

Configurations are as follows:

 

<!-- New 1.3.x cache loader config block -->
        <attribute name="CacheLoaderConfiguration">
            <config>
                <passivation>false</passivation>
               
                <cacheloader>
                    <class>org.jboss.cache.loader.JDBCCacheLoader</class>
                    <!-- whether the cache loader writes are asynchronous -->
                    <async>false</async>
                    <!-- only one cache loader in the chain may set fetchPersistentState to true.
                     An exception is thrown if more than one cache loader sets this to true.
                     -->
                    <fetchPersistentState>true</fetchPersistentState>
                    <!-- determines whether this cache loader ignores writes - defaults to false.
                    -->
                    <ignoreModifications>false</ignoreModifications>
                    <!-- if set to true, purges the contents of this cache loader when the cache
                    starts up. Defaults to false.  -->
                    <purgeOnStartup>false</purgeOnStartup>
                   
                    <!-- same as the old CacheLoaderConfig attribute -->
                    <properties>
                        cache.jdbc.driver=com.mysql.jdbc.Driver
                        cache.jdbc.url=jdbc:mysql://ipaddress/pojocachedb
                        cache.jdbc.user=myuser
                        cache.jdbc.password=mypassword
                        <!--  table properties -->
                        cache.jdbc.table.name=feedbackpojocache
                        cache.jdbc.table.create=false
                        cache.jdbc.table.drop=false
                        cache.jdbc.table.primarykey=feedbackpojocache_pk
                        cache.jdbc.fqn.column=fqn
                        cache.jdbc.fqn.type=varchar(255)
                        cache.jdbc.node.column=node
                        cache.jdbc.node.type=LONGBLOB
                        cache.jdbc.parent.column=parent
                    </properties>
                   
                </cacheloader>
            </config>
        </attribute>

 

 

 

Now when i am attaching fqn to PojoCache it is working fine, means it is writing it to Database as (FQN, NODE, PARENT) also.

 

but when i am detaching the Node it is deleting only NODE value from database ... not deleting the FQN and PARENT vlaues from database;

 

 

what to do..?

 

means how to delete FQN, NODE, PARENT from database.. when detaching the given Fqn..?

 

Pls help.

 

Regards,

Ajuba

Reply to this message by going to Community

Start a new discussion in JBoss Cache POJO Edition at Community