Transaction isolation setting in JDBC & EJB

Hi,
If I set a transaction's isolation level to be "Serializable" in JDBC, will it be guarrented to be row-level lock or not?
as i heard that it could be row-level lock or table-level lock in different drivers of JDBC, how can we solve this issue so that row-level lock is guaranteed? is it possible to set it in Oracle level? if so, does that mean every transaction is enforced to be Serializable? what if some of transaction can still be other isolation levels?
Thanks a lot!
Yabing

Hi,
If I set a transaction's isolation level to be "Serializable" in JDBC, will it be guarrented to be row-level lock or not?
as i heard that it could be row-level lock or table-level lock in different drivers of JDBC, how can we solve this issue so that row-level lock is guaranteed? is it possible to set it in Oracle level? if so, does that mean every transaction is enforced to be Serializable? what if some of transaction can still be other isolation levels?
Thanks a lot!
Yabing

Similar Messages

  • Setting transaction isolation upon enlistment for XA driver not supported !!?!!?

    Hi !
    I've been developping a simple webapplication with a few Entity CMP EJB, Struts
    and some JSP.
    I registred a Pointbase XA JDBC driver in Weblogic 8.1.
    When I want to create a new post in the database via one of my EJB, I get "Due
    to vendor limitations, setting transaction isolation upon enlistment for "Pointbase
    XA" JDBC XA driver is not supported".
    What do I have to add in my xml files to make it work ?
    Something with <transaction-isolation> in the weblogic-ejb-jar.xml ?
    I'll appreciate some help here...
    Extract of my code (CustomerEditAction.java):
    <<
    CustomerHomeLocal chome = (CustomerHomeLocal) Locator.getHome("CustomerHomeLocal");
    prop = chome.create(cform.getName(), cform.getAddress(), cform.getZipcode(), cform.getCity(),cform.getCountry(),
    cform.getEmail(), cform.getPhone(), cform.getHomepage());
                             And the error message and stack is:
    <<
    javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception
    is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: XA error:
    XAER_RMERR : A resource manager error has occured in the transaction branch start()
    failed on resource 'CaciPool - Pointbase - XA': XAER_RMERR : A resource manager
    error has occured in the transaction branch javax.transaction.xa.XAException:
    start failed for XAResource 'CaciPool - Pointbase - XA': Due to vendor limitations,
    setting transaction isolation upon enlistment for "PointBase XA" JDBC XA driver
    is not supported. at weblogic.jdbc.wrapper.XA.createException(XA.java:104) at
    weblogic.jdbc.jta.DataSource.start(DataSource.java:631) at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1069)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1001)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:203)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1230) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1193)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:371) at weblogic.jdbc.jta.DataSource.connect(DataSource.java:329)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:1841)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.execGenKeyNamedSequenceTableUpdateAndQuery(RDBMSPersistenceManager.java:2392)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyPreFetch(RDBMSPersistenceManager.java:2174)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyNamedSequenceTable(RDBMSPersistenceManager.java:2147)
    at com.caci.ejb.CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.ejbCreate(CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.java:5403)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324) at weblogic.ejb20.manager.DBManager.create(DBManager.java:1139)
    at weblogic.ejb20.manager.DBManager.localCreate(DBManager.java:1118) at weblogic.ejb20.internal.EntityEJBLocalHome.create(EntityEJBLocalHome.java:171)
    at com.caci.ejb.CustomerEJB_6i2zhv_LocalHomeImpl.create(CustomerEJB_6i2zhv_LocalHomeImpl.java:133)
    at com.caci.ui.CustomerEditAction.execute(CustomerEditAction.java:58) at
    >>
    Regards,
    Olivier

    Hi !
    I've been developping a simple webapplication with a few Entity CMP EJB, Struts
    and some JSP.
    I registred a Pointbase XA JDBC driver in Weblogic 8.1.
    When I want to create a new post in the database via one of my EJB, I get "Due
    to vendor limitations, setting transaction isolation upon enlistment for "Pointbase
    XA" JDBC XA driver is not supported".
    What do I have to add in my xml files to make it work ?
    Something with <transaction-isolation> in the weblogic-ejb-jar.xml ?
    I'll appreciate some help here...
    Extract of my code (CustomerEditAction.java):
    <<
    CustomerHomeLocal chome = (CustomerHomeLocal) Locator.getHome("CustomerHomeLocal");
    prop = chome.create(cform.getName(), cform.getAddress(), cform.getZipcode(), cform.getCity(),cform.getCountry(),
    cform.getEmail(), cform.getPhone(), cform.getHomepage());
                             And the error message and stack is:
    <<
    javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception
    is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: XA error:
    XAER_RMERR : A resource manager error has occured in the transaction branch start()
    failed on resource 'CaciPool - Pointbase - XA': XAER_RMERR : A resource manager
    error has occured in the transaction branch javax.transaction.xa.XAException:
    start failed for XAResource 'CaciPool - Pointbase - XA': Due to vendor limitations,
    setting transaction isolation upon enlistment for "PointBase XA" JDBC XA driver
    is not supported. at weblogic.jdbc.wrapper.XA.createException(XA.java:104) at
    weblogic.jdbc.jta.DataSource.start(DataSource.java:631) at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1069)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1001)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:203)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1230) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1193)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:371) at weblogic.jdbc.jta.DataSource.connect(DataSource.java:329)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:1841)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.execGenKeyNamedSequenceTableUpdateAndQuery(RDBMSPersistenceManager.java:2392)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyPreFetch(RDBMSPersistenceManager.java:2174)
    at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyNamedSequenceTable(RDBMSPersistenceManager.java:2147)
    at com.caci.ejb.CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.ejbCreate(CustomerEJB_6i2zhv__WebLogic_CMP_RDBMS.java:5403)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324) at weblogic.ejb20.manager.DBManager.create(DBManager.java:1139)
    at weblogic.ejb20.manager.DBManager.localCreate(DBManager.java:1118) at weblogic.ejb20.internal.EntityEJBLocalHome.create(EntityEJBLocalHome.java:171)
    at com.caci.ejb.CustomerEJB_6i2zhv_LocalHomeImpl.create(CustomerEJB_6i2zhv_LocalHomeImpl.java:133)
    at com.caci.ui.CustomerEditAction.execute(CustomerEditAction.java:58) at
    >>
    Regards,
    Olivier

  • Why encounter errors while setting transaction isolation level?

    When attempting to set the transaction isolation level within an EJB, I encountered the following exception from the server log:
    ===========================================================
    [#|2006-05-30T15:08:45.906+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    Enter ejbCreate( 100, Duke, Earl, 0.00 ):|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    List of Supported Transaction Isolation Levels: |#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    TRANSACTION_READ_UNCOMMITTED is supported!|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    TRANSACTION_READ_COMMITTED is supported!|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    TRANSACTION_REPEATABLE_READ is supported!|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    TRANSACTION_SERIALIZABLE is supported!|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    1. |#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|Transaction Status: |#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|TRANSACTION_READ_COMMITTED|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.stream.out|_ThreadID=25;|
    con.isReadOnly() = false|#]
    [#|2006-05-30T15:08:45.937+0800|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.stream.err|_ThreadID=25;|
    SQLException: java.sql.SQLException: Transaction manager errors. statement not allowed in XA session.|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb|_ThreadID=25;|EJB5018: An exception was thrown during an ejb invocation on [SavingsAccountBean]|#]
    [#|2006-05-30T15:08:45.937+0800|INFO|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb|_ThreadID=25;|
    javax.ejb.EJBException: ejbCreate: Unable to connect to database. Transaction manager errors. statement not allowed in XA session.
    at SavingsAccountBean.ejbCreate(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
    at com.sun.ejb.containers.EJBHomeInvocationHandler.invoke(EJBHomeInvocationHandler.java:170)
    at $Proxy60.create(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    |#]===========================================================
    But from the above log messages, all transcation isolation levels are supported. The relevant source codes are:
    /*********************** Database Routines *************************/
    private void makeConnection() {
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = ( DataSource )ic.lookup( dbName );
    con = ds.getConnection();
    DatabaseMetaData dmd = con.getMetaData();
    show_supported_trans_levels( dmd );
    int status = con.getTransactionIsolation();
    System.out.print( "1. " );
    disp_tx_status( status );
    System.out.println( "con.isReadOnly() = " + con.isReadOnly() );
    con.setTransactionIsolation( Connection.TRANSACTION_SERIALIZABLE );
    System.out.print( "2. " );
    disp_tx_status( status );
    } catch( SQLException ex ) {
    System.err.println( "SQLException: " + ex.toString() );
    throw new EJBException("Unable to connect to database. " +
    ex.getMessage());
    } catch( NamingException ex ) {
    System.err.println( "NamingException: " + ex.toString() );
    throw new EJBException("Unable to connect to database. " +
    ex.getMessage());
    private void disp_tx_status( int status )
    System.out.print( "Transaction Status: " );
    switch( status )
    case( Connection.TRANSACTION_READ_UNCOMMITTED ):
    System.out.println( "TRANSACTION_READ_UNCOMMITTED" );
    break;
    case( Connection.TRANSACTION_READ_COMMITTED ):
    System.out.println( "TRANSACTION_READ_COMMITTED" );
    break;
    case( Connection.TRANSACTION_REPEATABLE_READ ):
    System.out.println( "TRANSACTION_REPEATABLE_READ" );
    break;
    case( Connection.TRANSACTION_SERIALIZABLE ):
    System.out.println( "TRANSACTION_SERIALIZABLE" );
    break;
    case( Connection.TRANSACTION_NONE ):
    System.out.println( "TRANSACTION_NONE" );
    break;
    default:
    System.out.println( "UNKNOWN" );
    break;
    Who can help me?

    Try the following forum (about EJB technology)
    http://forum.java.sun.com/forum.jspa?forumID=13

  • Error defining transaction-isolation at weblogic-ejb-jar.xml

    Hi,
    .. from WebLogic 5.1 reference:
    (...) the top level elements in weblogic-ejb-jar.xml are as follows:
    . description
    . weblogic-version
    . weblogic-enterprise-bean
    . ejb-name
    . caching-descriptor
    . presistence-descriptor
    . clustering-descriptor
    . transaction-descriptor
    . reference-descriptor
    . enable-call-by-reference
    . jndi-name
    . TRANSACTION-ISOLATION
    . security-role-assignment
    this way i've appended a transaction isolation section immediatly after the jndi-name section
    from my weblogic-ejb-jar.xml file to specify that all methods of my container-managed ejb
    should use read-committed accesses to the database. But i've gotten the error message:
    org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allows no further input; "transaction-isolation" is not allowed.
    during compilation time at parsing. Nowhere else in the weblogic-ejb-jar.xml i can put the
    isolation transaction section without receiving some related parsing error. The same happens
    trying to include such transaction section at ejb-jar.xml. I'm attaching both xml files. Should
    anybody help me saying where that section should be described? And if it should be placed in
    another file, why the documentation states for describing it at the weblogic-ejb-jar.xml?
    [weblogic-ejb-jar.xml]

    That means that you do not have the SP6 in the service pack and it is using
    the old DTD.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Ana Benites" <[email protected]> wrote in message
    news:[email protected]...
    >
    Cameron,
    hello.
    When you say "<enterprise-bean>" block, you mean"<weblogic-enterprise-bean>"block, isn't it?
    >
    Because you recommend in your response exactly what i was doing in myweblogic-ejb-jar.xml,
    >
    that i had attached to my message when openning this discussion. I copyit again here:
    >
    My weblogic-ejb-jar.xml:
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
    >
    >
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>cluster.ejb.TellerHome</ejb-name>
    <caching-descriptor>
    </caching-descriptor>
    <enable-call-by-reference>False</enable-call-by-reference>
    <jndi-name>cluster.ejb.TellerHome</jndi-name>
    <transaction-isolation>
    <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
    >
    <method>
    <ejb-name>cluster.ejb.TellerHome</ejb-name>
    <method-name>*</method-name>
    </method>
    </transaction-isolation>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ...and this is resulting in the following parsing error during compiletime:
    >
    >
    org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allowsno further input; "transaction-isolation" is not allowed.
    at com.sun.xml.parser.Parser.error(Parser.java:2775)
    atcom.sun.xml.parser.ValidatingParser$ChildrenValidator.consume(ValidatingPars
    er.java:306)
    at com.sun.xml.parser.Parser.maybeElement(Parser.java:1280)
    at com.sun.xml.parser.Parser.content(Parser.java:1498)
    at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
    at com.sun.xml.parser.Parser.content(Parser.java:1498)
    at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
    at com.sun.xml.parser.Parser.parseInternal(Parser.java:491)
    at com.sun.xml.parser.Parser.parse(Parser.java:283)
    at weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:69)
    at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
    atweblogic.ejb.deployment.dd.DescriptorLoader.<init>(DescriptorLoader.java:157
    at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
    at weblogic.utils.compiler.Tool.run(Tool.java:80)
    at weblogic.ejbc.main(ejbc.java:353)
    Am i forgetting anything?
    Thanks for your help
    Ana.
    "Cameron Purdy" <[email protected]> wrote:
    Hi Ana,
    Add to weblogic-ejb-jar.xml:
    Inside each <enterprise-bean> block, add the following immediately before
    the block closes:
    <transaction-isolation>
    <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
    <method>
    <ejb-name></ejb-name>
    <method-name>*</method-name>
    </method>
    </transaction-isolation>
    The <ejb-name> value of the <method> block of the <transaction-isolation>
    block must match the <ejb-name> value of the <enterprise-bean> block.
    Please note the case sensitive nature of the values.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Ana Benites" <[email protected]> wrote in message
    news:[email protected]...
    Thanks for your attention Cameron,
    from my WebLogic Console one can read
    "WebLogic Build 5.1.0 Service Pack 6 09/20/2000 21:03:19#84511"
    ...because i was suspecting the problem was due to a lack of
    applying
    the service pack 6. But even
    after that upgrade the parsing errors remain.
    regards
    Ana
    "Cameron Purdy" <[email protected]> wrote:
    Ana,
    The 5.1 release did NOT support transaction isolation in the
    weblogic-ejb-jar.xml file.
    That feature was introduced in a service pack. What SP are you using?
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Ana Benites" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    .. from WebLogic 5.1 reference:
    (...) the top level elements in weblogic-ejb-jar.xml are as follows:
    description
    weblogic-version
    weblogic-enterprise-bean
    . ejb-name
    . caching-descriptor
    . presistence-descriptor
    . clustering-descriptor
    . transaction-descriptor
    . reference-descriptor
    . enable-call-by-reference
    . jndi-name
    . TRANSACTION-ISOLATION
    security-role-assignment
    this way i've appended a transaction isolation section immediatly
    after
    the jndi-name section
    from my weblogic-ejb-jar.xml file to specify that all methods of mycontainer-managed ejb
    should use read-committed accesses to the database. But i've gotten
    the
    error message:
    org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean"
    allows
    no further input; "transaction-isolation" is not allowed.
    during compilation time at parsing. Nowhere else in theweblogic-ejb-jar.xml i can put the
    isolation transaction section without receiving some related parsingerror. The same happens
    trying to include such transaction section at ejb-jar.xml. I'm
    attaching
    both xml files. Should
    anybody help me saying where that section should be described? And
    if
    it
    should be placed in
    another file, why the documentation states for describing it at theweblogic-ejb-jar.xml?

  • Why can't I change the transaction isolation level?

    I was trying to change the transaction isolation level from an EJB. My source codes are shown as the follows:
    ======================================================
    /*********************** Database Routines *************************/
    private void makeConnection() {
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = ( DataSource )ic.lookup( dbName );
    con = ds.getConnection();
    DatabaseMetaData dmd = con.getMetaData();
    show_supported_trans_levels( dmd );
    int status = con.getTransactionIsolation();
    System.out.print( "1. " );
    disp_tx_status( status );
    System.out.println( "con.isReadOnly() = " + con.isReadOnly() );
    con.setTransactionIsolation( Connection.TRANSACTION_SERIALIZABLE );
    System.out.print( "2. " );
    disp_tx_status( status );
    } catch( SQLException ex ) {
    System.err.println( "SQLException: " + ex.toString() );
    throw new EJBException("Unable to connect to database. " +
    ex.getMessage());
    } catch( NamingException ex ) {
    System.err.println( "NamingException: " + ex.toString() );
    throw new EJBException("Unable to connect to database. " +
    ex.getMessage());
    private void disp_tx_status( int status )
    System.out.print( "Transaction Status: " );
    switch( status )
    case( Connection.TRANSACTION_READ_UNCOMMITTED ):
    System.out.println( "TRANSACTION_READ_UNCOMMITTED" );
    break;
    case( Connection.TRANSACTION_READ_COMMITTED ):
    System.out.println( "TRANSACTION_READ_COMMITTED" );
    break;
    case( Connection.TRANSACTION_REPEATABLE_READ ):
    System.out.println( "TRANSACTION_REPEATABLE_READ" );
    break;
    case( Connection.TRANSACTION_SERIALIZABLE ):
    System.out.println( "TRANSACTION_SERIALIZABLE" );
    break;
    case( Connection.TRANSACTION_NONE ):
    System.out.println( "TRANSACTION_NONE" );
    break;
    default:
    System.out.println( "UNKNOWN" );
    break;
    private void show_supported_trans_levels( DatabaseMetaData dmd ) throws SQLException
    System.out.println( "List of Supported Transaction Isolation Levels: " );
    if( dmd.supportsTransactionIsolationLevel( Connection.TRANSACTION_READ_UNCOMMITTED ) )
    System.out.println( "TRANSACTION_READ_UNCOMMITTED is supported!" );
    else
    System.out.println( "TRANSACTION_READ_UNCOMMITTED is unsupported!" );
    if( dmd.supportsTransactionIsolationLevel( Connection.TRANSACTION_READ_COMMITTED ) )
    System.out.println( "TRANSACTION_READ_COMMITTED is supported!" );
    else
    System.out.println( "TRANSACTION_READ_COMMITTED is unsupported!" );
    if( dmd.supportsTransactionIsolationLevel( Connection.TRANSACTION_REPEATABLE_READ ) )
    System.out.println( "TRANSACTION_REPEATABLE_READ is supported!" );
    else
    System.out.println( "TRANSACTION_REPEATABLE_READ is unsupported!" );
    if( dmd.supportsTransactionIsolationLevel( Connection.TRANSACTION_SERIALIZABLE ) )
    System.out.println( "TRANSACTION_SERIALIZABLE is supported!" );
    else
    System.out.println( "TRANSACTION_SERIALIZABLE is unsupported!" );
    =========================================================
    However, I encountered the following exception when running at the highlighted statement:
    ======================================================
    SQLException: java.sql.SQLException: Transaction manager errors. statement not allowed in XA Session.
    ======================================================
    To my surprise, the isolation level TRANSACTION_SERIALIZABLE is supported from the database vendor. So why can't I change the transaction isolation level?

    You can change the setting, you may need to click the lock at the bottom of the preference pane. Be careful what you download and install, Gatekeeper is there to help you. OS X: About Gatekeeper - Apple Support

  • Setting JDBC Transaction Isolation

    https://community.jboss.org/wiki/ConfigDataSources
    As explained in the above URL, with JBoss, you can set the JDBC transaction isolation level in the xml file that contains the JDBC connection information.
    I've been doing some googling, but I'm not clear on how this can be done with WebLogic. Is there some kind of external file where you can set the JDBC transaction isolation level as with JBoss, or is this some kind of change that can only be made in the application code or in some file contained within the application archive file (ear, war, etc.)?

    You can set the isolation in the deployment override weblogic-ejb-jar.xml
    - http://docs.oracle.com/cd/E21764_01/web.1111/e13719/ejb_jar_ref.htm#i1116237
    - http://docs.oracle.com/cd/E21764_01/web.1111/e13719/ejb_jar_ref.htm#i1219612

  • Setting Transaction isolation level when I'm not in an EJB

              I have a Message Driven Bean (MDB) that is container managed, and its transaction
              isolation is set to TRANSACTION_READ_COMMITTED in weblogic-ejb-jar.xml and that
              seems to work fine. If I look at an entity bean in onMessage which is updated/commited
              outside the transaction I can see the updates no problem.
              Now the problem is this.. inside the onMessage method, the MDB creates a new
              instance of a class. This class starts up its own UserTransaction (using (UserTransaction)new
              InitialContext().lookup("javax.transaction.UserTransaction")) and goes into a
              loop working away. Inside the loop it is inspecting a value on an entity bean.
              The classs never sees any updates to this bean which are made outside this new
              UserTransaction.
              It looks to me that the UserTransaction that the class is getting has a different
              isolation level (serialized?). Is there a way to set the isolation level for
              a UserTransaction?
              Any help would be great!
              lance
              

              Just a follow up, I think the isolation level is perhaps being set to REPEATABLE_READ,
              since that is what seems to be happening. The value from the first read is maintained
              through subsequent reads in the same transaction.
              lance
              "Lance" <[email protected]> wrote:
              >
              >I have a Message Driven Bean (MDB) that is container managed, and its
              >transaction
              >isolation is set to TRANSACTION_READ_COMMITTED in weblogic-ejb-jar.xml
              >and that
              >seems to work fine. If I look at an entity bean in onMessage which is
              >updated/commited
              >outside the transaction I can see the updates no problem.
              >
              >Now the problem is this.. inside the onMessage method, the MDB creates
              >a new
              >instance of a class. This class starts up its own UserTransaction (using
              >(UserTransaction)new
              >InitialContext().lookup("javax.transaction.UserTransaction")) and goes
              >into a
              >loop working away. Inside the loop it is inspecting a value on an entity
              >bean.
              > The classs never sees any updates to this bean which are made outside
              >this new
              >UserTransaction.
              >
              >It looks to me that the UserTransaction that the class is getting has
              >a different
              >isolation level (serialized?). Is there a way to set the isolation level
              >for
              >a UserTransaction?
              >
              >Any help would be great!
              >
              >lance
              

  • Setting transaction isolation levels in WAS5

    I think I'm missing something pretty easy. How can I set the isolation
    levels for the containter managed transactions on my beans?
    Specifically, I want to set soem lookup methods on my Sessions beans
    to TRANSACTION_REPEATABLE_READ. I've already put the
    container-transaction blocks in my ejb-jar.xml
    Does Websphere 5 have something akin to WebLogic's
    weblogic-ejb-jar.xml where you can set additional parameters like
    this? Do I have to use a tool like WSAD to specify this? The AAT
    doesn't seem to have this option.
    Thanks,
    James Lynn

    Hi Slava, Ryan,
    We haven't looked at 8.1 yet since our release cycle wouldn't allow us
    to move to 8.1 until at least June anyway, but even if the problems was
    fixed there it took BEA support more than 6 months (I opened the case on
    Sep 23 2002 and only this week I got the patch that I haven't even tried
    to test to see if it works) to issue a patch for such a small problem.
    The server would just check if the Oracle XA driver was being used and
    no matter what version would just throw an exception if you try to set
    the transaction isolation level saying that the feature in the Oracle
    8.1.7 driver was broken... (although you might be using 9.x or even a
    pre-8.1.7 driver)...
    So this is about it.
    And Slava, I've tried pushing a case harder only to end up with BEA
    support trying to convince me that I was misinterpreting the JDBC spec
    when it was not true, so I just gave up. The main goal of BEA support in
    all of our experience has been that they don't try to solve the cases
    but close them.
    That's my and some of my colleagues personal views anyway, you don't
    have to share them.
    Regards,
    Dejan
    Slava Imeshev wrote:
    Hi Deyan,
    Sorry for the delay. Could you give us more details about CR090104?
    I've got some feedback in XA area, not sure if it was a related case.
    Also, I've never had any problems with weblogic CCE, so you may want
    to push your case a little harder.
    As per the bold statement - the initial question was about functionality
    available in weblogic but not available in websphere - it can't be more
    bold :)
    Regards,
    Slava Imeshev
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]...
    This is a very bold statement Slava, considering that with Oracle XA
    driver you cannot even set the transaction isolation level because of a
    Weblogic bug (CR090104 that has been open for more than 6 months
    already)...
    Dejan
    Slava Imeshev wrote:
    Hi James,
    "James F'jord Lynn" <[email protected]> wrote in message
    news:[email protected]...
    I think I'm missing something pretty easy. How can I set the isolation
    levels for the containter managed transactions on my beans?
    Specifically, I want to set soem lookup methods on my Sessions beans
    to TRANSACTION_REPEATABLE_READ. I've already put the
    container-transaction blocks in my ejb-jar.xml
    Does Websphere 5 have something akin to WebLogic's
    weblogic-ejb-jar.xml where you can set additional parameters like
    this? Do I have to use a tool like WSAD to specify this? The AAT
    doesn't seem to have this option.
    My guess here is that it's a signal that this is a last chance
    for you to abandon WebSphere and return back to WebLogic's
    safe harbor.
    Regards,
    Slava Imeshev

  • How to Set the Transaction Isolation Level in WebLogic?

    Is there a way to set the transaction isolation level in WebLogic 9.2 or WebLogic 10?
    For an example say, we have an application which is supported for several database platforms. Without setting the transaction isolation level in DBMS level, is there a way to specify this in WebLogic to make it common for all the DBMS type?
    And I found a way to change the transaction isolation level in WebSphere application server using a property called webSphereDefaultIsolationLevel.
    [url http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21224492]http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21224492
    Is there a way to do the same thing in WebLogic application server 9.2 or 10?

    Anuradha W wrote:
    That means, currently the only way tospecify the transaction level is through
    weblogic-ejb-jar.xml deployment descriptor?
    for WLS-generated code, yes.Somewhat related to this question, we have written a standalone testcase to reproduce this issue we have been having. Basically, the issue is that even though we configure the isolation level to a non-default one in the deployment descriptor, the connections returned by the datasource seem to be having the default (which is Read Committed). The DBMS is DB2.
    weblogic-ejb-jar.xml has the following set:
    <isolation-level>TransactionRepeatableRead</isolation-level>
    And we printed the isolation level of the connection returned from a method in the EJB, but the isolation level is still the default. I can share the code to reproduce the problem if you want to take a look at it. Please let me know how I can get that across to you.
    Thanks,
    AnuradhaIf you are using our JDBC driver for DB2, or can switch to it,
    just for a test, there is some debug I'd like from you.
    Joe

  • How to set Transaction isolation level in Weblogic 11g

    How do I set the transaction isolation level in Weblogic?
    Some references that I found suggest that I have to explicitely state the isolation level in the weblogic-ejb-jar.xml per ejb. If I am using EJB 3.0 why would I need to do that?
    Can I set this up as a property in the JDBC datasource setup?
    Other application servers like Websphere actually allows for this. Can this be done in Weblogic?
    Currently I get the following message if I don't set the isolation level:
    Transaction attribute: TX_NOT_SUPPORTED Isolation Level: No Isolation Level Set Tx Timeout: 30000
    What seems to be happening is that one update of my transaction is getting rolled back and other consequent calls are failing due to foreign key issues due to the first rollback.
    I think the issue is related to the isolation level or the transaction time out being too low.
    Any ideas?
    BTW: I am using openjpa and using a MS SQLServer. Not sure if that helps the discussion.
    Thanks
    Edited by: rrivera on Jun 2, 2010 9:18 AM

    How do I set the transaction isolation level in Weblogic?
    Some references that I found suggest that I have to explicitely state the isolation level in the weblogic-ejb-jar.xml per ejb. If I am using EJB 3.0 why would I need to do that?
    Can I set this up as a property in the JDBC datasource setup?
    Other application servers like Websphere actually allows for this. Can this be done in Weblogic?
    Currently I get the following message if I don't set the isolation level:
    Transaction attribute: TX_NOT_SUPPORTED Isolation Level: No Isolation Level Set Tx Timeout: 30000
    What seems to be happening is that one update of my transaction is getting rolled back and other consequent calls are failing due to foreign key issues due to the first rollback.
    I think the issue is related to the isolation level or the transaction time out being too low.
    Any ideas?
    BTW: I am using openjpa and using a MS SQLServer. Not sure if that helps the discussion.
    Thanks
    Edited by: rrivera on Jun 2, 2010 9:18 AM

  • EJB transaction isolation not working

    I'm trying to use TRANSACTION_SERIALIZABLE isolation level in my EJB test application
    with no success so far.
    The environment is Windows NT, WebLogic 6.1, Informix DB (which, according to
    its documentation, supports TRANSACTION_SERIALIZABLE), and a Tx Data Source on
    a JDBC pool.
    I have an CMP Entity EJB with the following definitions:
    <container-transaction>
    <method>
    <ejb-name>SdrFA</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <transaction-isolation>
    <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
    <method>
    <ejb-name>SdrFA</ejb-name>
    <method-intf>Home</method-intf>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>SdrFA</ejb-name>
    <method-intf>Remote</method-intf>
    <method-name>*</method-name>
    </method>
    </transaction-isolation>
    The entity EJB is used by a servlet that uses JTA to establish a transaction that
    the EJB methods should share ("Required" transaction attribute). The servlet is
    as follows:
    // Establish a transaction
    UserTransaction trn =
    (UserTransaction) ctx.lookup("java:comp/UserTransaction");
    trn.begin();
    trn.setTransactionTimeout(20);
    // Get the EJB
    SdrFA fFA = home.findByPrimaryKey( fFAPK );
    // Update an attribute
    fFA.setSomeAtt("someData");
    // Sleep to control concurrency
    Thread.currentThread().sleep(t * 1000);
    // commit
    trn.commit();
    I expected this setup to prevent concurrent updates and even accesses to the same
    DB table row, but this is not the case: when I invoke the servlet from a session
    and then invoke it again from another session while the first one is sleeping,
    the second one completes all right and is visible in the DB before the first one
    commits.
    Just in case TRANSACTION_SERIALIZABLE is not supported after all, I tried TRANSACTION_REPEATABLE_READ
    instead whith the same results.
    Is there something I'm missing, or any error in my setup?
    Thanks for any suggestion,
    Pere Torrodellas

    Hi Pere,
    AFAIR delay-updates-until-end-of-tx is set to True by default, so the
    actual update is not issued untill TX is commited. I'd try setting it to
    false and running the test again.
    Here are some documentation references:
    http://e-docs.bea.com/wls/docs61/ejb/EJB_environment.html#1048164
    http://e-docs.bea.com/wls/docs61/ConsoleHelp/wls_ejb_jar_dtd.html
    Regards,
    Slava Imeshev
    "Pere Torrodellas" <[email protected]> wrote in message
    news:[email protected]...
    >
    I'm trying to use TRANSACTION_SERIALIZABLE isolation level in my EJB testapplication
    with no success so far.
    The environment is Windows NT, WebLogic 6.1, Informix DB (which, accordingto
    its documentation, supports TRANSACTION_SERIALIZABLE), and a Tx DataSource on
    a JDBC pool.
    I have an CMP Entity EJB with the following definitions:
    <container-transaction>
    <method>
    <ejb-name>SdrFA</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <transaction-isolation>
    <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>
    <method>
    <ejb-name>SdrFA</ejb-name>
    <method-intf>Home</method-intf>
    <method-name>*</method-name>
    </method>
    <method>
    <ejb-name>SdrFA</ejb-name>
    <method-intf>Remote</method-intf>
    <method-name>*</method-name>
    </method>
    </transaction-isolation>
    The entity EJB is used by a servlet that uses JTA to establish atransaction that
    the EJB methods should share ("Required" transaction attribute). Theservlet is
    as follows:
    // Establish a transaction
    UserTransaction trn =
    (UserTransaction) ctx.lookup("java:comp/UserTransaction");
    trn.begin();
    trn.setTransactionTimeout(20);
    // Get the EJB
    SdrFA fFA = home.findByPrimaryKey( fFAPK );
    // Update an attribute
    fFA.setSomeAtt("someData");
    // Sleep to control concurrency
    Thread.currentThread().sleep(t * 1000);
    // commit
    trn.commit();
    I expected this setup to prevent concurrent updates and even accesses tothe same
    DB table row, but this is not the case: when I invoke the servlet from asession
    and then invoke it again from another session while the first one issleeping,
    the second one completes all right and is visible in the DB before thefirst one
    commits.
    Just in case TRANSACTION_SERIALIZABLE is not supported after all, I triedTRANSACTION_REPEATABLE_READ
    instead whith the same results.
    Is there something I'm missing, or any error in my setup?
    Thanks for any suggestion,
    Pere Torrodellas

  • 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 transaction isolation level rises ORA-02089 error

    Hello
    We have configured a distributed transaction in our application server and
    we are using openjpa 1.2.1 and Glassfish application server and Oracle 11g as DB server. Although the default behavior of transaction locking must be optimistic,
    it seems that pessimistic locking has been happened.
    It is found that Row Lock contention happens in a specific table.
    This is the exception :
    java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for lock
    Already all the following properties have been set for openjpa.
    1. <persistence-unit name="JPXA" transation-type="JTA">
    2. <property name="openjpa.TransactionMode" value="managed"/>
    You can try a plug-in string to lookup the TM in JNDI (the value is the JNDI name of GlassFish TM as per Google search)
    3. <property name="openjpa.ManagedRuntime"
    value="jndi(TransactionManagerName=java:appserver/TransactionManager)"/>
    Following searching about this locking problem, we found that we should add two more properties for openjpa as listed below.
    <property name="openjpa.LockManager" value="version" />
    <property name="openjpa.jdbc.TransactionIsolation" value="read-committed" />
    but this time by setting the transaction isolation level, we have got another error: org.apache.openjpa.persistence.PersistenceException: ORA-02089: COMMIT is not allowed in a subordinate session.
    Thanks for any help.
    Regards,
    Sargol

    Hello
    We have configured a distributed transaction in our application server and
    we are using openjpa 1.2.1 and Glassfish application server and Oracle 11g as DB server. Although the default behavior of transaction locking must be optimistic,
    it seems that pessimistic locking has been happened.
    It is found that Row Lock contention happens in a specific table.
    This is the exception :
    java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for lock
    Already all the following properties have been set for openjpa.
    1. <persistence-unit name="JPXA" transation-type="JTA">
    2. <property name="openjpa.TransactionMode" value="managed"/>
    You can try a plug-in string to lookup the TM in JNDI (the value is the JNDI name of GlassFish TM as per Google search)
    3. <property name="openjpa.ManagedRuntime"
    value="jndi(TransactionManagerName=java:appserver/TransactionManager)"/>
    Following searching about this locking problem, we found that we should add two more properties for openjpa as listed below.
    <property name="openjpa.LockManager" value="version" />
    <property name="openjpa.jdbc.TransactionIsolation" value="read-committed" />
    but this time by setting the transaction isolation level, we have got another error: org.apache.openjpa.persistence.PersistenceException: ORA-02089: COMMIT is not allowed in a subordinate session.
    Thanks for any help.
    Regards,
    Sargol

  • How to set transaction isolation level for a method in a Local Interface

              By reference at:
              http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              the value for method-intf can only be "Remote" or "Home".
              My question is--
              How to set transaction isolation level for a method inside a Local Interface or
              Local_Home Interface?
              Thanks.
              Xing
              

    I'd try 6.1SP2. I'm pretty sure this works now.
              -- Rob
              Xing wrote:
              > I tried "Local", but got an error when deploying the EJB jar, saying that only
              > "Remote" or "Home" is allowed.
              >
              > Any idea?
              >
              > Xing
              >
              > Rob Woollen <[email protected]> wrote:
              > >
              > >
              > >Use LocalHome or Local.
              > >
              > >-- Rob
              > >
              > >Xing wrote:
              > >
              > >> By reference at:
              > >> http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              > >> the value for method-intf can only be "Remote" or "Home".
              > >>
              > >> My question is--
              > >>
              > >> How to set transaction isolation level for a method inside a Local
              > >Interface or
              > >> Local_Home Interface?
              > >>
              > >> Thanks.
              > >>
              > >> Xing
              > >
              > >--
              > >
              > >----------------------------------------------------------------------
              > >
              > >AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              > >
              > >by Michael Girdley, Rob Woollen, and Sandra Emerson
              > >
              > >http://learnWebLogic.com
              > >
              > >
              > >
              > >
              > ><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
              > ><html>
              > >Use LocalHome or Local.
              > ><p>-- Rob
              > ><p>Xing wrote:
              > ><blockquote TYPE=CITE>By reference at:
              > ><br>http://e-docs.bea.com/wls/docs61/ejb/reference.html#1071267,
              > ><br>the value for method-intf can only be "Remote" or "Home".
              > ><p>My question is--
              > ><p>How to set transaction isolation level for a method inside a Local
              > >Interface
              > >or
              > ><br>Local_Home Interface?
              > ><p>Thanks.
              > ><p>Xing</blockquote>
              > >
              > ><pre>--
              > >
              > >----------------------------------------------------------------------
              > >
              > >AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              > >
              > >by Michael Girdley, Rob Woollen, and Sandra Emerson
              > >
              > >http://learnWebLogic.com</pre>
              > > </html>
              > >
              > >
              AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
              by Michael Girdley, Rob Woollen, and Sandra Emerson
              http://learnWebLogic.com
              [att1.html]
              

  • How to set the isolation level on Entity EJBs

    I am using 10.1.3.3 of the OC4J app server.
    I am creating an application that uses EJB 2.1.
    I am trying to set the isolation levels on the EJBs to either serializable or repeatable read.
    When i deploy the EAR file from the OC4J admin console, i can set the isolation level property on the EJB's however when i inspect the orion-ejb-jar.xml file I do not see the isolation level being set. Furthermore, i tried to manually change the isolation setting by editing the orion-ejb-jar.xml and adding the isolation="serialiable" attribute on the entity bean descriptor. I then stopped and restarted the server. I noticed that my change was no longer in the file.
    Can someone please let me know how to solve this problem and set the isolation level on Entity EJBs . Thanks

    I find it at ejb.pdf from BEA.
              The transaction-isolation stanza can contain the elements shown here:
              <transaction-isolation>
              <isolation-level>Serializable</isolation-level>
              <method>
              <description>...</description>
              <ejb-name>...</ejb-name>
              <method-intf>...</method-intf>
              <method-name>...</method-name>
              <method-params>...</method-params>
              </method>
              </transaction-isolation>
              "Hyun Min" <[email protected]> wrote in message
              news:3c4e7a83$[email protected]..
              > Hi!
              >
              > I have a question.
              > How to set the transaction isolation level using CMT in descriptor?
              >
              > The Isolation level not supported in CMT?
              >
              > Thanks.
              > Hyun Min
              >
              >
              

Maybe you are looking for

  • How to disable highlighting in Crystal Reports 2008

    Hi, does anyone know how I can disable highlighting of fields when using the .NET 2.0 CrystalReportViewer 2008? See as example: http://i31.tinypic.com/30ivshs.png The problem is, that the highlighting is meaningless and thus confusing, and additional

  • Macbook Pro WD Firewire 800 issues possible work around

    I have been having issues with my Western Digital My Passport Studio and the Firewire 800 connection. The drive would mount and was completly readable however copying to the drive would result in a stall. The USB connection worked perfect. I have fou

  • Can I convert PDF to HTML form

    I'm trying to upload a PDF fillable form and have the ability to post as an HTML form link. Is this possible? It seems the only way I'm able to distribute this PDF form is via email download. Its a very long form (employment application) and I don't

  • Wireless Network problems after running VZ Speed Optimizer

    Good Day and thanks for reading! This issue may sound improbable but, please hear me out. To begin my network has 2 Windows 7 x64 PCs connected to the modem/router via Ethernet, a wireless laptop, a wireless PS3, 2 android smart phones and a tablet r

  • Does the  executeQuery on ViewObject call clearForRecreate on the iterator

    Hi We are using jdev 11.1.1.6.0 and writing new datacontrol on essbase database We are able to create the UI component like af:table from draggings the access iterators from the datacontrol to the jspx page.. But when the data in the model changes, t