Explicit Locking Question

Dear all
I have a question about <<Developer’s Guide>> Explicit Locking (27-3):
"In a replicated cache, puts are blocked, but they are not blocked in a partitioned cache. "
I want to know why "puts are not blocked in a partitioned cache."
Thanks

wangjw wrote:
Dear all
I have a question about <<Developer’s Guide>> Explicit Locking (27-3):
"In a replicated cache, puts are blocked, but they are not blocked in a partitioned cache. "
I want to know why "puts are not blocked in a partitioned cache."
ThanksThe normal behaviour is that lock does not block anything other than another lock.
The put-blocking behaviour at replicated caches is an anomaly which may be necessary due to backward compatibility reasons, or possibly a necessity due to the message flow for mutating operations in a replicated cache.
So the question really would be why puts are blocked in a replicated cache, and I would also be interested in the answer, although I have my guesses.
Best regards,
Robert

Similar Messages

  • Explicit Lock on for Update Table

    If I want to perform explicit lock acquiring on updating all records in “customer” table with “state” equals to “CA”. What command should I run?

    Hi,
    Refer to following ppt.
    http://www.indiana.edu/~dbateam/Documents/oracle_locking.ppt#260,5,Oracle Isolation Levels
    You can get to know the things.
    - Pavan Kumar N

  • Oracle Explicit Locks

    Hello experts ,
    Once again i want to clear my basic knowldge in terms of oracle locks.
    what i knows is that oracle atumatically locked the object whenever we perform any dml operation.( update,delete)
    but it is row level exclusive lock ( i.e. RX,in v$locked_object, it show locked mode 3 )
    It is implicit lock which oracle provided automatically.
    and the other lock is Explicit lock,
    it is either we have to locked the by using LOCK statement ( by using LOCK statement we can lock the table in modes
    (i.e row share(2),row exclusive(3), share(4), row share exclusive(5),exclusive(6) )
    OR
    the table is also locked by statemet "select ..for update"( but its row exlusive lock (RX 3))
    but
    when and in what condition we apply explicit lock?
    what are the practical future of these lock?
    can you please explain about these explicit lock like
    row share(2)
    row exclusive(3)
    share(4)
    row share exclusive(5)
    exclusive(6)
    I have read about these lock from books , blogs and other internet sites , but still my concepts is not clear
    in these area.
    Thanks in advance for your help.
    Regards,
    Prashant Mhatre

    Oracle uses locks (aka enqueues) to prevent destructive concurrent operations on a resource. Here is a short description of the different lock types written by Jonathan Lewis ("the international recognized Oracle Expert"): http://jonathanlewis.wordpress.com/2010/06/21/locks/.
    Except of the SELECT FOR UPDATE case I don't think there are many situation in which setting an explicit lock is necessary - the server knows where and when locks have to be used.

  • Explicit locking of Entity JavaBean

    Hi!
    I am developing local WD application based on EJB model using SAP NetWeaver Developer Studio 7.0.12
    There's Employee entity javabean, that is shown as a table on EmployeeView webdynpro view (model node, bound to controller).
    There's also EmployeeEdit webdynpro view, where Employee entity javabean is shown as set of InputFields (same model node, bound to controller).
    When user clicks Save button in EmployeeEdit view, changed values are saved.
    The problem arises when two users want to change the same record of Employee entity. Both can go to EmployeeEdit view, change values of record and click Save button, because actual transaction for saving is implemented only when users click Save button.
    The workaround for this would be explicit locking of entity record when first user goes to EmployeeEdit view, if it's not already locked. But I couldn't find enough information about this.
    [EJBLocking interface|http://help.sap.com/javadocs/nw04/current/en/com/sap/engine/interfaces/ejb/locking/EJBLocking.html] might be what I need, but I don't know how to use it.
    Can anyone give me an idea about all this?
    Thanks in advance
    Renat

    Hi, Ganga!
    Thank You for reply,
    I've already chosen "Local" locking for my entity bean and trying to realize explicit locking for my entity.
    I can't understand, what parameters do I need to pass to lock method.
    Here is code of entity home method, which is called to lock this entity.
         public void ejbHomeLockMe() {
              EJBLocking ejbl = null;
              Context ctx = null;
              try {
                   ctx = new InitialContext();
                   ejbl = (EJBLocking) ctx.lookup("java:comp/EJBLocking");
              } catch (NamingException ne) {
                   ne.printStackTrace();
                   throw new OklaException(ne.getMessage());
              try {
                   DataSource ds = (DataSource) ctx.lookup("jdbc/OKLA_DS");
                   ejbl.lock( //here I get NullPointerException
                        TableLocking.LIFETIME_TRANSACTION,
                        ds.getConnection(),
                        (EntityBean) this,
                        TableLocking.MODE_EXCLUSIVE_NONCUMULATIVE);
              } catch (SQLException sqle) {
                   sqle.printStackTrace();
                   throw new OklaException(sqle.getMessage());
              } catch (NamingException ne) {
                   ne.printStackTrace();
                   throw new OklaException(ne.getMessage());
    As a result I get this exception
       java.lang.NullPointerException
        at com.sap.engine.services.ejb.entity.pm.lock.EJBLockingImpl.getPKMap(EJBLockingImpl.java:108)
        at com.sap.engine.services.ejb.entity.pm.lock.EJBLockingImpl.lock(EJBLockingImpl.java:48)
        at my.company.okla.employee.EmployeeBean.ejbHomeLockMe(EmployeeBean.java:92)
    Any thoughts about this?
    Many thanks
    Renat

  • About session abnormal termination, table locked question.

    Hi all,
    i test some table lock,after i run this statement:
    select * from testt for update nowait;
    i abnormal terminate session, then the table testt will be locking until after 20 minutes,
    i checked some document, the parameter of SQLNET.EXPIRE_TIME = 5 in sqlnet.ora file can release that lock, i set with 5,and then test again, but still wait 20 minutes the lock can release, why?

    I've changed this now to use the URL variable. I am used to using that to go from a results page to a details page where the recordset on the details page is used. I hadn't realised that you could just set a link to:
    <a href="addNomination.php?LodgeID=<?php echo($_GET['LodgeID']); ?>">Add Nomination</a>
    where there is no recordset on a page, just for the purposes of passing the variable. (Yeah, I know - this is probably really basic!)
    I do have one last question on this though - my form action is:
    <form method="post" id="form1" action="<?php echo KT_escapeAttribute(KT_getFullUri()); ?>">
    And then the link to a NominationAdded page is in the php code at the top of the AddNomination page:
    $ins_nominations->registerTrigger("END", "Trigger_Default_Redirect", 99, "NominationAdded.php");
    What would be useful would be to pass the URL variable through again, so that on the NominationAdded page I can have a link back to the same Lodge to add another Nomination without finding the Lodge again.
    But I'm not sure what the syntax would be, as it included some PHP within existing PHP, so not just:
    $ins_nominations->registerTrigger("END", "Trigger_Default_Redirect", 99, "nominationAdded.php?LodgeID=echo($_GET['LodgeID'])");
    I assume this must be possible, but not sure of the exact syntax?

  • File locking question

    Hello,
    We're considering using java to write in a new(to us) file system, OCFS2. However, this file system lacks certain features expected for file locking. Our app does not use java.nio.* that much, but it does use it. My question is what exact standards does the JVM require for file locking? Or is it ad hoc?
    If its ad hoc, what sys/func calls are required for locking?
    Thanks,

    The docs are rather specific that all of the functionality for FileLock is platform dependent.
    So you should test it.

  • Hashtable locking question

    I see that the put and get methods of Hashtable are synchronized, which is great for multi-thread execution, however, if outside the Hashtable class I use
    Hashtable t = new Hashtable();
    synchronized(t) {
       // loop over the hashtable in here and print out the values
    }is that synchronized block using the same lock as Hashtable's internal one? In other words, if I'm inside that synchronized block am I assured that no other thread can call get() or put()?
    I'm just looking for the proper way to iterate over the Hashtable while assuring myself it won't be modified.
    thanks!!!

    I looked up the SynchronizedMap source and don't see a big difference between it and Hashtable. SM uses synchronized blocks in every function and Hashtable uses synchronized methods. Is their a difference? If it's just a matter of one way being preferred over another let me know.
    Also, I'd still like an answer to my original question about the locks...is the object lock in a synchronized block the same as the class lock on that object's synchronized methods (see my example in post 1)?
    thanks!

  • Trivial Lock Question - nested synchronized instance method call

    Hi there. I have a question surrounding the following code block:
            public synchronized void bow(Friend bower)
                System.out.format("%s: %s has bowed to me!%n",
                        this.name, bower.getName());
                bower.bowBack(this);
            public synchronized void bowBack(Friend bower)
                System.out.format("%s: %s has bowed back to me!%n",
                        this.name, bower.getName());
            }If the bow method is invoked by the currently executing thread that has obtained the lock on the current instance and the
    call "bower.bowBack()" is invoked, what happens? Is the lock released then obtained again by the current thread? or does it hold onto it since the method
    "bowBack" is called within the method "bow"?
    Thank you!
    Regards

    thank you as always mr. verdagen!
    regards

  • Ipad mini auto lock question

    I put the auto lock to 10 mins but when my ipad mini is turned off and i turn it on with the little apple on the screen the screens seems to automatically turn off right after the lock screen appears. Is it normal?? I once had a samsung tab and it was doing that all the time and i realized it was messed up.
    Thank you. Have a nice day.

    My 32 GB iPad 2 has a capacity of 28.3 GB.
    It should be approximately the same for any 32 GB iPad.

  • Record Locking question

    Hi,
    I have the following situation:
    1) A batch process is running within a transaction with intension of commiting the changes at end if the process completes
    2) An online system (internet 3Tier app) issues an UPDATE statement on a record that is locked by the batch process. This UPDATE statement is not in a transaction.
    3) The problem is the UPDATE statement waits until the batch process either performs a COMMIT or ROLLBACK. I want it to return immediately so I can notify the online user.
    How can I have the UPDATE come back rather than wait. I do not really want to issue a SELECT statement with FOR UPDATE NOWAIT just before the UPDATE statement. Thanks in advance.

    Thanks for the reply.
    Normally I would use "select ... for update no wait" especially in desktop type applications. But in the internet world, when dealing with COM objects, ADO, and connection pooling, I cannot issue a start transaction, then issue select with for update nowait, and then show the html form to the user to make changes. The user may sit on the screen for a while. In the meantime, I have a database connection that is being tied up.
    So for record concurrency, we used a simple counter mechanism where any update (internet app, or desktop app) would update the counter. Any on update whe add this counter field to the where clause so if somone else has changed the data, the update would result in 0 rows affected. Normally this works well except in a situation where a desktop app is running a batch process and has not committed yet. In this case the update just waits.
    I know for if I juggle the data around a bit I can issue select for update no wait, then build the update recordset, and issue update, and them commit. I was looking for something that can return the update statement immediately with some sort of ORA error.
    Sorry for the long note.

  • Lifecycle designer 8 Field Locking question

    I have created a Remote access request form that is sent out to people when they need to connect to our network remotely. the form asks them to enter their contact details (Text field) and i have also created a table that asks what server they need access to (drop down list). However i also have text fields next to the drop down list. The user is only supposed to fill out their contact details and server name fields, then send it back to me and i will issue them an ip address, password etc. I will then save the form and send them a copy for reference. What i would like to do is lock down the form so they can only enter data in certain fields, but when it is sent back to me i can fill in the rest of the fields, ( ip address, password fields etc). Choosing to lock down a field after signing isn't any help to me because when they sign it and send back to me i want to be able to enter the rest of the information.
    Is there any possible work around to this.. how will the document know who has full access to it?
    Cheers,
    Dan
    IT Admin
    FEA LTD.

    A couple steps have to be made to have your form expand. Make sure when you save the form, it is saved as "Dynamic" and not "static".
    Also, make sure you click "Expand to fit" under "Height" in the Layout tab.
    If you want everything below your "expandable" section to move down, you will have to make sure all of those parts below are "wrapped" in a subform and the content is set to "flowed". You can wrap a "positioned" subform in a "flowed" subform.
    I hope this is some what helpful and understandable.

  • Database locking question

    Hi all,
    I have a small problem here that I've been trying to resolve for some time and couldn't come with a solution that "feels right".
    i'm working on a finance application where we have a table to
    keep a history of customer's transactions. The problem has to do with three fields:
    - customer's accountid
    - transaction amount
    - forward balance
    the first two are trivial, the last one is calculated on a row insertion: we get the last row for the account, and add the amount value from the new row(one being about to be inserted) the resulting amount becomes the new forward balance for the new row. This is like keeping the per-transaction account balance on a bank statement.
    Now, the problem is that we have several application servers inserting these rows into the same database in parallel. And now what happens is that if two servers are trying to insert rows (for different transactions but for the same acount) in the forward balance calculation logic both processes read the same last (old) row's forward balance and add that to their respective transactions' amounts and then record the new records. The forward balances in both new transactions are now screwed.
    I'm not sure how to fix this problem: I was reading about different database isolation levels and considered using pessimistic locks but all those mechanisms seem to solve problems with updating the same rows - not a combination of reading one row, and creating a new row with that row's result.
    Just to be complete: we are using MySQL (latest) with Hibernate 2.1.6 on Resin application server.
    Thank you in advance for any suggestions/recommendations/advice.
    -Oleg.

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

  • Layer is Partially Locked question?

    I'm using Windows 7 64 bit but I use Photoshop CS5 32 bit.
    In my Layers Panel every file that I open up has that little icon (Indicates Layer is partially Locked).
      A lot of my functions are grayed out because of this condition. If I duplicate the Layer or put a selection around a layer or make a new layer (Layer 0) all previous grayed out functions now work.
    I uninstalled and reinstall PS CS 5 but still had the same problem. Is there something I can do about this condition?
                    Thank you

    I'm not sure if this is your problem, but every time an image is opened for the first time in Photoshop, there is one layer called Background.  This layer is automatically locked.  You can convert the Background layer into a normal (unlocked) layer by double-clicking on the word Background. You are prompted to give the layer another name (default is Layer 0).

  • Lock Question

    Hello,
    I have the following sentence on a procedure:
    LOCK TABLE ae_bc_trx IN ROW SHARE MODE;
    I need to know how to free the Lock in the same procedure or it liberates itself when I commit a transaction on the table?
    We are on DB 10g.
    Thanks

    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_9015.htm#SQLRF01605

  • 11g oracle lock question

    I'm trying to understand locking on "other end of FK", i..e. operations on child table in 11g. Database version 11.2.0.2.0
    Table bal_fct has columns(branch id, acct id, cust id, bal dt, bal ccy id, stmt id, bal amt). PK/Unique index on branch id, acct id, cust id, bal dt, bal ccy id, stmt id in that order. All these columns have FKs. No index on these FKs. There is a bitmap index on acct_id.
    An ETL job is doing inserts in bal fct table (child). As I understand, any operation on child table would take RX(mode 3) on parent tables in 11g.
    I queried locks taken. It is taking mode 3 lock on all the dimension tables EXCEPT ACCT(acct_id). Why? I assumed that it will take also mode 3 lock on ACCT also. I have read in other threads that bitmap index really don't count in these discussions.
    Thanks for your help.
    Edited by: rkuppa on May 26, 2013 7:10 AM
    Edited by: rkuppa on May 26, 2013 7:11 AM
    Edited by: rkuppa on May 26, 2013 4:23 PM

    >
    I'm trying to understand locking on "other end of FK", i..e. operations on child table in 11g. Database version 11.2.0.2.0
    >
    Here are two articles about that by Jonathan Lewis
    http://jonathanlewis.wordpress.com/2010/06/21/locks/
    http://jonathanlewis.wordpress.com/2010/02/15/lock-horror/
    >
    Table bal_fct has columns(branch id, acct id, cust id, bal dt, bal ccy id, stmt id, bal amt). PK/Unique index on branch id, acct id, cust id, bal dt, bal ccy id, stmt id in that order. All these columns have FKs. No index on these FKs. There is a bitmap index on acct_id.
    An ETL job is doing inserts in bal fct table (child). As I understand, any operation on child table would take RX(mode 3) on parent tables in 11g.
    I queried locks taken. It is taking mode 3 lock on all the tables EXCEPT ACCT(acct_id). Why? I assumed that it will take also mode 3 lock on ACCT also. I have read in other threads that bitmap index really don't count in these discussions.
    >
    You won't get row level locks when a bitmap index is used.
    Can you edit your post and clarify it a bit.
    You mention 'bal_fct table (child). The table name has 'fct' in it: is this a fact table or a child table?
    And post whether your issue is similar to the one in this other thread from yesterday.
    11g child table update locking
    Some of the info there may help.

Maybe you are looking for

  • SOLVED !!! Import Excel Null column problem

    Hi all, Import data from Excel is fine as long as there's is no column in target table that is Varchar2(1) and Null allowable. If there's the above type, the DML for the insert always replace the null column with 'NULL' resulting in SQL Error:ORA-128

  • Auto Run won't work

    I can't get the auto run feature to work for placing content on a CD. Any Thoughts PLEASE? Thank you!

  • Standalone JMS client  in SJS App Server 8.0

    Hi I am trying to retrieve a message from a JMS queue from astandalone client. The code the client uses to lookup JMS resources is: try           /* Create the object of InitialContext interface */ Properties env = new Properties( ); env.put(Context.

  • Mountain lion redeem code?

    hello i recieved 1 e-mail from apple with a PDF yesterday (it has been 30 hours) they said they will send the password in another e-mail how long does it take to recieved the password? (i cant call apple i am not from usa i am in U.A.E) is there a wa

  • HP OfficeJet 6700 Premium - How do I turn on/adjust automatic scan cropping?

    Hi, How do I turn on, turn off or adjust automatic cropping on my scanner? I keep getting image errors when trying to scan a check to deposit to my credit union. Instead, of the check being automatically cropped I find I have to do this manually (as