Results 1 to 2 of 2

Thread: commitment control with spring-hibernate and AS400

  1. #1
    Join Date
    Aug 2008
    Posts
    5

    Default 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. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

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

    Thanks,
    Mark

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •