openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Lee (JIRA)" <>
Subject [jira] Created: (OPENJPA-381) OpenJPA is not doing Optimistic locking when running in JEE evnironment
Date Sat, 22 Sep 2007 02:50:50 GMT
OpenJPA is not doing Optimistic locking when running in JEE evnironment

                 Key: OPENJPA-381
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 1.0.0
         Environment: JEE
            Reporter: Daniel Lee
             Fix For: 1.1.0

The follwoing code seems to be leaving isolation level to -1 (default) instead of setting
a correct isolation level for the connections.  I think this is not right because this is
leaving the contianer to use its own default isolation level.  It will be, for example, Repeatable-read
when using IBM WebShpere.

    public static DecoratingDataSource installDBDictionary(DBDictionary dict,
        DecoratingDataSource ds, final JDBCConfiguration conf,
        boolean factory2) {

with the default value set in
    public JDBCConfigurationImpl(boolean derivations, boolean loadGlobals) {
        super(false, false);
        String[] aliases;

        schema = addString("jdbc.Schema");
        schemas = addStringList("jdbc.Schemas");

        transactionIsolation = addInt("jdbc.TransactionIsolation");
        aliases = new String[]{
            "default", String.valueOf(-1),
            "none", String.valueOf(Connection.TRANSACTION_NONE),
            "read-committed", String.valueOf
            "read-uncommitted", String.valueOf
            "repeatable-read", String.valueOf
            "serializable", String.valueOf(Connection.TRANSACTION_SERIALIZABLE)

The fix of this is to set it to "Read-Committed" which will make it in sync with JDBC direct

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message