Isolation level when set EJBC giving error

          We are trying to set the isolation level in weblogic-ejb-jar.xml
          we gave transaction-isolation tag after jndi-name tag. But EJBC is throwing SAXException
          saying that weblogic-enterprise-bean doesnot allow this tag. But its what doc says.
          We followed.
          What is the problem?
          I have attached the xml file with this.
          Thanks for ur help
          Srinath
          [weblogic-ejb-jar.xml]
          

Srinath,
          there is one error in the atatched xml. Use TRANSACTION_READ_COMMITTED instead of
          READ_COMMITTED. The translation isolation tags were not added to the product until sp1. Do
          you have the service pack in the classpath when invoking ejbc?
          Steve
          Stephen Davies
          Davies Consulting Pty. Ltd.
          Sydney, Australia
          Ph. +61 2 9527 4274
          

Similar Messages

  • Isolation level when using UserTransaction

              What isolation level does WLS assign to JDBC connection objects when used within
              a user-controlled JTA transaction?
              e.g. when using the following code within a servlet:
              UserTransaction ut = (UserTransaction) ictx.lookup("java:comp/Usertransaction");
              ut.begin();
              DataSource ds = ictx.lookup("java:comp/env/jdbc/datasource");
              Connection conn = ds.getConnection();
              ResultSet rs = ps.executeQuery("....");
              conn.commit();
              Does weblogic force a specific isolation level, or will it fall back to the default
              of the database?
              We are using WLS 8.1 SP1 and Oracle 9.
              /Johan
              

              johan Eltes wrote:
              > What isolation level does WLS assign to JDBC connection objects when used within
              > a user-controlled JTA transaction?
              > e.g. when using the following code within a servlet:
              >
              > UserTransaction ut = (UserTransaction) ictx.lookup("java:comp/Usertransaction");
              > ut.begin();
              > DataSource ds = ictx.lookup("java:comp/env/jdbc/datasource");
              > Connection conn = ds.getConnection();
              > ...
              > ResultSet rs = ps.executeQuery("....");
              > ...
              > conn.commit();
              >
              > Does weblogic force a specific isolation level, or will it fall back to the default
              > of the database?
              > We are using WLS 8.1 SP1 and Oracle 9.
              The Spec says that the connection should be in the DBMS's default isolation level
              until set differently. For Oracle you will be in READ-COMMITTED. That's what you want
              because Oracle's SERIALIZABLE isolation level is problematic, not doing what most
              folks assume...
              Joe
              > /Johan
              

  • 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
              

  • Carry out continuous inventory LX16 when click Actvitatesystem giving error

    Hi,
    In transaction LX16 when click Activate system giving error message that Quant 3000000017 for storage bin OPEN can not be counted.
    Pls replay as soon as possible.
    regards
    rk

    Hi
    The inventory counting is based on the storage bin, therefore as you
    noticed correctly transaction LX16 will list all materials per bin
    independently from additional selection criterias.
    Even if you select for only one materials you will still get the
    other materials on the bin(s) as well. The only way to get a quant
    like inventory counting is to use the cycle counting with transaction
    LICC. Please also read the online documentation for this
    topic 'CC-inventory on quant level'.
    Regards,
    Ramana

  • Officejet 6400 when setting up network error message reads wireless radio is not functioning

    printer wont work wireless. Running windows 7  printer stopped printing wireless still works if using a usb cable installed software and re installed new software from the web my disk was old when running network setup comes up with a error message that the wireless radio is not functioning

    I have a C309a that all of a sudden stopped communicating
    The wireless radio is not functioning. Contact HP support
    Wireless on  PASS
    Wireless working  FAIL
    USB communication works
    Is there a reset or is the wireless trashed?

  • 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 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
              >
              >
              

  • About Transaction Isolation Levels...

    Hi Everyone,
    Please, i have a couple of questions regarding the Transaction Isolation Level, i will really appreciate any help on this...
    1.- It is possible to know the transaction isolation level of all connections to the DB.??.. something like a select from v$session...
    2.- I have an application that manage it's own connection pool and have set all of its connections to Transaction_read_commited. The problem is that for some reason, sometimes we get the "ORA-08177: can't serialize access for this transaction." Error. But what i know is that this ORA-08177 error only happens if the transaction isolation level is set to TRANSACTION_SERIALIZABLE. How can be that possible??. There is another application running that points to the same database that maybe uses TRANSACTION_SERIALIZABLE connections but even if this is happening, why the error is happening with my application!!?. Both applications are running on the same weblogic application server with oracle thin jdbc driver... (Oracle 9i)
    Thanks in advance...
    Victor.

    thanks for the answers guys... i was reding several articles by Tom and also looking into Metalink documents... but my concern or my million dollar question is still: if exists the possibility to get the ORA-8177 error, even if i'm using Transaction isolation level READ_COMMITED???... what i learned from this articles is that if i use the Transaction SERIALIZABLE i may have this ORA-8177.. otherwise i wouldn't. right?... and if exists bugs related all that bugs may exists only if i define my connection as TRANSACTION_SERIALIZABLE.
    I'm pretty sure that in my application ("Application A") i'm not using any TRANSACTION_SERIALIZABLE connections.... but i'm afraid that the other application ("Application B") is causing some blocks or conflicts with "Application A"... Is that possible?? (i think that in theory it's not)... But still if that's possible.. i return to my question... Why that ORA-8177 error raises on my "Application A".... this kind of error must be raising only in the "application B"....
    Well maybe is something confusing.. an maybe is totally related to some developing mistake.... i just wanted to confirm some other point of views....
    thanks again!!..
    Victor

  • Regarding Transaction Isolation Level

    We talk about query and update constent problem again. even I don't take it as problem.
    I can see this in SAP notes or SAP help:
    JDBC Sender Adapter...
    ·        The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below).
    ·        Processing can only be performed correctly when the Transaction Isolation Level is set to repeatable_read or serializable.
    If I set transaction isolation level as default, then how can I make sure ' default' is repeatable_read or serializable?
    Our DB is Informix.

    Hey
    Please go through the below blog and see if it helps
    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter
    Thanks
    Aamir

  • Using Isolation Level Serialazable

    I use Visual Basic/Windows Forms to create my project
    I have my form for amending orders ready.
    The flow is:
    Get order number
    Open connection
    sqlcommand to check if order number exists
    if not, return
    Set isolation level serialazable
    Get response to "Delete full order"
    If response is "Yes":
    trans = connlock.BeginTransaction("Delete_OA")
    qry = "delete from ilprod where iorno1 = " & miorno1.Text
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    trans.Commit()
    MessageBox.Show("OA " & miorno1.Text & "Deleted")
    if response is no:
    I display the order details and items.
    if an item is selected, get response to "Delete item?"
    if response is yes,
    trans = connlock.BeginTransaction("Delete_Item")
    qry = "delete from ilprod where csno = " & mcsno.Text & " and itno = " & mitno.Text
    Dim cmd As SqlCommand
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    miorno1.Text = 0
    MessageBox.Show("Item " & miorno1.Text & "/" & mnitno.Text & "Deleted")
    trans.Commit()
    and continue amendment.
    if response is no: proceed to amend item details etc.
    Finally, save amendments:
    qry = "select opamno from opcsno"
    Dim cmd = New SqlCommand(qry, connlock, trans)
    new_amno.Text = cmd.ExecuteScalar() + 1
    qry = "update opcsno set opamno = opamno + 1"
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    qry = "update opmain set "
    qry = qry & "DORNO= " & "'" & DORNOTextBox.Text & "'"
    qry = qry & ",DORDT = " & "'" & CDate(DORDTDateTimePicker.Value) & "'"
    qry = qry & ",SIP1FL = " & SIP1FLTextBox.Text
    qry = qry & ",SIP2FL = " & SIP2FLTextBox.Text
    qry = qry & ",SIP3FL = " & SIP3FLTextBox.Text
    qry = qry & ",STAXFL = " & STAXFLCOMBO.SelectedValue
    qry = qry & ",DESTFL = " & DESTFLCOMBO.Text
    qry = qry & ",MODEFL = " & MODEFLCOMBO.SelectedValue
    qry = qry & ",CARRFL = " & CARRFLCOMBO.SelectedValue
    qry = qry & ",PACKFL = " & PACKFL.SelectedValue
    qry = qry & ",PAYTFL = " & PAYTFLCOMBO.SelectedValue
    qry = qry & ",SCDLFL = 4"
    qry = qry & ",AMNO = " & new_amno.Text
    qry = qry & ",IRDT = " & "'" & CDate(IRDTDateTimePicker.Value) & "'"
    qry = qry & " WHERE csno = " & mcsno.Text & ""
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    qry = " delete from opnarr where csno = " & mcsno.Text
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    If vbTrue Then
    qry = "insert into opnarr (csno,narfl,narr,amno) values ("
    qry = qry & mcsno.Text & ","
    qry = qry & "'A',"
    qry = qry & "'" & PAYTFLCOMBO.Text & "'" & ","
    qry = qry & new_amno.Text & ")"
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    End If
    If vbTrue Then
    qry = "insert into opnarr (csno,narfl,narr,amno) values ("
    qry = qry & mcsno.Text & ","
    qry = qry & "'D'" & ","
    qry = qry & "'" & STAXFLCOMBO.Text & "'" & ","
    qry = qry & new_amno.Text & ")"
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    End If
    If mmcd = "Z998" Or mmcd = "Z999" Then
    qry = "insert into opnarr (csno,narfl,narr,amno) values ("
    qry = qry & mcsno.Text & ","
    qry = qry & "'X'" & ","
    qry = qry & "'" & mname.Text & "'" & ","
    qry = qry & new_amno.Text & ")"
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    End If
    For Each row In DataGridView1.Rows
    If row.selected Then
    qry = "update ilprod set qlty = " & row.cells("qlty").value
    qry = qry & ",siz1 = " & row.cells("siz1").value & ",siz2 = " & row.cells("siz2").value & ",siz3 = " & row.cells("siz3").value & ",sppr = " & "'" & row.cells("sppr").value & "'"
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    qry = "update ilprod set pqty = 0, pmtr = 0 where csno = " & mcsno.Text & " and itno = " & mitno.Text & " and pqty < 0"
    ' This means that qnty will not be equal to inqty+pqty in such records
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    qry = "delete from opscdl " & "where csno = " & mcsno.Text & " and itno = " & mitno.Text
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    For Each scdlrow In DataGridView2.Rows
    If scdlrow.cells("csno").value = mcsno.Text And scdlrow.cells("itno").value = mitno.Text And scdlrow.cells("sqnty").value <> 0 Then
    qry = "insert into opscdl (csno,itno,sqnty,srmtr,sdate,stype,amno) values (" & scdlrow.cells("csno").value & "," & scdlrow.cells("itno").value & "," & scdlrow.cells("sqnty").value & "," & scdlrow.cells("srmtr").value & "," & "Convert(date,'" & scdlrow.cells("sdate").value & "')" & "," & "'" & scdlrow.cells("stype").value & "'" & "," & new_amno.Text & ")"
    cmd = New SqlCommand(qry, connlock, trans)
    cmd.ExecuteNonQuery()
    End If
    Next
    End If
    Next
    trans.Commit()
    When I run the form, the Order is amended successfully: but I do not think the isolation level is set correctly: as I can access the order from another (new query) connection when the amendment is going on and not yet saved
    There are a large number of commands between accesing the records from SQL and the above Save Commands.
    Can Can someone guide me?
    To repeat: the flow is
    SET ISOLATION LEVEL
    GET ORDER NUMBER FROM SCREEN
    DELETE ORDER?
    DELETE ITEM?
    AMEND OA AND SAVE AMENDMENTS
    I apologise if the above has been unclear.
    Mohan
    MohanSQL

    Hi Mohan,
    As the issue is more related to Visual Basic/Windows Forms programming, I would like to recommend you post the question in the
    Visual Basic forum or
    Windows Forms forum. It is appropriate and more experts will assist you.
    Also, you can check the following articles about starting database transactions with the specified isolation level in Visual Basic or other projects.
    SqlConnection.BeginTransaction Method (IsolationLevel)
    http://msdn.microsoft.com/en-us/library/5ha4240h(v=vs.110).aspx
    ADO.NET Transactions and Concurrency in VB.NET
    http://www.dotnetheaven.com/article/ado.net-transactions-and-concurrency-in-vb.net
    Thanks,
    Lydia Zhang

  • 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

  • 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.
              > >>
              > >
              > >
              >
              

  • 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]
              

  • 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

  • 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

Maybe you are looking for

  • Error: The plugin -65221 does not exist in the CMS

    Hi, I uploaded my Crystal Reports in the Business Objects InfoView. I can schedule them using the Schedule link but when I use the Reschedule link in the History and click on the paramater value, I' getting the following error: An error has occurred:

  • How much RAM can my computer handle?

    I have a iMac that was manufactured mid 2011 21.5 inch display.  The specs say it can only handle 16GB of RAM but here's the response I got from the RAM manufacturer: "Whist your official manufacturer specification recommends 16GB maximum capacity, w

  • Running hardware diagnostics with Yosemite on iMac

    I'd like to run Hardware Diagnostics on a 2011 (maybe 2012) iMac.  Yosemite is installed. Have disconnected everything except keyboard and mouse, shutdown, and tried starting up with the "D" key held down.  With this option, the system boots normally

  • Set time out for single webservice in NWDS 2004s

    hai,   i created webservices for session bean.created webservices are consumed by webdynpro client. when the webdynpro client consuming it.if the response takes more than 60 sec the webservices are timed out so i want to set the time out for my webse

  • How to call webdynpro applications from outside

    Hi I have a requirement where i need to call below webdynpro application from outside (for ex CRM,ISA..) environments http://test.com/webdynpro/dispatcher/test/eomp~eompapp/EmpDisp?EmpNo=0500002203.  When i am running this application from browser ,