How to define TX_SERIALIZABLE isolation level for a CMP EJB

Hi JDev Team,
I have created a portable Primary Key Generator realized as a CMP Entity Bean which
has a method getNEXTID().
This method returns a PK from a table
and increments it by one.
My question is:
How can I set the transaction isolation level of getNEXTID() to TX_SERIALIZABLE in order to avoid phantom and dirty read problems?
Best Regards,
Stoyan K.

Assuming you are using the bc4j cmp implementation, the default for isolation level is TX_READ_COMMITTED so I don't think you run the risk of phantom or dirty read.
Unfortnately as of now this property cannot be specified declaratively.
It looks like you want to run the getNEXTID() with the RequiredNew transaction attribute.
null

Similar Messages

  • 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 isolation level for BMP

    Hi.
    We're trying to avoid the ORA-08177 by setting the isolation level in the weblogic-ejb-jar.xml
    to READ_COMMITED
    Still (looking in the jdbc.log) it seems that weblogic set the transaction isolation
    level to SERIALIZABLE
    The xml :
    <weblogic-enterprise-bean>
    <ejb-name>Account</ejb-name>
    <caching-descriptor>
    <max-beans-in-cache>100</max-beans-in-cache>
    <idle-timeout-seconds>600</idle-timeout-seconds>
    <cache-strategy>Read-Write</cache-strategy>
    </caching-descriptor>
    <persistence-descriptor>
    <delay-updates-until-end-of-tx>true</delay-updates-until-end-of-tx>
    <finders-call-ejbload>false</finders-call-ejbload>
    </persistence-descriptor>
    <clustering-descriptor>
    <home-is-clusterable>false</home-is-clusterable>
    <home-load-algorithm>round-robin</home-load-algorithm>
    </clustering-descriptor>
    <enable-call-by-reference>false</enable-call-by-reference>
    <jndi-name>Account</jndi-name>
    <transaction-isolation>
         <isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
    <method><ejb-name>Account</ejb-name><method-name>*</method-name></method>
    </transaction-isolation>
    </weblogic-enterprise-bean>
    Regards

    When I marked all the beans with READ_COMMITED it works.

  • How to change the transaction isolation level of a CMP?

    How to change the transaction isolation level of a CMP from SUN's Deployment Tool? So far I can't find any entry for this setting.

    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

  • Transaction Isolation Level for EJB methods

    L.S.
    I just found out the in OC4J one can not set the transaction isolation level on ejb methods. Moreover one needs to revert to bean managed transaction (manual coding of the ALL transaction logic) to set the isolation level.
    On entity beans one can only set the isolation level for the whole bean (not on individual methods), and in session beans there is no way at all to set the isolation level.
    This is on shear contract to all other application servers I used before (there one can declaratively set the isolation level for a ejb method, both in session and in entitybean deployment descriptors)
    Is it foreseen in a future release to include such a valuable feature will be provided by oc4j?
    Note that I was VERY surprised that OC4J could not handle this (I checked the j2ee spec, but admittedly the spec is a little vague about this support and makes it vendor dependent. the j2ee spec does not mandate this, except for CMP entity beans, but includes some suggestions on this ability. But most other application servers implemented the ability)
    Regadrs,
    Erik

    Hello Erik --
    I think we met in Perth recently?
    Anyway, your information is correct.
    We can set the transaction isolation level for each entity bean, at the bean level. We don't have for the specification of method level isolation settings -- I'd be interested to hear how you would like/do use this. What behaviour do you expect to see when a transaction is started that spans multiple methods on a bean with different declared isolation levels.
    For session beans, we do not currently have the ability to declaratively specify the isolation level to use for the bean. I know this is not in the forthcoming 904 release, and will to check what is beyond that.
    As you point out, this can be done programatically using the Connection.setIsolationLevel() method on any connections you are using from within the session bean.
    I'd would like to log an enhancement request for you for this functionality. Can you send me an email at [email protected] and we'll take it offline.
    -steve-

  • Setting transaction isolation level for jDriver Oracle/XA

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

    Ian,
    The default for Oracle (any version) is ReadCommitted. The only other
    isolation level Oracle supports is Serializable but it's implemented in
    such a way that you will be allowed to continue until commit time and
    only then you might get an exception stating the the access for that
    transaction could not be serialized.
    I don't know for the jDriver but if you use the Oracle Thin XA driver
    even if you set the isolation level in your descriptor you will get an
    exception from Weblogic. It is a Weblogic bug and you can contact
    [email protected] to get a patch.
    Regards,
    Dejan
    IJ wrote:
    edocs (http://e-docs.bea.com/wls/docs70/oracle/trxjdbcx.html#1080746) states that,
    if using jDriver for Oracle/XA you can not set the transaction isolation level
    for a
    transaction and that 'Transactions use the transaction isolation level set on
    the connection
    or the default transaction isolation level for the database'. Does this mean that
    you shouldn't try to set it programatically (fair enough) or that you can't set
    it in the weblogic deployment descriptor either? Also anybody got any idea what
    the default is likely to be if you are using
    an Oracle 9iR2 database?

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

  • Isolation Level for Transaction

    Hi
    Under the Advanced Mode in JDBC Adapter, there is an option " Isolation Level For Transaction ". I see two alternatives there, " Serializable " and " Repeatable Load ". Which one should we select and when do we select it ?
    Radhika

    Hi Radhika,
    Check below documentation..
    http://help.sap.com/saphelp_nw70/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Regards,
    Swetha.

  • How to defined data carrier valued for Linux?

    Hi,
    I am Defining Data Carrier. But I don't understand "Data carrier type" value. Is this PC value data carrier type  for window? So If I want to define value data carrier for Linux. How to defined data carrier valued for Linux?
    Please advise,
    Duypm

    Hi Nikita,
    Refer the below mentioned links for your requirement.
    http://forums.sdn.sap.com/thread.jspa?threadID=412923
    http://forums.sdn.sap.com/thread.jspa?threadID=1639500
    Both have good guidelines on coding as well as configuration part.
    Regards,
    Deepak Kori

  • Setting db isolation level on transaction without EJB

              I'm using UserTransaction in the servlet container, to control XA transactions.
              We're not using EJB. How do I set the database isolation level? I'm tempted
              to use java.sql.Connection.setTransactionIsolation(). However, the Sun Javadoc
              for that method says you can't call that after the transaction has started (which
              makes sense). Right now, we're starting the transaction, getting a connection,
              closing the connection, and committing the transaction. I guess that order won't
              work if I want to set the isolation level. Or am I mixing apples and oranges
              here? If I use UserTransaction, is it even appropriate to try to set the isolation
              level on the connection?
              All I really want to do is change the default isolation level. We do not need
              different isolation levels for different use cases. (Not yet, anyway.) We might
              have transactions against two different database instances or other resource managers.
              That's why I want to use UserTransaction and XA transactions.
              Thanks!
              Steve Molitor
              [email protected]
              

    Only committed transactions are replicated to the subscriber.  But it is possible for the report to see dirty data if running in READ UNCOMMITTED or NOLOCK.  You should run your reports in READ COMMITTED or SNAPSHOT isolation , and your replication
    subscriber should be configured with READ COMMITTED SNAPSHOT ISLOATION eg
    alter database MySubscriber set allow_snapshot_isolation on;
    alter database MySubscriber set read_committed_snapshot on;
    as recommended here
    Enhance General Replication Performance.
    David
    David http://blogs.msdn.com/b/dbrowne/

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

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

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

  • How to define logic to BO for display of more meaningful messages in Webi?

    Hi All.
    Greetings for the Festive Season.
    We would like to know as to how to define the logic to our BO application while displaying messages to end users of Web Intelligence.
    We have defined restrictions for various users and restrictions are appliced correctly when the user logs in.
    We have some MIS REPORTS in Web Inetlligence with different charts and we have also given links to various other web intelligence reports at the bottom for users to click and view or do analysis.
    And if any user if he/ or she is not authorised to view any / or part of the report - it does not show up.
    Which works well.
    But if some user is not part of any group and is not authorised to view data in a particular report, then we see a standard message coming in like :
    "No Data to retrieve in Query1"   or    "No Data to retrieve in ABC".
    Which one could say is correct.  Because for that particular user, the query has NO data.
    But. We feel there has to be a logic to be defined differently with the applicaton.
    How do we differentiate - as to whether the query does not really have data at the back end and HENCE it is saying No data to retrieve in the Query or report
    OR whether the user who is trying to view report is NOT authorised to view  
    AND HENCE the message is displayed as "No Data to Retrieve"
    We looked at the source file and it is pointing to :../AnalyticalReporting/viewers/cdz_adv/ViewDocument.jsp?
    But we found it a bit difficult to understand the logic there.
    Could anyone advise as to how we could define this logic for Web Intelligence - so that messages we see on screen for the end user could be more meaningful ? How do we really make the system understand or look for 2 options as to whether the message to be displayed is because there is REALLY NO DATA AT THE DATABASE LEVEL, OR whether the USER is not authorised to view this data.
    Can this be made possible by any means or thro SDK ?
    Many thanks
    Regards
    Indu
    Edited by: Indumathy Narayanan on Dec 21, 2010 9:50 AM
    Edited by: Indumathy Narayanan on Dec 21, 2010 9:51 AM
    Edited by: Indumathy Narayanan on Dec 21, 2010 9:54 AM

    Here is my current report detail view.
    [http://s49.photobucket.com/albums/f270/helenen/add/?action=view&current=2010-06-2511-44-20.png]
    (click on link and view at 100%)
    The 3 rd KF column is the calculated ratio which is =>  2nd Column (Work Hrs) A% 1st column (PlanHrs)
    Right now, I cann't get % at detail line (they're now shown as X, because PlanHrs is not null at detail line.
    I'd like those X should be calculated as =>  WorkHrs (at that line) A% PlanHrs (of that specific employee) .
    For example: 16 A% 1827 = 0.875%
    It seems soo eassy but I coulnd't do it.

  • How to define Composite primary key for a Table

    Hi ,
    I am basically more into Java Programming , with little bit knowledge on Oracle as DataBase .so please excuse for my silly doubts .
    Can anybody please tell me how to define a Composite Primary Key on a Table .
    Thanks in advance .
    Edited by: user672373773 on Sep 25, 2009 8:54 AM

    Here is an example right out of the Oracle documentation and the syntax for adding PK since you mention adding a composite PK.
    Example creating composite index
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref594
    Syntax for adding a PK (composite or not)
    alter table oooooooo.tttttttt
    add constraint tttttttt_PK
    primary key (sample_column2,
    sample_column1)
    using index
    tablespace IDXSPC
    pctfree 05
    initrans 04
    maxtrans 08
    storage (initial 16k
    next 16k
    maxextents 32
    pctincrease 0);
    -- dictionary management with restricted storage, change as desired.
    HTH -- Mark D Powell --

  • How to define the date format for this date string

    2006-11-13 00:00:00.0
    How to define the date format in control file for sqlldr. "yyyy-mm-dd hh24:mi:ss" or "yyyy-mm-dd hh24:mi:ss.FF1" does not work
    thanks,

    SQL> desc t
    Name                                      Null?    Type
    TS                                                 TIMESTAMP(6)
    SQL> !cat t.ctl
    load data
    into table t
    truncate
    (ts timestamp "YYYY-MM-DD HH24:MI:SS.FF1")
    SQL> !cat t.dat
    2006-11-13 00:00:00.0
    SQL> !sqlldr userid=scott/tiger control=t.ctl data=t.dat log=t.log
    SQL*Loader: Release 10.2.0.3.0 - Production on Fri Sep 7 11:19:28 2007
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 1
    SQL> select * from t;
    TS
    13-NOV-06 12.00.00.000000 AMBest regards
    Maxim

Maybe you are looking for

  • GE70-0ND Screen flashing black and gray

    Hey, I bought a MSI GE70-0ND laptop almost 1 year ago. I have not had any problems with it until now. I run Windows 8 on it. Today when I logged in on my laptop the screen just immediately went black. Now it is flashing black and gray. When I move th

  • Can't sign in to DPS

    I am having a lot of trouble signing into DPS from Indesign, Folio Builder, Folio Producer, and Acrobat. Indesign gives me a Network Failure message and Online spins and spins then kicks me out. Prior to this issue i had also made a lot of correction

  • Account issues...

    So here's one you have all probably heard a few times already... I had an AOL account and bought a bunch of songs from iTunes with it. I bought a new Mac and via external hdd moved all these songs/videos over to it, authorised it everything good so f

  • For a type document insert contract no agree (consent)

    Hi, I've a problem. I must create a purchase order oil  with reference a contract oil but a sistem block with a message :' For a type document insert contract no agree (consent)'. Help me! Bye-bye.

  • Setting prefered applications manually in Gnome 3.2.1

    Hello, I just switched from Chromium to Chrome. I first did sudo pacman -R chromium and then installed google-chrome from AUR. In the System Settings it still shows Chromium as the default web browser but I can't change it to chrome since there is no