Isolation Level

Hi All
I have couple of queries on the isolation level for write connection
<1> What is the default isolation level for write connection in toplink ?
<2> If I use beginEarlyTransaction on an UOW instance, will it acquire the database row lock on its own or should I set the required isolation level through an API and What is the desired isolation level in this case SERIALIZABLE OR REPEATABLE READ ?
Thanks in advance
Regards
Ben
Message was edited by:
[email protected]

'serializable' should work with 8i/9i database.
what version are you using

Similar Messages

  • Locks and Isolation Levels

    Hello,
    I'm new to the Oracle environment and have just started using PL/SQL on Oracle 8i. Where can I find info on how Oracle locks data and how transaction isolation levels are used? We've still not recvd our manuals so please any replies referring to manuals are not welcome!

    You could move forward balance into its own table. That was, the SELECT will not lock on the original table. Most of the running balance schemes that I have seen take a snapshot as of a given date (say, statement printing date) and record both the timestamp and the amount. Next month, you simply get last month's vaule and timestamp and query on transactions after that timestamp.
    - Saish

  • Can you set isolation levels of message-driven bean transactions?

    The problem: I have 3 different message-driven beans which each get a different type of message, except for a field that is common to all. That field is used as the primary key of an entity object. The message-driven beans configured to use a container managed transaction. Each message-driven bean, in processing the message, first does a lookup by primary key to see if the object associated with the key exists, and if it does not, it requests the entity's home object to create it. After that, they do further processing. The problem is that sometimes all the beans simultaneously get a message, resulting in each bean checking for the entity object at about the same time, and if they fail to find it (because none of them has created it yet), each creates an object, all with the same primary key. This is not caught until the beans start to complete their onMessage method, which I believe results in the container committing the transaction. One of the transactions will be committed successfully, while the other two will fail, get rolled back, and then be retried with the same message. The second time through, the other beans will find the entity object (since it has been created and committed) and they will complete correctly. In the end, they right thing occurs, except that there is a troubling exception or 2 in the log telling about the constraint violation (with the primary key) and the rollback. If it was just me, that would be fine, but our customer does not like to see exceptions in the log; that indicates to him that something is wrong.
    So, I am looking for someway to make sure that the actions of the message-driven beans are serialized. One suggestion from a colleague was to set the isolation level of the transactions being used by the container in processing the message-driven beans' onMessage method. However, the documentation does not mention any way to do this for a message-driven bean. Suggestions?
    Is the use of a UserTransaction a better way to do this? If I acquire a UserTransaction within the onMessage method of a message-driven bean, can I set its isolation level? How would this work? When I get a UserTransaction, does each client get a different transaction, or do they all get the same one?

    (1) The WebLogic JMS "unit-of-order" feature is a heavily adopted feature that was specifically designed to handle similar use cases - see the JMS developer guide for extensive documentation. In your use case, if "key" is used to define UOO, then there's no limit on the number of keys that can be processed concurrently, but messages for any particular key will be processed single-threaded in the order in which they were first submitted.
    Note that if you're using distributed destinations, the UOO feature is still fully supported - but the developer and/or administrator needs to decide whether to configure the destination to use "hash" or "path service" based routing (the JMS UOO edoc outlines the trade-offs).
    (2) Another alternative is to use a single MDB with max-beans-free-pool that processes all three types (as the other poster suggested). I think this assumes all MDBs run on the same JVM.
    (3) Another alternative is to use multiple queues, with a single MDB on each Q. Where some sort of hash algorithm is used to determine which Q is for the key. This approach is a "hand-coded" variant of the approach in (1) with "hash" based routing enabled...
    (4) If all MDBs actually do run in the same JVM, a third alternative is to use code the application to use a common lock to protect each key, eg, something like:
    // assume MyLock is simply a class with a "reference counter"
    // assume some global "staticHM" hash map that is all MDBs can access
    onMessage() {
    MyLock lock = null;
    key= msg.getKey();
    synchronized(staticHM) {
    lock = staticHM.get();
    if (lock = null) {
    lock = new lock();
    staticHM.put(key, new lock());
    lock.incRefCount();
    try {
    synchronized(lock) {
    // only one onMessage will be able to lock a particular key at a time
    do your work;
    } finally {
    synchronized(staticHT) {
    if (lock.defRefCount() == 0) staticHM.remove(lock);
    if (lock = null) staticHM.put(key);
    If multiple threads get a message with the same key, then only one thread at a time will work on the key.
    Hope this helps,
    Tom

  • Pls tel me what is the diffrence between snapshot isolation level of mssql and oracels isolation level

    Hi,
            In mssql i am using following things.
           I have two database D1 and D2, i am using snapshot isolation (ALTER DATABASE MyDatabase
    SET ALLOW_SNAPSHOT_ISOLATION ON) in both database.
    Following is the situation.
    1) There is  one SP sp1 ( it can be in any database d1 or d2), it updates d2 from d1.
    2) d2 is used for reading by web, execept above SP sp1
    3) d1 gets updation from web in readcommite isolation.
    4) both database will be on same instence of mssql.
    Q1) wanted to know how to implement the same thing in oracle 11x express edition.
    Q2) is there any diffrence between snapshot isolation level of mssql and oracel.
    any link would be help full.
    yours sincerely

    >Q1) should i set the option to OFF after the process(ts) is complete
    No keep it on.
    >Q2) ALLOW_SNAPSHOT_ISOLATION  ON , will affect other isolation level's transactions
    No it will not affect any other transaction isolation level.
    >Q3) is my choice of isolation level for process(ts) is correct or there can be any other solution.
    Seems fine, although there are probably many other solutions.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • How do you determine a process or sessions isolation level.

    We are using COM+ components to issue database statements against an Oracle 8i database. COM+ has a property that allows you to set the isolation level. Is there any tool or query that would allow me to verify the isolation level in use by a session or process? I want to verify this property is actually affecting the connection to the DB.
    Thanks,
    Sam

    FLAG is just one of those columns that Oracle uses. It isn't documented but, as far as I know (which isn't very far), the only use for it is to record the isolation level for the transaction.
    I didn't mention it because I didn't think it helped you, for this reason: we don't get a record in the v$transaction view until the transaction has already started. At which point it is too late to change the ISOLATION_LEVEL for the transaction.
    Although I suppose you could do this:
    BEGIN
       UPDATE dummy_table set col1 = col1;
       -- remember V$TRANSACTION shows all txns
       SELECT count(1) INTO ln
       FROM   v$transaction t, v$session s
       WHERE  bitand(t.flag,268435456) <> 0
       AND    s.taddr = t.addr
       AND    s.audsid = sys_context('userenv', 'sessionid');
       IF ln = 0
       THEN
          ROLLBACK;
          SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
       END IF;
       --  do_whatever
       COMMIT;
    END ;.
    Cheers, APC

  • Bug in Oracle's handling of transaction isolation levels?

    Hello,
    I think there is a bug in Oracle 9i database related to serializable transaction isolation level.
    Here is the information about the server:
    Operating System:     Microsoft Windows 2000 Server Version 5.0.2195 Service Pack 2 Build 2195
    System type:          Single CPU x86 Family 6 Model 8 Stepping 10 GenuineIntel ~866 MHz
    BIOS-Version:          Award Medallion BIOS v6.0
    Locale:               German
    Here is my information about the client computer:
    Operaing system:     Microsoft Windows XP
    System type:          IBM ThinkPad
    Language for DB access: Java
    Database information:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    The database has been set up using the default settings and nothing has been changed.
    To reproduce the bug, follow these steps:
    1. Create a user in 9i database called 'kaon' with password 'kaon'
    2. Using SQL Worksheet create the following table:
    CREATE TABLE OIModel (
    modelID int NOT NULL,
    logicalURI varchar (255) NOT NULL,
    CONSTRAINT pk_OIModel PRIMARY KEY (modelID),
    CONSTRAINT logicalURI_OIModel UNIQUE (logicalURI)
    3. Run the following program:
    package test;
    import java.sql.*;
    public class Test {
    public static void main(String[] args) throws Exception {
    java.util.Locale.setDefault(java.util.Locale.US);
    Class.forName("oracle.jdbc.OracleDriver");
    Connection connection=DriverManager.getConnection("jdbc:oracle:thin:@schlange:1521:ORCL","kaon","kaon");
    DatabaseMetaData dmd=connection.getMetaData();
    System.out.println("Product version:");
    System.out.println(dmd.getDatabaseProductVersion());
    System.out.println();
    connection.setAutoCommit(false);
    connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
    int batches=0;
    int counter=2000;
    for (int outer=0;outer<50;outer++) {
    for (int i=0;i<200;i++) {
    executeUpdate(connection,"INSERT INTO OIModel (modelID,logicalURI) VALUES ("+counter+",'start"+counter+"')");
    executeUpdate(connection,"UPDATE OIModel SET logicalURI='next"+counter+"' WHERE modelID="+counter);
    counter++;
    connection.commit();
    System.out.println("Batch "+batches+" done");
    batches++;
    protected static void executeUpdate(Connection conn,String sql) throws Exception {
    Statement s=conn.createStatement();
    try {
    int result=s.executeUpdate(sql);
    if (result!=1)
    throw new Exception("Should update one row, but updated "+result+" rows, query is "+sql);
    finally {
    s.close();
    The program prints the following output:
    Product version:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Batch 0 done
    Batch 1 done
    java.lang.Exception: Should update one row, but updated 0 rows, query is UPDATE OIModel SET logicalURI='next2571' WHERE modelID=2571
         at test.Test.executeUpdate(Test.java:35)
         at test.Test.main(Test.java:22)
    That is, after several iterations, the executeUpdate() method returns 0, rather than 1. This is clearly an error.
    4. Leave the database as is. Replace the line
    int counter=2000;
    with line
    int counter=4000;
    and restart the program. The following output is generated:
    Product version:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Batch 0 done
    Batch 1 done
    java.sql.SQLException: ORA-08177: can't serialize access for this transaction
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796)
         at test.Test.executeUpdate(Test.java:33)
         at test.Test.main(Test.java:22)
    This is clearly an error - only one transaction is being active at the time, so there is no need for serialization of transactions.
    5. You can restart the program as many times you wish (by chaging the initial counter value first). The same error (can't serialize access for this transaction) will be generated.
    6. The error doesn't occur if the transaction isolation level isn't changed.
    7. The error doesn't occur if the UPDATE statement is commented out.
    Sincerely yours
         Boris Motik

    I have a similar problem
    I'm using Oracle and serializable isolation level.
    Transaction inserts 4000 objects and then updates about 1000 of these objects.
    Transactions sees inserted objects but cant update them (row not found or can't serialize access for this transaction are thrown).
    On 3 tries for this transaction 1 succeds and 2 fails with one of above errors.
    No other transactions run concurently.
    In read commited isolation error doesn't arise.
    I'm using plain JDBC.
    Similar or even much bigger serializable transaction works perfectly on the same database as plsql procedure.
    I've tried oci and thin (Oracle) drivers and oranxo demo (i-net) driver.
    And this problems arises on all of this drivers.
    This problem confused me so much :(.
    Maby one of Oracle users, developers nows cause of this strange behaviour.
    Thanx for all answers.

  • Setting Isolation level of UserTransaction Object

    can we set the Isolation level of the UserTransaction in case of bean managed transaction or in case where we are handeling transaction in servlets (I am trying to do it in servlets by geting Javax.Transaction.UserTransaction through JNDI in weblogic). UserTransaction only have few methods and none of them is to set the Isolation level. so where would be the seting or its not possible which I think should not be the case
    Thanks

    Hi,
    The UserTransaction is not the right place to set the isolation level, because then it would be the same setting
    for all data sources you access in that transaction.
    Rather, you can set the isolation level in each connection you make. That way, you can choose a different setting for each one.
    Best,
    Guy
    Guy Pardon ( [email protected] )
    Atomikos Software Technology: Transactioning the Net
    http://www.atomikos.com/

  • Setting isolation level with JDriver for Oracle/XA

    edocs (http://e-docs.bea.com/wls/docs70/oracle/trxjdbcx.html#1080746) states that,
    if using jDriver for Oracle/XA you can not set the transaction isolation level
    for a transaction and that 'Transactions use the transaction isolation level set
    on the connection or the default transaction isolation level for the database'.
    Does this mean that you shouldn't try to set it programatically (fair enough)
    or that you can't set it in the weblogic deployment descriptor either? Also anybody
    got any idea what the default is likely to be if you are using an Oracle 9iR2
    database? Is this determined by some database setting?

    IJ wrote:
    edocs (http://e-docs.bea.com/wls/docs70/oracle/trxjdbcx.html#1080746) states that,
    if using jDriver for Oracle/XA you can not set the transaction isolation level
    for a transaction and that 'Transactions use the transaction isolation level set
    on the connection or the default transaction isolation level for the database'.
    Does this mean that you shouldn't try to set it programatically (fair enough)
    or that you can't set it in the weblogic deployment descriptor either? Also anybody
    got any idea what the default is likely to be if you are using an Oracle 9iR2
    database? Is this determined by some database setting?The system should honor the setting defined in the deployment descriptor,
    however, for oracle it may not be helpful to change it. Oracle provides two
    isolation levels. The default is always READ_COMMITTED. The other
    setting is SERIALIZABLE, but this hurts performance, and is also problematic
    in the way oracle implements it. For instance, even if you set SERIALIZABLE,
    oracle will not lock read data. It will allow other transactions to read and/or
    alter data trhat another ongoing SERIALIZABLE transaction has read. The
    only way to really lock read data in oracle is to issue oracle-specific SQL in
    your select: "SELECT ..... FOR UPDATE".
    All in all, you should collect a strong case for why you can't proceed with
    READ_COMMITTED first. Then you should research oracle's recommendations
    (and their problem record) with SERIALIZABLE.
    Joe Weinstein at BEA

  • Setting isolation level fails

    Hi,
    Im using Kodo 3.0.0 on Oracle 8.1.7.
    I tried to define the isolation level in the kodo.properties:
    e.g.: kodo.jdbc.TransactionIsolation: serializable
    Unfortunately Oracle throws an exception which says, that "set
    transaction" has to be the first statement called within a transaction. I
    get this exception on almost every db access.
    java.sql.SQLException: ORA-01453: SET TRANSACTION muss erste Anweisung der
    Transaktion sein
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:1
    50)
    at
    kodo.jdbc.meta.VerticalClassMapping.fromMappingInfo(VerticalClassMapp
    ing.java:135)
    at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvid
    er.java:56)
    at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
    java:342)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
    7)
    at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
    java:325)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
    7)
    at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:2
    72)
    at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:
    256)
    at kodo.query.AbstractQuery.internalCompile(AbstractQuery.java:538)
    at kodo.query.AbstractQuery.compile(AbstractQuery.java:502)
    at kodo.datacache.CacheAwareQuery.compile(CacheAwareQuery.java:265)
    -- Wolfgang

    Marc,
    Here you go...
    kodo.util.FatalDataStoreException: ORA-01453: SET TRANSACTION must be
    first statement of transaction
         at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:897)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.initTestModel(AbstractConcurrentAction.java:290)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction$InitRunnable.run(AbstractConcurrentAction.java:212)
         at
    edu.sjsu.recon.util.ConcurrencyUtilities.executeSynchronized(ConcurrencyUtilities.java:20)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.setup(AbstractConcurrentAction.java:75)
         at
    edu.sjsu.recon.execution.ServerExecutor.beforeExecute(ServerExecutor.java:27)
         at
    edu.sjsu.recon.execution.AbstractExecutor.execute(AbstractExecutor.java:43)
         at
    edu.sjsu.recon.execution.DefaultExecutionCoordinator.executeAction(DefaultExecutionCoordinator.java:25)
         at
    edu.sjsu.recon.server.handler.ExecutionRequestHandler.handleRequest(ExecutionRequestHandler.java:63)
         at edu.sjsu.recon.server.RequestProcessor.run(RequestProcessor.java:90)
    NestedThrowablesStackTrace:
    kodo.util.DataStoreException: ORA-01453: SET TRANSACTION must be first
    statement of transaction
         at
    kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3004)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
         at kodo.jdbc.runtime.JDBCStoreManager.connect(JDBCStoreManager.java:871)
         at
    kodo.jdbc.runtime.JDBCStoreManager.retainConnection(JDBCStoreManager.java:189)
         at kodo.jdbc.runtime.JDBCStoreManager.begin(JDBCStoreManager.java:114)
         at
    kodo.runtime.DelegatingStoreManager.begin(DelegatingStoreManager.java:95)
         at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:1004)
         at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:885)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.initTestModel(AbstractConcurrentAction.java:290)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction$InitRunnable.run(AbstractConcurrentAction.java:212)
         at
    edu.sjsu.recon.util.ConcurrencyUtilities.executeSynchronized(ConcurrencyUtilities.java:20)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.setup(AbstractConcurrentAction.java:75)
         at
    edu.sjsu.recon.execution.ServerExecutor.beforeExecute(ServerExecutor.java:27)
         at
    edu.sjsu.recon.execution.AbstractExecutor.execute(AbstractExecutor.java:43)
         at
    edu.sjsu.recon.execution.DefaultExecutionCoordinator.executeAction(DefaultExecutionCoordinator.java:25)
         at
    edu.sjsu.recon.server.handler.ExecutionRequestHandler.handleRequest(ExecutionRequestHandler.java:63)
         at edu.sjsu.recon.server.RequestProcessor.run(RequestProcessor.java:90)
    NestedThrowablesStackTrace:
    java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement
    of transaction
         at
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
         at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:474)
         at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
         at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1516)
         at
    oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalConnection.java:1412)
         at
    com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
         at
    com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
         at
    com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
         at
    com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
         at
    com.solarmetric.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:93)
         at
    com.solarmetric.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:90)
         at
    com.solarmetric.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:82)
         at
    com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:131)
         at
    kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:305)
         at
    kodo.jdbc.runtime.JDBCStoreManager.connectInternal(JDBCStoreManager.java:887)
         at kodo.jdbc.runtime.JDBCStoreManager.connect(JDBCStoreManager.java:865)
         at
    kodo.jdbc.runtime.JDBCStoreManager.retainConnection(JDBCStoreManager.java:189)
         at kodo.jdbc.runtime.JDBCStoreManager.begin(JDBCStoreManager.java:114)
         at
    kodo.runtime.DelegatingStoreManager.begin(DelegatingStoreManager.java:95)
         at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:1004)
         at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:885)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.initTestModel(AbstractConcurrentAction.java:290)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction$InitRunnable.run(AbstractConcurrentAction.java:212)
         at
    edu.sjsu.recon.util.ConcurrencyUtilities.executeSynchronized(ConcurrencyUtilities.java:20)
         at
    edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.setup(AbstractConcurrentAction.java:75)
         at
    edu.sjsu.recon.execution.ServerExecutor.beforeExecute(ServerExecutor.java:27)
         at
    edu.sjsu.recon.execution.AbstractExecutor.execute(AbstractExecutor.java:43)
         at
    edu.sjsu.recon.execution.DefaultExecutionCoordinator.executeAction(DefaultExecutionCoordinator.java:25)
         at
    edu.sjsu.recon.server.handler.ExecutionRequestHandler.handleRequest(ExecutionRequestHandler.java:63)
         at edu.sjsu.recon.server.RequestProcessor.run(RequestProcessor.java:90)
    Marc Prud'hommeaux wrote:
    Cleo-
    Can you post the complete stack (including all the nested stack traces)?
    In article <[email protected]>, Cleo wrote:
    Marc,
    Here is the stack:
    ORA-01453: SET TRANSACTION must be first statement of transaction
    kodo.util.FatalDataStoreException
         at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:897)
         at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
         at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
    This is the code being executed:
    Transaction initTransaction = initPersistenceManager.currentTransaction();
    initTransaction.begin();
    initPersistenceManager.makePersistentAll(model);
    initTransaction.commit(); //EXCEPTION HERE
    initPersistenceManager.close();
    thx
    Marc Prud'hommeaux wrote:
    Cleo-
    Can you post the complete stack trace from the exception? I expect it is
    different from the one posted previously (which was with a much earlier
    version of Kodo).
    In article <[email protected]>, Cleo wrote:
    Has anybody figured out how to solve this?
    I am having the same problem with:
    KODO 3.2
    Oracle JDBC Dirver 10.1.0.3
    thx
    PS: (I am on a deadline for the end of this week)
    Stephen Kim wrote:
    First I would suggest using Kodo 3.0.1. Second I would suggest trying
    to use 9.0.1 drivers which work very well with 8.1.7.
    Wolfgang Hutya wrote:
    Hi,
    Im using Kodo 3.0.0 on Oracle 8.1.7.
    I tried to define the isolation level in the kodo.properties:
    e.g.: kodo.jdbc.TransactionIsolation: serializable
    Unfortunately Oracle throws an exception which says, that "set
    transaction" has to be the first statement called within a
    transaction.
    I
    get this exception on almost every db access.
    java.sql.SQLException: ORA-01453: SET TRANSACTION muss erste
    Anweisung
    der
    Transaktion sein
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:1
    50)
    at
    kodo.jdbc.meta.VerticalClassMapping.fromMappingInfo(VerticalClassMapp
    ing.java:135)
    at
    kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvid
    er.java:56)
    at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
    java:342)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
    7)
    at
    kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
    java:325)
    at
    kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
    7)
    at
    kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:2
    72)
    at
    kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:
    256)
    atkodo.query.AbstractQuery.internalCompile(AbstractQuery.java:538)
    at kodo.query.AbstractQuery.compile(AbstractQuery.java:502)
    atkodo.datacache.CacheAwareQuery.compile(CacheAwareQuery.java:265)
    -- Wolfgang
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com
    Marc Prud'hommeaux
    SolarMetric Inc.
    Marc Prud'hommeaux
    SolarMetric Inc.

  • Setting transaction isolation level in Weblogic 5.1

              Hi,
              I'm using Weblogic server5.1 and i'm trying to set the isolation level on one
              of my session bean. Below is the code :
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>chargeMgr</ejb-name>
              <jndi-name>chargeMgr</jndi-name>
              <transaction-isolation>
              <isolation-level>Serializable</isolation-level>
              <method>
              <ejb-name>chargeMgr</ejb-name>
              <method-intf>Remote</method-intf>
              <method-name>*</method-name>
              </method>
              </transaction-isolation>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              I have checked the syntax against the weblogic documentation.
              However, when i try to jar the beans up into the jar file (weblogic.ejbc), it
              give me the following error :
              org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allows no further
              input; "transaction-isolation" is not allowed.
              Can anyone help?
              Regards.
              

    yes, only in weblogic-ejb-jar.xml , and you can see that from the DTD
              source.
              thanks
              Yu
              "cw lee" <[email protected]> wrote in message
              news:[email protected]...
              >
              > thanks for ur advice.
              >
              > one thing i forgot to mention is that the isolation-level was specified in
              weblogic-ejb-jar.xml.
              > Do u mean that it must be placed in weblogic-cmp-rdbms-jar.xml and not
              weblogic-ejb-jar.xml
              > ?
              >
              > Are the codes u suggested to be in weblogic-ejb-jar.xml or
              weblogic-cmp-rdbms-jar.xml
              > ?
              >
              > Regards.
              >
              >
              >
              > "Yu Tian" <[email protected]> wrote:
              > >the right name for Seriealizable should be: TRANSACTION_SERIALIZABLE.
              > >so the
              > >DD looks like:
              > >
              > ><?xml version="1.0"?>
              > >
              > ><!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
              > >5.1.0
              > >EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
              > >
              > ><weblogic-ejb-jar>
              > > <weblogic-enterprise-bean>
              > > <ejb-name>containerManaged</ejb-name>
              > > <caching-descriptor>
              > > <max-beans-in-cache>1000</max-beans-in-cache>
              > > </caching-descriptor>
              > > <persistence-descriptor>
              > > <persistence-type>
              > > <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
              > > <type-version>5.1.0</type-version>
              > > <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
              > > </persistence-type>
              > > <persistence-use>
              > > <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
              > > <type-version>5.1.0</type-version>
              > > </persistence-use>
              > > </persistence-descriptor>
              > > <jndi-name>containerManaged.AccountHome</jndi-name>
              > > <transaction-isolation>
              > > <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
              > > <method>
              > > <ejb-name>containerManaged</ejb-name>
              > > <method-name>*</method-name>
              > > </method>
              > > </transaction-isolation>
              > > </weblogic-enterprise-bean>
              > > </weblogic-ejb-jar>
              > >
              > >Thanks
              > >
              > >Yu
              > >
              > >
              > >"cw lee" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Hi,
              > >>
              > >> I'm using Weblogic server5.1 and i'm trying to set the isolation level
              > >on
              > >one
              > >> of my session bean. Below is the code :
              > >>
              > >> <weblogic-ejb-jar>
              > >> <weblogic-enterprise-bean>
              > >> <ejb-name>chargeMgr</ejb-name>
              > >> <jndi-name>chargeMgr</jndi-name>
              > >> <transaction-isolation>
              > >> <isolation-level>Serializable</isolation-level>
              > >> <method>
              > >> <ejb-name>chargeMgr</ejb-name>
              > >> <method-intf>Remote</method-intf>
              > >> <method-name>*</method-name>
              > >> </method>
              > >> </transaction-isolation>
              > >> </weblogic-enterprise-bean>
              > >> </weblogic-ejb-jar>
              > >>
              > >> I have checked the syntax against the weblogic documentation.
              > >> However, when i try to jar the beans up into the jar file
              (weblogic.ejbc),
              > >it
              > >> give me the following error :
              > >>
              > >> org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean"
              allows
              > >no further
              > >> input; "transaction-isolation" is not allowed.
              > >>
              > >> Can anyone help?
              > >>
              > >> Regards.
              > >>
              > >
              > >
              >
              

  • Setting the isolation level in Toplink or in my EJB beans?

    Hi,
    Seems like you can set the isolation levels in both Toplink and in the deployment descriptor of your ejb project.
    What is the recommended place to specify the isolation level settings?
    With kind regards.

    Hi,
    Seems like you can set the isolation levels in both Toplink and in the deployment descriptor of your ejb project.
    What is the recommended place to specify the isolation level settings?
    With kind regards.

  • Setting transaction isolation level in a session bean

    Hi all!
    In a stateless session bean (EJB3) with container managed transactions I need to set the transaction isolation level to SERIALIZABLE.
    The idea is to prevent lost update on database when multiple accesses occur concurrently.
    Thanks in advance for your patience,
    Tommaso

    Hi all!
    In a stateless session bean (EJB3) with container managed transactions I need to set the transaction isolation level to SERIALIZABLE.
    The idea is to prevent lost update on database when multiple accesses occur concurrently.
    Thanks in advance for your patience,
    Tommaso

  • Setting Isolation Level In A UserTransaction

    We are having a problem where a class creates a UserTransaction from the InitialContext,
    but does not see any database changes made by other EJBs even though they have
    been committed. This "seems" like an isolation issue.
    What is the default isolation level for UserTransaction? And since it appears
    that it is not seeing committed data, what level should it be set to? (i.e. TRANSACTION_READ_COMMITTED
    would be nice...)

    this is mirrored from the transaction newsgroup:
    Joseph Weinstein <[email protected]> wrote:
    >
    >
    Interesting, but it's not an isolation level issue. There is no DBMS
    isolation level
    that could cause a user not to see already-committed data.Well, we are using Oracle as our backend and it supports Read Uncommitted, Read
    Committed and Serializable. The Serializable option would prevent a transaction
    from seeing any committed data to a table (i.e. prevents unrepeatable reads).
    The default isolation level of most DBMSes is READ_COMMITTED, and you
    should
    never have to change it, and you should be able to see already-committed
    data.I agree, but that is not happening for us (and this gets somewhat complicated
    with JMS). What is Weblogic 8.1's default isolation level for any transaction.
    From the link below, I get the impression it is SERIALIZABLE which would explain
    the behaviour I'm seeing. Athough the article seems to be talking about CMT (container
    transation), I would suspect a BMT (bean managed transaction) be similar (just
    manual).
    If this only confuses things, please let me know the easiest way to communicate
    this issue (code, etc..)
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.transaction&item=227&utag
    (from the article)
    Subject: Re: What is ths default transaction isolation level
    Date: Mon, 12 Feb 2001 15:27:24 -0500
    From: "Cameron Purdy" <[email protected]>
    Organization: BEA SYSTEMS Inc
    Newsgroup: weblogic.developer.interest.transaction
    serializable
    -- Cameron Purdy Tangosol, Inc. http://www.tangosol.com +1.617.623.5782 WebLogic
    Consulting Available
    "mrityunjay" <[email protected]> wrote in message news:3a86c781$[email protected]..
    Hi , > If transaction isolation , for a EJB is not specified what is the > defaulttransaction isolation level > Thanks > Jay > >

  • Transaction Isolation Level to Read UnCommited in Non OLTP Database

    HI,
    We are having a database which for NOT OLTP process. That is OLAP DB. Operation on that DB is only Select and (Incremental Insert - FOR DWH ) not Update/Delete and we are performing ROLAP operations in that DB.
    By Default SQL Server DB isolation Level is READ COMMITTED.AS Our DB IS OLAP SQL Server DB we need to change the isolation level toRead Uncommited. We google it down but We can achive in
    Transaction level only by SET isoaltion Level TO Read UNCOMMITED
    or ALLOW_SNAPSHOT_ISOLATION ON or READ_COMMITTED_SNAPSHOT
    Is there any other way if we can Change the Database isolation level to READ uncommitedfor Entire Database?, insteads of achiving in Transaction Level or With out enabling SET ALLOW_SNAPSHOT_ISOLATION ON or READ_COMMITTED_SNAPSHOT
    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Hi,
    My first question would be why do you want to change Isolation level to read uncommitted, are you aware about the repercussions you will get dirty data, a wrong data.
    Isolation level is basically associated with the connection so is define in connection.
    >> Transaction level only by SET isoaltion Level TO Read UNCOMMITED or ALLOW_SNAPSHOT_ISOLATION ON or READ_COMMITTED_SNAPSHOT
    Be cautious Read UNCOMMITED  and Snapshot isolation level are not same.The former is pessimistic Isolation level and later is Optimistic.Snapshot isolation levels are totally different from read uncommitted as snapshot Isolation level
    uses row versioning.I guess you wont require snapshot isolation level in O:AP DB.
    Please read below blog about setting Isolation level Server wide
    http://blogs.msdn.com/b/ialonso/archive/2012/11/26/how-to-set-the-default-transaction-isolation-level-server-wide.aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    My TechNet Wiki Articles

  • Transaction Isolation Levels in weblogic-cmp-rdbms-jar.xml

    Hi All,
    Iam using ejb 1.1 specification with weblogic 5.1. We can set the transaction
    isolation levels for the methods in the
    weblogic-ejb-jar.xml. There is also a provision for setting this isolation level
    in the weblogic-cmp-rdbms-jar.xml. Now is there any difference between setting
    the isolation levels in these two ways.
    Help me asap.

    The CMP setting has been deprecated. You can set it for all types of
    EJBs in the weblogic-ejb-jar.xml
    -- Rob
    chandru wrote:
    Hi All,
    Iam using ejb 1.1 specification with weblogic 5.1. We can set the transaction
    isolation levels for the methods in the
    weblogic-ejb-jar.xml. There is also a provision for setting this isolation level
    in the weblogic-cmp-rdbms-jar.xml. Now is there any difference between setting
    the isolation levels in these two ways.
    Help me asap.

  • Get transaction isolation level

    How do I ask sql server what it's isolation level is?
    I know that jdbc has a method to get this but this info is cached and not what the current state is

    "Calvin R. Smith" wrote:
    >
    How do I ask sql server what it's isolation level is?
    I know that jdbc has a method to get this but this info is
    cached and not what the current state isUnless you're sending SQL yourself that changes the isolation
    level, the driver should be correct. However, you can ask
    the DBMS by sending the SQL:
    ResultSet rs = stmt.executeQuery("dbcc useroptions"),
    which will contain a Set Option column, and a Value
    column. If the isolation level has been set, there will
    be a row like:
    'isolation level', 'repeatable read'
    If the level has not been explicitly set, there will be
    no such row, and you can assume the default READ COMMITTED.
    Joe

Maybe you are looking for

  • Is there a way to 'latch' a boolean condition when using local variables? Help!

    Hello all I've made LOTS of progress on my vi over the weekend and even today.  I've been battling with a project with this scope: 1.  Read temperatures from 24 locations (6 banks of four thermocouples). 2.  Set individual channel temperature upper l

  • App World Availabili​ty

    Why up to now the app world is not available in oman, ME. As always the regular answer will appear that in future the app world shall be available but now the population of BB users is increasing and we are facing so much difficulties updating or dow

  • Why Lots of Screen Freezes?

    I use Mavericks OS 10.9.2.  Whenever I drag and drop picture files (jpg) from one folder to another folder I get a lot of screen freezes.  Why?

  • Choosefromlists and User Field Problem

    Hi all, i'm trying to associate a choosefromlists to a user defined field added to the Warehouse Definition form (Form 62). I've seen that the form id for UDF is -62. I've followed the choosefromlists sample coming with SDK and it seems to wotk well,

  • Saving layer visibility as views does not work - CS5 for Windows

    I've read about it multiple places, even watched a video where it supposedly works. But when I toggle layer visibility and save as a new view, it doesn't seem to work. Here's the video: http://layersmagazine.com/illustrator-different-views.html Any i