This discussion is archived
6 Replies Latest reply: Sep 24, 2013 10:58 PM by Sen2008 RSS

DB polling in cluster environment?

user12995128 Newbie
Currently Being Moderated

Hi all,

I have a DB adapter polling a table in a 2 node clustered environment. For each row it polls it is creating 2 instances on two servers and this is is causing issues when i call 3 rd party web service with identical data....i tried checking distributed polling in adapter config and also 'singleton' property in composite.xml, but still it creates duplicate instances some times and not all the times....Could some one suggest some thing for resolving this...

 

 

Thanks

  • 1. Re: DB polling in cluster environment?
    S.Ananth Explorer
    Currently Being Moderated

    What is the polling strategy you are using? Logical delete? Try using non-null values for MarkReadValue and MarkUnreadValue. And, if you are using MarkReservedValue, remove the value.

    P.S. singleton configuration may not be required if it's active-active cluster.

  • 2. Re: DB polling in cluster environment?
    user12995128 Newbie
    Currently Being Moderated

    Yes...The enviroment is active-active....and i am using logical delete....MarkReserved as 'Y', and Unread as 'N'....an dalso am uisng Mark reserved Value.....I will try removing the reserved value and singleton property...Can you please tell me when and when not to use reserved value...

  • 3. Re: DB polling in cluster environment?
    Anshul Explorer
    Currently Being Moderated

    try distributed polling option in DB Adapter.

     

    Regards,

    Anshul

  • 4. Re: DB polling in cluster environment?
    Sen2008 Explorer
    Currently Being Moderated

    After you enable 'Distributed Polling' from DBAdapter configuration, go to the <file>_mappings.xml (toplink file) search for remote-refresh key word.  If you find that, paste the content in the thread.  I want to see that.

     

    thanks

    sen

  • 5. Re: DB polling in cluster environment?
    user12995128 Newbie
    Currently Being Moderated

    Here is the content for remote-refresh sectioon of the file....

    <query name="XXXXXXXXXXXXXXXX" xsi:type="read-all-query">

                      <reference-class>YYYYYYYYYYYYYYYY</reference-class>

                      <refresh>true</refresh>

                      <remote-refresh>true</remote-refresh>

                      <lock-mode>lock-no-wait</lock-mode>

                      <container xsi:type="list-container-policy">

                         <collection-type>java.util.Vector</collection-type>

                      </container>

                   </query>

  • 6. Re: DB polling in cluster environment?
    Sen2008 Explorer
    Currently Being Moderated

    parameter looks fine.  I too faced similar problem with DBAdapter in cluster.  Later I realized that the above parameters were set in the wrong place.  I think this might be an issue with the relationship you create between tables.  Hence you need to identify the right place to set the above parameters. Look up my toplink file

     

     

    <reference-class>XXXXXXX</reference-class>

                      <refresh>false</refresh>

                      <remote-refresh>false</remote-refresh>

                      <cache-usage>primary-key</cache-usage>

                      <lock-mode>none</lock-mode>

                      <container xsi:type="list-container-policy">

                         <collection-type>java.util.Vector</collection-type>

                      </container>

                   </query>

                   <query name="XXXXXX" xsi:type="read-all-query">

                      <reference-class>XXXXXX</reference-class>

                      <refresh>false</refresh>

                      <remote-refresh>false</remote-refresh>

                      <lock-mode>none</lock-mode>

                      <container xsi:type="list-container-policy">

                         <collection-type>java.util.Vector</collection-type>

                      </container>

                   </query>

     

    In the above sample, you could notice the remote-refresh parameters are present twice.  When I enabled 'Distributed Polling' option, the parameters were set in the italics instead of in the text which is bold.  After I modified the toplink file, it works fine as expected. Hopes it clarifies you.

     

    rgds

    sen

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points