Announcement Announcement Module
Collapse
No announcement yet.
commitment control with spring-hibernate and AS400 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • commitment control with spring-hibernate and AS400

    I am using spring and hibernate with DB2/AS400. I am using programmatic transaction to update database.

    The following is the method to execute transaction.

    public void saveOrUpdate(final TestDTO testDto){

    this.getTransactionTemplate().setIsolationLevel(-1);

    transactionTemplate.execute(
    new TransactionCallback(){
    public Object doInTransaction(TransactionStatus ts){
    try{
    hibernateTemplate.saveOrUpdate(testDto);

    }
    catch(Exception e){
    ts.setRollbackOnly();
    }
    return null;


    }
    });
    }

    When I call this method, the following error comes.

    Caused by: java.sql.SQLException: [SQL7008] APAP0400 in TRUGER not valid for operation.

    The same error is coming for whatever isolatio level i set.

    When using Hibernate alone (without Spring) to access AS400, the same error comes with isolation level higher than 0.

    Using journaling solves the problem, but our requirement does not allow it because of performance issue.

    Please suggest if there is any way out to have commitment control without use of journaling.

  • #2
    This forum is for the Spring Integration project. Can you please post this question in the Data Access forum?

    Thanks,
    Mark

    Comment

    Working...
    X