Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9179509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:48:53+00:00 2026-06-17T17:48:53+00:00

I am trying to run a custom sql on a batch session object @Insert(INSERT

  • 0

I am trying to run a custom sql on a batch session object

@Insert("INSERT INTO ticker(Ticker, GetUpdate) VALUES(#{symbol}, 1) ON DUPLICATE KEY UPDATE GetUpdate = 1")
void enableQuoteforSymbol(@Param("symbol") String symbol);

but my following code, which is responsible for flushing and committing the batches have some mysterious behavior

while(true == continueProcessing.get())
{
    List<BatchResult> batchResult;
    try 
    {
        batchResult = batchSqlSession.flushStatements();

        if(batchResult.size() > 0 )
        {
            batchSqlSession.commit();
            batchSqlSession.clearCache();
        }

        Thread.sleep(configurationManager.BATCH_COMMITER_DELAY);
    }
    catch (Exception ex) 
    {
        logger.error("BatchService::run() - ", ex);
    }
}

it executes perfectly and batchSqlSession.flushStatements() does give back number of executed statements. Despite of successful execution of previous batch, this code batchResult = batchSqlSession.flushStatements(); and batchSqlSession.commit(); reruns the same old batch in next iteration. why ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:48:54+00:00Added an answer on June 17, 2026 at 5:48 pm

    Looks like it is a bug:
    http://code.google.com/p/mybatis/issues/detail?id=695

    Aready fixed for the next version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Silverstripe 3, I'm trying to run some custom SQL and return the result
I'm trying to run through some html and insert some custom tags around every
I have a large SQL file I'm trying to insert into the database. It
I'm trying to run a custom WinHTTP based web-server on Windows Server 2008 machine.
Is it possible to run nose test generators inside custom classes? I am trying
I'm trying to run some custom code on a particular type of node when
I am trying to run my application on a custom screen resolution but my
I'm trying to run Equinox and antRunner in headless mode with a custom eclipse.ini
I am trying to run a custom animation before I dismiss my modalviewcontroller. The
I am currently trying to run Doctrine in a custom (own) project, which isn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.