Menu

Custom synchronization strategy

Help
Anonymous
2011-05-02
2012-09-28
  • Anonymous

    Anonymous - 2011-05-02

    Hi All,

    I am using ha-jdbc to replicate databases as part of a JBoss setup. I would
    like to use a FullSynchronizationStrategy to sync up databases when one has
    been away, but the full sync strategy sets auto-commit to true and we have
    BLOBs in our datasource, which prevents the sync up (everything worked fine
    without the BLOBs). Since I cannot find a way to make it not do that, I am
    looking into writing a custom synchronization strategy. This seems fairly
    easy, but where should I put it? Is there any way to extend from the
    outside, or do I need to make a custom jar with my own synchronization
    strategy inside? Also, is there a way to make FullSynchronizationStrategy
    not use auto-commit for the data?

    Kind regards,
    Fredrik

     
  • Paul Ferraro

    Paul Ferraro - 2011-05-07

    The FullSynchronizationStrategy only uses auto-commit for foreign key
    manipulation. The actual insert/remove statements are executed with autocommit
    off.
    Regarding creating a custom implementation, the class attribute of <sync>
    element in the ha-jdbc config lets you specify a custom implementation class.</sync>

     

Log in to post a comment.