Locked status

Is it possible to determine whether a phone is locked to a provider or not just from the packaging? Basically my original phone was replaced by Sony Repair Centre with a locked version and I am having immence difficulty in getting them to send me a sim free version instead. As the original phone failed during the initial set-up and I got it from a third party, although I am pretty certain it wa a sim free version, I have no obvious way of proving it.

You should contact Sony directly but I doubt they have given you a locked device:
http://www.sonymobile.com/global-en/support/contact-us/
All we have to decide is what to do with the time that is given to us - J.R.R. Tolkien

Similar Messages

  • How to see lock status of a table ?

    Hi,
    My question is : how to see the lock status of a table ?
    and how to lock a table except run the FM ENQUEUE_TABLENAME?
    Is there any transcation that can lock a table ?
    thx in advance.

    Hi Vincent
    Via transaction SM12 we can check the lock entries at a particular point of time...
    Kind Regards
    Eswar

  • How to check lock status of field in current document?

    Hi,
    How to check the status of field in current document(master agreement), that is whether its locked or not.
    I locked "Publish to Supplier" checkbox after MA is saved first time. Now, I want to check the status whether this field is locked or not in the same document.
    IsLockOwner( ) is not returning the correct value. Its not giving the current document field lock status.
    Is there any way to get current document field status?
    Thanks,
    Saloni

    Hi,
    If I understand correctly, your requirement is to get the value of this field "Publish to Supplier on". It can be achieved by writing the below:
    isVendorVisible = doc.getExtensionField("VENDOR_VISIBLE").get();
    Meaning, if the box is checked, it will return a value = true and if not then false.
    Hope this helps,
    Regards,
    Vikram Shukla

  • DMS - locked status / how to limit security access

    I have a couple issues with a security profile (customer service) we have defined for DMS.   This profile is set up that when the document info record is in a "released" status, the customer service person has edit (CV02N) access.  When in an "on hold" status, the customer service person does not have edit (CV02N) access.  Further, the "Released" status is a "locked" status.
    1)  The Object links appears to be open for edit, regardless of whether or not we have the status "locked". 
    Also, the deletion indicator can be changed when in locked status.  I am looking for all fields to be locked except for the status field.  Customer Service should only be able to change status from "released" to "on hold", and should not be able to change anything else.  Any suggestions on how to do this?.
    2)  The intention is that the customer service person can use CV02N to change a document from "released" status to "on hold".  This is the ONLY change customer service should be able to make.  However, once the status changes from "released" to "on hold", it seems there is an authorization check missing.....  meaning now the customer service person is in "on hold" status and they should not be able to edit anything, but apparently they still have the CV02N access from the "released" status, and they can now also change any other fields, update object links and attachments before they save the document.  What am I missing?
    Any help would be greatly appreciated!!

    Hi,
    U can use following authorization objects to resrticts the document access
    1.C_DRAD_OBJ - Create/Change/Display/Delete Objec
       here in activity field dont check delete, change option, so that user can not change, delete existing object links
    2. C_DRAW_TCD - Authorization for document activit
    here in activity field dont check delete option, so that user can not mark DIR for deletion.
    award points if useful
    Regards
    sham

  • Cursors throwing Unexpected lock status: 6

    I am using a Berkeley DB instance and have a multithreaded clients each performing various types of operations on the database. In general there are three types of operations being performed, reads, writes (which use RMW locks), and (non-transactional) cursors. After some time my application dumps the following:
    Unexpected lock status: 6
    PANIC: Invalid argument
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__os_stack+0x2b) [0xb7ef085f]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__os_abort+0x1d) [0xb7eecbb1]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__env_panic+0xa8) [0xb7e80b8e]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__lock_get_internal+0x1855) [0xb7e2e925]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__lock_vec+0x167) [0xb7e2bd3c]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__db_lget+0x45c) [0xb7e8bfe2]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so [0xb7d850a5]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so [0xb7d816ce]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__dbc_get+0x598) [0xb7e76a29]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__dbc_get_pp+0x11f) [0xb7e870ec]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(_ZN3Dbc3getEP3DbtS1_j+0x3f) [0xb7d71feb]
    ...(non-berkeley db layers)...
    /lib/tls/i686/cmov/libpthread.so.0 [0xb7a2350f]
    /lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7b20a0e]
    Aborted
    In studying the core dumps and doing some testing this behavior only occurs when cursors are used, when those operations are removed the error no longer manifests itself so either the cursor is the issue, or how the cursors are interacting with other operations. Below is a sample of cursor code being run:
    void run_cursor()
    Dbc *curp = NULL;
    int ret;
    try
    int i = 0;
    Dbt key(&i,sizeof(int));
    Dbt data(buffer, 0);
    data.set_flags(DB_DBT_USERMEM);
    data.set_ulen(MAX_BUFFER_SIZE);
    db->cursor(NULL, &curp, 0);
    while ((ret = curp->get(&key, &data, DB_NEXT)) == 0) {
    //keep a list of all the keys in the db
    keys.push_back(i);
    if (ret != DB_NOTFOUND) {
    cerr << "Cursor Error" << endl;
    curp->close();
    catch (DbException &ex) {
    cout << ex.what() << endl;
    if( curp != NULL )
    curp->close();
    I have tried wrapping the cursor in a transaction and it seems to worsen the issue (it happens more frequently). In all methods I am printing error messages when exceptions are thrown by the database (e.g. DbExceptions) and the program prints no errors so I do not believe it is a side effect of some other error. Here is the relevant parts of the case where is RMW lock is used:
    void update()
    DbTxn *txn = NULL;
    try
    env->txn_begin(NULL, &txn, 0);
    int id;
    Dbt key( &id, sizeof(int) );
    Dbt value(buffer, 0);
    value.set_flags(DB_DBT_USERMEM);
    value.set_ulen(MAX_BUFFER_SIZE);
    int err = db->get(txn, &key, &value, DB_RMW);
    if( err == DB_NOTFOUND )
    cerr << "Error trying to read key" << endl;
    txn->abort(0);
    return;
    //code to modify the value here
    db->put(txn, &key, &value, 0);
    txn->commit(0);
    } catch (DbDeadlockException &de) {
    cout << de.what() << endl;
    if( txn != NULL )
    txn->abort();
    Just in case it helps, here is the output of db_stat -CA on the database after it has crashed:
    Default locking region information:
    12     Last allocated locker ID
    0x7fffffff     Current maximum unused locker ID
    9     Number of lock modes
    5000     Maximum number of locks possible
    5000     Maximum number of lockers possible
    1000     Maximum number of lock objects possible
    1     Number of lock object partitions
    6     Number of current locks
    9     Maximum number of locks at any one time
    4     Maximum number of locks in any one bucket
    0     Maximum number of locks stolen by for an empty partition
    0     Maximum number of locks stolen for any one partition
    11     Number of current lockers
    13     Maximum number of lockers at any one time
    3     Number of current lock objects
    9     Maximum number of lock objects at any one time
    2     Maximum number of lock objects in any one bucket
    0     Maximum number of objects stolen by for an empty partition
    0     Maximum number of objects stolen for any one partition
    3786734     Total number of locks requested
    3786664     Total number of locks released
    0     Total number of locks upgraded
    1     Total number of locks downgraded
    7089     Lock requests not available due to conflicts, for which we waited
    61     Lock requests not available due to conflicts, for which we did not wait
    0     Number of deadlocks
    0     Lock timeout value
    0     Number of locks that have timed out
    1000000     Transaction timeout value
    0     Number of transactions that have timed out
    1MB 592KB     The size of the lock region
    0     The number of partition locks that required waiting (0%)
    0     The maximum number of times any partition lock was waited for (0%)
    0     The number of object queue operations that required waiting (0%)
    0     The number of locker allocations that required waiting (0%)
    165     The number of region locks that required waiting (0%)
    2     Maximum hash bucket length
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Lock REGINFO information:
    Lock     Region type
    5     Region ID
    __db.005     Region name
    0xb781b000     Original region address
    0xb781b000     Region address
    0xb781b0c0     Region primary address
    0     Region maximum allocation
    0     Region allocated
    Region allocations: 11006 allocations, 0 failures, 0 frees, 1 longest
    Allocations by power-of-two sizes:
    1KB     11003
    2KB     0
    4KB     0
    8KB     0
    16KB     1
    32KB     0
    64KB     1
    128KB     1
    256KB     0
    512KB     0
    1024KB     0
    REGION_JOIN_OK     Region flags
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Lock region parameters:
    104     Lock region region mutex [165/7025066 0% 5979/3075574672]
    8191     locker table size
    1031     object table size
    600     obj_off
    62608     locker_off
    0     need_dd
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Lock conflict matrix:
    0     0     0     0     0     0     0     0     0     
    0     0     1     0     1     0     1     0     1     
    0     1     1     1     1     1     1     1     1     
    0     0     0     0     0     0     0     0     0     
    0     1     1     0     0     0     0     1     1     
    0     0     1     0     0     0     0     0     1     
    0     1     1     0     0     0     0     1     1     
    0     0     1     0     1     0     1     0     0     
    0     1     1     0     1     1     1     0     1     
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Locks grouped by lockers:
    Locker Mode Count Status ----------------- Object ---------------
    4 dd= 9 locks held 1 write locks 0 pid/thread 5979/3080828608
    4 READ 1 HELD ./db.db handle 0
    5 dd= 8 locks held 0 write locks 0 pid/thread 5979/3072416656
    6 dd= 7 locks held 0 write locks 0 pid/thread 5979/3073469328
    7 dd= 6 locks held 0 write locks 0 pid/thread 5979/3073469328
    8 dd= 5 locks held 0 write locks 0 pid/thread 5979/3073469328
    9 dd= 4 locks held 0 write locks 0 pid/thread 5979/3072416656
    a dd= 3 locks held 1 write locks 0 pid/thread 5979/3073469328
    a READ 1 WAIT ./db.db page 21
    a READ 2 HELD ./db.db page 20
    b dd= 2 locks held 1 write locks 0 pid/thread 5979/3075574672
    b READ 1 WAIT ./db.db page 21
    b READ 2 HELD ./db.db page 20
    c dd= 1 locks held 0 write locks 0 pid/thread 5979/3075574672
    800054d9 dd= 0 locks held 1 write locks 1 pid/thread 5979/3074522000expires 05-05-12:41:36.048050000
    800054d9 WRITE 2 HELD ./db.db page 21
    800054da dd= 0 locks held 0 write locks 0 pid/thread 5979/3072416656
    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    Locks grouped by object:
    Locker Mode Count Status ----------------- Object ---------------
    800054d9 WRITE 2 HELD ./db.db page 21
    a READ 1 WAIT ./db.db page 21
    b READ 1 WAIT ./db.db page 21
    a READ 2 HELD ./db.db page 20
    b READ 2 HELD ./db.db page 20
    4 READ 1 HELD ./db.db handle 0
    The number of locks and lockers is somewhat low at 5,000 each, this was intentional since the same error occurs with larger numbers of locks/lockers it simply takes longer to occur. I have reviewed this output and nothing out of the ordinary seems to be occurring as far as I can tell.
    Any additional insight would be appreciated.

    Thanks to both of you for your suggestions.
    I have still noticing the same issue with very similar output etc so I wont repost that. After running it some more I have started seeing another error message, it looks like its very similar and hopefully with make the issue more clear.
    Here is the output of the error file:
    TAS unlock failed: lock already unlocked
    PANIC: Permission denied
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__os_stack+0x2b) [0xb7ee585f]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__os_abort+0x1d) [0xb7ee1bb1]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__env_panic+0xa8) [0xb7e75b8e]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__db_tas_mutex_unlock+0xa5) [0xb7d72245]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so [0xb7e27d04]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__lock_detect+0x129) [0xb7e268bf]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__lock_get_internal+0x1434) [0xb7e23504]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__lock_vec+0x167) [0xb7e20d3c]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__db_lget+0x45c) [0xb7e80fe2]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so [0xb7d7a0a5]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so [0xb7d766ce]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__dbc_get+0x598) [0xb7e6ba29]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(__dbc_get_pp+0x11f) [0xb7e7c0ec]
    /usr/local/BerkeleyDB.4.7/lib/libdb_cxx-4.7.so(_ZN3Dbc3getEP3DbtS1_j+0x3f) [0xb7d66feb]
    ...(user code stack layers)...
    /lib/tls/i686/cmov/libpthread.so.0 [0xb79a950f]
    /lib/tls/i686/cmov/libc.so.6(clone+0x5e) [0xb7a9ea0e]
    Here is the output of the waits for table:
    Waiter:     Waiting on:
    80002249/50:     957608
    6/50:     80002249 957208
    Waitsfor array
    Waiter:     Waiting on:
    8000224a/28:     957288
    a/28:     8000224a 957608
    Waitsfor array
    Waiter:     Waiting on:
    8000224c/22:     957608
    6/22:     8000224c 957368
    Waitsfor array
    Waiter:     Waiting on:
    8000224c/22:     957608
    6/22:     8000224c 957368
    4/22:     8000224c 957048
    Waitsfor array
    Waiter:     Waiting on:
    8000224d/25:     957528
    7/25:     8000224d 957608
    Waitsfor array
    Waiter:     Waiting on:
    8000224d/25:     957528
    7/25:     8000224d 957608
    6/25:     8000224d 957208
    Waitsfor array
    Waiter:     Waiting on:
    8000224d/25:     957528
    7/25:     8000224d 957608
    6/25:     8000224d 957208
    4/25:     8000224d 957288
    Waitsfor array
    Waiter:     Waiting on:
    80002251/10:     957048
    a/10:     80002251 957128
    Waitsfor array
    Waiter:     Waiting on:
    80002257/39:     80002254 957368
    80002254/39:     957288
    Waitsfor array
    Waiter:     Waiting on:
    80002258/14:     957048
    4/14:     80002258 957608
    Waitsfor array
    Waiter:     Waiting on:
    80002258/14:     957048
    8/14:     80002258 957208
    4/14:     80002258 957608
    Waitsfor array
    Waiter:     Waiting on:
    80002259/39:     80002257 957448
    80002258/14:     957048
    80002257/39:     957368
    8/14:     80002258 957208
    4/14:     80002258 957608
    Waitsfor array
    Waiter:     Waiting on:
    80002259/39:     957448
    8/39:     80002259 957288
    7/39:     80002259 957048
    6/39:     80002259 957528
    Waitsfor array
    Waiter:     Waiting on:
    80002259/0:     0
    80002257/0:     0
    Waitsfor array
    Waiter:     Waiting on:
    8000225a/40:     956968
    7/40:     8000225a 956888
    Waitsfor array
    Waiter:     Waiting on:
    8000225a/40:     956968
    7/40:     8000225a 956888
    4/40:     8000225a 957608
    It looks like there is a similar pattern here at the end with the two entries waiting on zero ("80002259/0:     0 80002257/0:     0"), which is why I suspect its the same error just manifesting itself in a slightly different manner.
    I am using lock detection, I currently have it set to use DB_LOCK_MAXLOCKS, I have tried others as well with not change in behavior.
    Most of my transaction code takes the following form, so if the get is successful (the id exists) then the data is updated and written back to the database. If an exception is thrown then it is caught and the transaction is aborted. As far as I can tell this should not leave and transaction handles left open or anything along those lines as the error message suggests.
    void do_txn()
    DbTxn *txn = NULL;
    try
    db->txn_begin(NULL, &txn, 0);
    Data d;
    //does a db->get using the txn pointer and a DB_RMW lock
    //returns do_get returns false if the id does not exist
    bool success = do_get(id, &d, txn);
    if( !success )
    txn->abort();
    return;
    //update data as necessary
    //does a db->put using the txn pointer
    do_put(id, &d, txn);
    txn->commit(0);
    } catch (DbDeadlockException &de) {
    cout << de.what() << endl;
    if( txn != NULL )
    txn->abort();
    }

  • Making certain DIR fields editable even when the DIR is in locked status(S)

    Is it possible to make certain fields in the DIR editable even though the DIR status is locked (S)?
    I guess it can't be done through customising. We've made a suggestion that the users should change the status so that the document will become editable again.
    But they would like to edit certain fields, i.e. description and lab/office only. The rest of the fields and data should remain locked. Can this be achieved through a user-exit somehow?
    Regards,
    Kenneth

    Dear Kenneth,
    as far as I know this is not working because due to the locked status type the field are disabled by the system. So to avoid this the whole checking logic would have to be changed.
    Best regards,
    Christoph

  • What does "Locked" status really mean in FPGA Timekeeper

    The help says, "FPGA Timekeeper locked is TRUE if the FPGA Timekeeper has locked on to and is tracking the given time reference."
    That's not very specific. 
    - The Timekeeper is only "tracking the given time reference" when "Sync Time.vi" is called by the code, right?  Otherwise isn't it just predicting time base on the FPGA clock cycle, and apparently some filtering, gain and interpolation?  That wouldn't really be tracking the time reference.
    - Is the Timekeeper checking the interval at which Sync Time.vi is called?
    - Is it comparing the offset of the two time values input to Sync Time.vi  to its internal prediction?
    - Is it making some judgement after a series of Sync Time.vi calls (how many?) that it has figured out the relative variations between the time reference and the FPGA clock?  How does it make that judgement?
    - If a long time passes between Sync Time.vi calls does it decide it has lost its lock?
    - Does calling Time Synce too frequently or too infrequently contribute to not achieving locked status, or to losing it?
    Thanks for the help!  I love the idea of the FPGA Timekeeper but I don't know how to interpret the lock.  I can get the offset from the time reference, but what I'd really love to know is the size of the error when calling Time Synce.vi.

    Hello Matt_Dennie,
    The article below indicates that when using the FPGA Timekeeper with NI-9467 hardware, you will be able to correlate absolute time with system events at an accuracy of around 100 ns.
    How Do I Use the FPGA Timekeeper to Synchronize Data with the NI 9467 GPS Module?:
    http://ae.natinst.com/public.nsf/web/searchinternal/efdc35727d4f2cc086257a0700693003?OpenDocument
    FPGA Timekeeper 1.1b0 GetStatus.vi:
    http://forums.ni.com/t5/LabVIEW/FPGA-Timekeeper-1-1b0-GetStatus-vi-Locked-indicator-never-goes/td-p/...
    The example VI for FPGA Timekeeper explains (briefly) the process used for synchronization (Synchronize to GPS – cRIO.lvproj). 
    j_bou

  • Classification needs to be editable in locked status

    Hi,
      We have Document stats 'RL' which has locked status 'S'. So when a document comes to this state no data or fields can be editable.If we change the configurations and remove 'S' from 'Rl' status we have all the fields open and editable.
    In Change mode CV02n we need to have the classification fields to be changed.
    Is this possible ?
    Appreciate your reply.
    Thanks and regards
    Shahnawaz Mohammed

    Hi,
    regarding your question I have to inform you that the classification data is not editable in the standard if the document info record is
    set to a locking status. In this case the message 26035 'Status does not allow you to change certain data' is raised in the
    status line of the screen. The longtext of this message clearly explains that only a few data is changeable in this kind of status:
    The system checks the status type of the new status in the IMG. The document has a status of status type S (lock status) or O (original being processed).
    If a document has a status with one of these status types, not all fields are available for entry. You can still carry out the following
    functions:
    - change the status
    - link objects to the document
    - change the deletion indicator (subject to authorization check)
    So from standard point of view I can only confirm that the system is working correctly and the classification data cannot be changed.
    Best regards,
    Christoph

  • How see, howmany internal orders are locked status- particular company code

    Hi
    Can any one tell, what table it uses to see the total number of  locked status of internal orders in a particular company code.
    Regards
    Krish

    Hi Krish
    Use SE16N on table JEST for the status I0043 (there maybe other status called "locked" that you use, for a full list see BS23 and sort the text column to see all).
    As an alternative use KOK3 to display collectively, this includes a column for the status.
    Hope this helps.
    Elaine

  • Is lock status part of state?

    I am testing the concept that "every object has a lock, or can serve as a lock".
    test #1
    Instances of immutable objects are not allowed to change "state"? Using immutable objects as locks:
    public class Main {
      public static void main(String[] args) {
        Object lock = "immutable lock?";
        for(int i = 0; i < 30; i++) {  new AAA(lock).start();  }
        static class AAA extends Thread {
          Object lock;
          AAA(Object obj) { lock = obj; }
          public void run() {
            synchronized(lock) {
              try { Thread.sleep((long) (System.currentTimeMillis()  % 1000)); } catch(InterruptedException e) { }
                System.out.println("AAA::run()--> " + getName() + " has exited.....");
    }The locking works just fine. This could mean and/or two things:
    (1) Saying that instances of immutable classes don't change state is not the whole story.
    (2) Lock status is not part of an object's state.
    test #2
    Serialization captures the state of an object? To investigate if an object's lock status is part of state:
    public class Main {
      public static void main(String[] args) {
        try {
          Lock lock = new Lock();
          synchronized (lock) {  // sync block #1
            ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File("/tmp/lock.obj")));
            oos.writeObject(lock); // the state of "lock" = locked?
          ObjectInputStream ois = new ObjectInputStream(new FileInputStream(new File("/tmp/lock.obj")));
          Lock lockCopy = (Lock) ois.readObject();
          synchronized (lockCopy) {  // sync block #2
            // as "/tmp/lock.obj" represents an object that has its lock unavailable
            // is it be possible to enter this sync block?
            System.out.println("status of \"lock\" not captured in serialization process");
        } catch (Exception e) { e.printStackTrace() }
      static class Lock implements Serializable {  public void foo() { }  }
    }The result is that sync block #2 is entered into with no problem.
    This proves that lock status is not part of the state of an object? If so, the de-serialized object should still be in a "locked" position.
    conclusion
    "Every object can be used as a lock" should not be conceptualized as the java.lang.Object class having a private (boolean?) field that is true when some thread has its lock, and false otherwise. Locking appears to violate the rules of serialization and immutability, or else it is just "weird". How the locking happens is hidden. Understanding how locking works stops at "somehow it just works and don't think about it anymore".
    If my test programs are flawed, or my conclusion false, I'd like to please hear any opinions. thanks.

    Gerald_Thaler wrote:
    kajbj wrote:
    Gerald_Thaler wrote:
    >
    Most of the objects in a program are never used as locks. Still they need to be prepared, and as a consequence waste a considerable amount of memory.
    There is potentially a lot of state involved with the synchronized mechanism. It must be stored wich thread owns a monitor and how often. How often?Java monitors are reentrant, they must remember how often the owning thread has entered.I wouldn't say how often since the sounds like you need to keep some kind of statistics, or information regarding when it happened. All it needs to have is a counter that you increase when you acquire, and decrease when you release.
    >
    Then if there is actual contention, a list of waiting threads on the monitor needs to be managed, and so on.So what? That's the way that it would work even if you didn't have monitors.Yes.
    In practice VMs try to create most of this state only when necessary. Theres a pointer embedded in every object that points to its monitor (if used). Because of this, every object always wastes the memory of one additional pointer (4 byte on 32-Bit, 8 byte on 64-Bit VMs): I doubt that anything dictates that you must store a pointer in every object.As you can have up to approx. 2^pointersize individual objects in a process, you need to reserve about pointersize many bits in every object to distinguish their monitor states. What's the alternative? Do you know VMs that can get around this?See the previous reply. You don't need to keep the information in the object.
    >
    A plain java.lang.Object needs 8 byte of memory on a 32-Bit machine, 4 byte type info and 4 byte monitor state. But that's not all. Once you really start synchronizing on a lot of different objects, and there is some contention, the VM needs to allocate additional memory and resources and may ultimately run out of memory and crash. It's not too hard to reproduce this problem on the current JDK 6. Ok, post sample code that crashes due to the locks.
    public class Main implements Runnable {
    public static final int count = 0x4000000;
    public static final Object[] locks = new Object[count];
    public static final int[] counters = new int[count];
    public static void main(String[] args) throws Exception {
    for (int n = 0; n < count; ++n)
    locks[n] = new Object();
    allocateNative(0x3D000);
    System.out.println("starting threads...");
    Thread[] threads = new Thread[4];
    for (int n = 0; n < threads.length; ++n) {
    threads[n] = new Thread(new Main());
    threads[n].start();
    for (Thread thread: threads)
    thread.join();
    @Override
    public void run() {
    for (int n = 0; n < count; ++n) {
    synchronized (locks[n]) {
    ++counters[n];
    try {
    Thread.sleep(1); // force contention!
    } catch (InterruptedException ex) {
    break;
    private static native void allocateNative(int kbytes);
    static {
    System.load(PATH_TO_DLL);
    }This "works" with the 32-Bit JDK 1.6.0_18 on my Windows 7 machine with 4 cores. I ran it with -Xmx1584m (the maximum possible value). You might need to adjust the constants. Allocate as many objects as possible without getting an OutOfMemoryError. Then, when the threads are starting to compete over the locks, you can see in the task manager, that the memory consumption of the java process is ever increasing. After some time memory is exhausted and the VM crashes. If you want to see the crash, you must use a 32-Bit VM of course, so that the process can actually run out of memory. The VM obviously allocates additional memory outside the managed heap, when performing the synchronized statements. To get to the crash faster (the loop with the sleep is slow) i took some more memory away from the process with allocateNative(), that simply does malloc. But you do not strictly need that.How could it be done differently? The same thing would happen in any language, and also at the OS level.
    >
    You can't really say that it's wrong just because some programmers are bad at what they do. A Java programmer should know that static methods and normal methods don't compete for the same lock.Yes, they should know it. But the java philosophy is "as simple as possible". I've talked to quite a few programmers, that did not know what synchronized does. Some even think that making every method in the program synchronized, will make it thread safe. Instead that's a sure recipe for deadlock.I've seen lost of "programmers" that don't know the difference between == and equals. It's their problem if they don't want to learn how the language works, and concurrency programming will never become easy. I actually think that it's too easy for beginners to create a Thread without knowing what they do.
    >
    Modifying static state from synchronized nonstatic methods is not thread safe of course, but this might easily be overlooked.Huh? Why?Because the object on which to synchronize is not explicitly mentioned. Removing the static from the method declaration changes the synchronization of the program.There are actually lots of people who think that synchronization on an instance will "stop execution" on all instances. It's still their fault if they don't read books.

  • Recently I connected my AE, but the iPad Wi-Fi settings showed it as locked (requiring password).  After each time I re-set it, it returns to a locked status.  What is happening?

    After a re-set, the AE keeps returning to a locked status.  Try again, the same results.  What do I need to do?

    The locked indicator on your iPad means that the network is "secured" and requires a password to gain access. Once your iPad successfully connects it remembers the password for you so that you don't have to enter it again.
    If you change the password on your network, You'll have to change it on your iPad as well.  In order to do this.
    On your iPad:
    1. select the system preferences (gears) icon.
    2. tap on Wi-Fi and make sure the Wi-Fi switch is ON
    3. tap on the blue arrow of the network that you need to change the password for.
    4. at the top of the next page. tap on "Forget this Network"
    5. tap on the Forget button
    6. close the app by pressing the home button on the ipad
    7. now go back into system preferences and tap on your network name when it comes back up.  It should ask you for the password.  Type in the new password and your should reconnect.
    Let me know if you have any further problems.

  • CAPS lock status in Linux

    Hi,
    I'm trying to get the CAPS lock status in Java to display the same to the user in my application. I've used the code
    Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK) .
    This works properly in Windows but throws UnsupportedOperationException in Linux. Can you help me to get the CAPS lock state in Linux.
    Regards
    Ruban

    Moderator action: Moved from Generics
    db

  • Regarding user provision with disable and locked status

    Hi All,
    what i need to do if i want to provision a user with disabled and locked status for first time.
    i am using OIM 11g
    Can any one please help me out in this.
    Regards
    Prasad

    You can provision a user into EBS.
    Call "*Disable User*" task on SUCCESS of Create User task in EBS process defn.
    Let me know if you see any challenges in this approach.
    If target application supports Lock Status then you can add a task and attach adapter to lock that account and call in the same way.

  • Retrieving Historic Lock Statuses

    Good Afternoon,
    One of our tables on the servers is .dbotblfinreplock and houses all the present & historic data re the work status of entities. In BPC for Excel you can use the EVLCK command to return the latest entry (lock status). My question, is there any command or way in which you can retrieve the historic statuses for a certain time, entity or category from the table in BPC for Excel? 
    Many Thanks in Advance

    Go to BPC-WEB,
    select in the actionpane 'launch BPC System Reports',
    select in the actionpane 'Work Status Report',
    This report should give you a list of all changes made in the workstatus tables.
    Alwin

  • AD Locked status reconciliation

    Is there a way to reconcile AD account locked status?
    thanks

    Hi,
    AD locked status can be brought to OIM using either AD trusted reconciliation or AD Target reconciliation.
    1. AD trusted recon -> brings locked status as TimeStamp, here you need some customization to parse the value to "1"
    2. In target Recon ->works fine for both locked and unlocked status( Here OOTB connector parses the timestamp value to "1" for locked status).
    Regards,
    Raghav.

  • Checking Lock Status of Object before passing it to FM RH_RELATION_MAINTAIN

    hi all,
              While passing the object id to FM  RH_RELATION_MAINTAIN  if object id is locked i.e say open in a standard tcode  then,this FM terminates.
              is there any way to detect whether this Object is Locked or not before passing it to FM ??? this way i cud give the status msg that the " given object is locked" without termination the program.

    >
    Ajay84 wrote:
    > hi all,
    >           While passing the object id to FM  RH_RELATION_MAINTAIN  if object id is locked i.e say open in a standard tcode  then,this FM terminates.
    >
    >           is there any way to detect whether this Object is Locked or not before passing it to FM ??? this way i cud give the status msg that the " given object is locked" without termination the program.
    Please check the FM 'HR_ENQUEUE_OBJECT', it is well documented.
    Regards
    Rajesh.

Maybe you are looking for

  • Material of different division allowed in the Sales order???/

    Hi here is the issue, A Material has been extended for two sales area but has a single division 20 as in standard.But when I create a order with a sales area with a different divison 10 ,the system surprisingly allows the material to be added to that

  • I bought Adobe Acrobat Pro 9 and I need to reinstall it. Please could you provide me with a link. (I

    I bought Adobe Acrobat Pro 9 (in 2011)and I need to reinstall it. Please could you provide me with a link for download for MAC OSX. (I have the serial number in my adobe account.)

  • Clob Handling In WebLogic 6.0 with SP1

    In Weblogic V5.10sp8 I have a block of code that looks up a very large clob and appends some text to the end of it and writes the new larger clob back to the same row same column. part of the code looks like this. char[] buffer = this.getBuffer(): ja

  • Transporting

    hi, wat is the process for transporting bw objects from development server to quality testing server. Can anybody giv me step by step procedure? thanks indu

  • Error when using srvctl

    DB Version: 10.2.0.4 (2 node RAC) Platform : Solaris 5.10 I was trying to shutdown an instance iin one of the nodes using srvctl. I got the following error $ srvctl stop instance -d spike -i spike2 -o immediate PRKO-2007 : Invalid instance name: spik