Logical locking not working

Our system consists of ABAP and java stack. There are two server processes running on the system.  We have a web application that is deployed.  We want to lock an object in the init method of the servlet. We are using  logicallocking to do that.
We want it so that when the application is deploying and running the init method on one server it obtains the lock. The other server process should wait till it obtains the lock.
This is the code I have
try {
                    lockOmscb(); 
                    _omscb.start();
                } catch (LockException e1) {
                    _logger.logInfoExt("Omscb instance already running, cannot access lock on object.");
                    // TODO Auto-generated catch block
                    e1.printStackTrace();
private void lockOmscb() throws NamingException, LockException, TechnicalLockException, IllegalArgumentException {
        Context initialContext = new InitialContext();
        LogicalLockingFactory factory = (LogicalLockingFactory) initialContext.lookup(LogicalLockingFactory.JNDI_NAME);
        _logger.logInfoExt("Got intial context lookup");
        _lock = factory.createLogicalLocking("NWCPM", "NWCPM workspace" );
        _logger.logInfoExt("created logical locking");
        lock.lock(LogicalLocking.LIFETIMEUSERSESSION, "NWCPM/OMSCB", cfg.toString(), LogicalLocking. MODEEXCLUSIVE_NONCUMULATIVE);
        _logger.logInfoExt("Got lock");
In the locking adapter I can see two locks being obtained at the same time. They are not getting it one after the other.
If I try to obtain the lock twice in the same method then it is throwing the lockException.
But this is not happening when the web application is being  initialized in the two server processes.
Logicallocking is supposed to be access the lock between applications.
Is there a way I can acheive this ? If so how?
Can you please let me know.
thanks
Padmaja

Hi Padmaja,
the argument you are trying to lock is _cfg. As you do not deliver the code that defines this I cannot say what it contains, but it is easily predictable that this value is different in two different servers.
Make it a hard coded string with a value like "Humble" and then you are sure all instances will try to save exactly same value, which will make it work as expected.
Regards,
Benny

Similar Messages

  • Ipad2 - cover lock not working - can anybody help?

    Ipad2 - cover lock not working - can anybody help?

    Settings -> General -> iPad cover lock/unlock -> On
    Try toggling this setting on then off. Are you sure the case you have has the magnets that are compatible with this feature. Also with the setting turned on you could try a Reset, hold down the Home and Sleep buttons at the same time for 10 seconds, the iPad will then perform a reset.

  • Ask for password after screen lock not working!?

    Ask for password after screen lock not working? It used to work before mavericks, each time my computer display sleep I'm asked for the password immediately. Now it never asks for it?

    From 2008 MacRumors discussion:
    SOLUTION: Browse to Home>Library>Preferences and drag com.apple.systempreferences.plist to the desktop.
    Caused by a corrupt user preferences file. On restart, you may find user settings have defaulted. Set up as desired.
    Worked for me.

  • New I pad cover lock not working

    I bought the new I pad with Targus leather cover. Till yesterday I didn't notice I pad cover lock feature.but my friend tried I pad cover lock option in settings.my I pad was able to lock without smart cover till today. Suddenly it's not working anymore.i have set the cover lock option in settings on.what happened? Is it necessary to have smart cover to use this feature?

    Lol now it works.........actually the cover that I have is 360 degree rotating cover.that screen cover flap was supposed to be on left ,but I kept it on right.the I pad magnet was not lining up with the covers magnet. Breaking news: Targus versavu cover is compatible with the I pads cover lock feature.

  • Auto Lock not working when connected to Macbook

    Ive had my ipod for about a week and I thought auto-lock was working even when the ipod is connected to my computer.
    But I just realized that the auto-lock is not working when it is connected to the computer.
    Is this normal?
    Also when I set the brightness to the lowest setting, the screen slightly flickers intermittently.
    Is this normal too?
    Thanks

    Do you have more than one IDM Server running in your environment? When you are debugging a WF on server A and the scheduler decides (usually after an approval step) to continue running the WF on server B, your debugger connecting to server A wouldnt stop at the breakpoint.
    Can you make the debugger stop on e.g. the "start" or very first Activity in your wf? Right after launching it from the form.

  • Satellite P500 (PSPE8A-01R002) - Number pad and num lock not working

    After upgrading to Windows 7 the number pad and num lock on my P500 PSPE8A-01R002 is not working.
    Any help will be appreciated.

    Since keys worked in vista then its reasonable to assume there is something in the "software". I doubt that windows can make changes to the bios though there is Toshiba HWsetup but that does't look to do anything relevant.
    I don't know what conclusions could be drawn from the results of trying an external keyboard.
    How about trying various boot sequences such as direct to the command prompt and direct to safe mode to pin down it the problem is specific to your W7 installation? - why not try making a bootable cd (i'd have to google to find out how but you should be able to try windows 98 or even DOS - there was also a run from cd/dvd version of Linux and there's also the new Google os to consider).
    Within W7 the only things that affect the keyboard would be settings in control panel > ease of access where the keypad can be set up as a mouse or keys remapped so num lock is "something else" and, clutching at straws, I presume keyboard language settings - are there any languages that require use of a numeric key pad to give a full character set (keyboard set to foreign language and Windows set to "English" so that the foreign character set isn't displayed?

  • Why do the trusted face in smart lock not working in lollipop 5.0.2?

    Hello everyone. I tried to lock my phone with face lock. but failed. Here is what I did.First I open settings  then  security   then smart lock   then  trusted face  . After that I set it up. All done , then I improve the face matching. SO the trusted face feature is turned ON . But when I open my phone it doesn't open it with face but with my previous Pattern. Why is this happening? Am I missing something? On kit kat this feature was working well, but with lollipop it doesn't. Why?Anybody can help and thanks.

    Hello Quester. Thanks for your respond. I've checked Trust agents.  And smart Lock is already checked. The face unlock feature is still not working.Any other suggestions please.Thanks.

  • Device lock not working when put to sleep

    I set up device lock with pw, but the only way it will work is when the screen is lock after time expiry.  It does not work if I put device to sleep within the time set.  For example, if i set "Lock Device After" to 5 mins, and I press sleep button within 5 mins, I could still wake device up by swiping without having to enter any pw.
    I think this cannot be part of the design, right?  This is a clear security loop hole or bug.  Please help.

    Hey chanhkr,
    Welcome to the BlackBerry Support Community Forums.
    Thanks for the question.
    I was not able to reproduce the issue, what version of BlackBerry 10 are you currently running?  Go into Settings>About to find this information.
    I look forward to your reply.
    Cheers.
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • Screensaver lock not working

    Ever since upgrading to 10.4.7 (from 10.4.6), the screensaver lock does not work.
    The "Require password to wake this computer from sleep or screen saver" checkbox is checked, and I have changed my admin password quite a few times to try and "shake" this option loose.
    I have a hot corner to start my screen saver, but when I disable the screen saver (by moving the mouse or tapping a key on the keyboard) I never get challenged.
    Since there is CtlAltDel lock feature in OS X, like there is in Windows, the screen saver lock is all I have, and I don't want to resort to third-party solutions.

    See my thread http://discussions.apple.com/message.jspa?messageID=2721327#2721327
    I finally had to reset my SMU in addition to command-option-P-R three times at system restart.

  • Apple full size USB keyboard - ESC, tilde, tab, & caps lock not working

    I was logging into my email account yesterday & went to tab from the username to password fields & the tab key is all of a sudden not working. It was working the day before, but not now. Upon further checking, the ESC, tilde, & caps lock buttons don't work either. So ESC, tilde, tab, & caps lock are all not working now. (???)
    I have the white w/ clear base full size USB wired keyboard. When I unplug & plug back in the USB cord or shut down & restart, the light on the caps lock key does come on as it should.
    I have tried many of the various fixes (Universal Access, etc) that I've found online, but to no avail.
    No spills or damage & I can't imagine that they all 4 would work one day & then be too dirty to just not work the next.
    Any ideas to resolve???

    All on the left side of the keyboard - might be a circuit board issue. But try deep cleaning that side of the keyboard. I have used a vacuum cleaner with a sock over the nozzle. (Keys do sometimes come loose - the sock keeps them from being sucked into the vacuum.)

  • Copy email logic is not working

    Hi,
    I am using the below code but this is not working for copy emails.
    kindly help me in this regard.
    package com.hbs.component;
    import java.io.Serializable;
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    public class MailUtility implements Serializable
    public static void sendMail(String strMessage, String strSubject, String strFrom)
              String to = "[email protected]";
              // SUBSTITUTE YOUR ISP'S MAIL SERVER HERE!!!
              String host = "smtp.XXXXXXX.com";
              // Create properties, get Session
              Properties props = new Properties();
              props.put("mail.transport.protocol","smtp");
              props.put("mail.smtp.host", host);
              props.put("mail.from",strFrom);
         props.put("mail.cc",strFrom);
              Session session = Session.getInstance(props);
              try
              // Instantiatee a message
              Message msg = new MimeMessage(session);
              //Set message attributes
              msg.setFrom();
              InternetAddress[] address = {new InternetAddress(to)};
              InternetAddress[] address1 = {new InternetAddress(strFrom)};
              msg.setRecipients(Message.RecipientType.TO, address);
            msg.setRecipients(Message.RecipientType.CC, InternetAddress.parse(strFrom, false));
              msg.setSubject(strSubject);
              msg.setSentDate(new Date());
              // Set message content
              MimeBodyPart mbp = new MimeBodyPart();
              mbp.setText(strMessage);
              Multipart mp = new MimeMultipart();
              mp.addBodyPart(mbp);
              msg.setContent(mp);
              //Send the message
              Transport.send(msg);
              catch (MessagingException mex) {
                   System.out.print(mex.getMessage());

    Resolved

  • Logical AND not working in the forum search box

    Logical AND of search terms does not seem to be working in the MSDN forum search box. Example: I go to the Project Customization and Program forum and type the word
    subproject
    in the search box. I get a lot of hits. So now I try to reduce the number of hits by typing
    subproject AND read
    Surprisingly, I now get MORE hits than before.   The same thing happens if I enter
    subproject & read
    Do the MSDN forums not support the standard logical AND combinations of search terms?  If they do support these combinations, what is the syntax?
    Jim
    ...Jim Black

    Cheers, you're welcome.
    There's a thread going in the Suggestions forum with plenty more requests for updates to the search tool. You may want to add your voice there too:
    http://social.technet.microsoft.com/Forums/en-US/9cf8ad4b-5111-4f84-9809-99cd8f1b7152/make-the-forum-search-tool-useful?forum=suggest
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Yoga 2 Pro - Keyboard lock not working in stand mode

    Where can I find the Yoga Utilities suite (Yoga Transitions, Chef, etc.). I just isntalled fresh 8.1 Enterprise and turns out the D:\ partition didn't have the Yoga Utilities available, same on the support site (checked Yoga 13 as well). Pretty dumb, but I can't use the stand since the keyboard doesn't lock

    Hi i have this problem did you find a solution other than lenovo transition because i downloaded that and it still doesnt work....
    can you please help me if you have any ideas.
    my keyboard does not lock or disable in stand mode and sometimes it stops working in laptop mode...
    any help would be greaatly appreciated

  • Ajax logic is not working correctly

    Hello,
    I am very beginner in JavaScript and don't know how to troubleshoot this.
    The last logic where it says if(response == 0), else....doesn't work. whatever the result of my query is it will return as else.
    I found this code from the page below:
    http://woork.blogspot.com/2007/10/login-using-ajax-and-coldfusion.html
    What I need to do here is if response is not equal to 0 then send user to page window.location='pagexyz.cfm'; and else go to a different page.
    Thanks in advanced
    <script type="text/javascript" language="JavaScript">
       <cfoutput>
    /* XMLHTTPRequest Enable */
    function createObject() {
    var request_type;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
    request_type = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
    request_type = new XMLHttpRequest();
    return request_type;
    var http = createObject();
    /* LOGIN */
    /* Required: var nocache is a random number to add to request. This value solve an Internet Explorer cache issue */
    var nocache = 0;
    function login() {
    // Optional: Show a waiting message in the layer with ID ajax_response
    document.getElementById('login_response').innerHTML = "Loading..."
    // Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
    var email = encodeURI(document.getElementById('emailLogin').value);
    var psw = encodeURI(document.getElementById('pswLogin').value);
    // Set te random number to add to URL request
    nocache = Math.random();
    // Pass the login variables like URL variable
    http.open('get', 'includes/loginquery.cfm?email='+email+'&psw='+psw+'&nocache = '+nocache);
    http.onreadystatechange = loginReply;
    http.send(null);
    function loginReply() {
    if(http.readyState == 4){
    var response = http.responseText;
    if(response == 0){
    // if login failsa
    document.getElementById('login_response').innerHTML = 'Login failed! Verify user and password';
    // else if login is ok show a message: "Welcome + the user name".
    } else {
    document.getElementById('login_response').innerHTML = response;
    window.location='#eqSiteRoot#member/index.cfm';
      </cfoutput>

    I installed firefox with the add-on you recommended but unfortunetly I am not good with debuging javascript so it didn't help me. Below I attached my current code (I also tried not including any dynamic variables but didn't help).
    <!-- Include AJAX Framework -->
    <script type="text/javascript" language="JavaScript">
       <cfoutput>
    /* XMLHTTPRequest Enable */
    function createObject() {
    var request_type;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
    request_type = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
    request_type = new XMLHttpRequest();
    return request_type;
    var http = createObject();
    /* LOGIN */
    /* Required: var nocache is a random number to add to request. This value solve an Internet Explorer cache issue */
    var nocache = 0;
    function login() {
    // Optional: Show a waiting message in the layer with ID ajax_response
    document.getElementById('login_response').innerHTML = "Loading..."
    // Required: verify that all fileds is not empty. Use encodeURI() to solve some issues about character encoding.
    var email = encodeURI(document.getElementById('emailLogin').value);
    var psw = encodeURI(document.getElementById('pswLogin').value);
    // Set te random number to add to URL request
    nocache = Math.random();
    // Pass the login variables like URL variable
    http.open('get', '#eqSiteRoot#includes/loginquery.cfm?email='+email+'&psw='+psw+'&nocache = '+nocache);
    http.onreadystatechange = loginReply;
    http.send(null);
    function loginReply() {
    if(http.readyState == 4){
    var response = http.responseText;
    if(response == 0){
    // if login failsa
    document.getElementById('login_response').innerHTML = 'Login failed! Verify user and password';
    // else if login is ok show a message: "Welcome + the user name".
    } else {
    document.getElementById('login_response').innerHTML = response;
    window.location='#eqSiteRoot#member/index.cfm';
      </cfoutput>
    </script>
    <!-- Form: the action="javascript:login()"call the javascript function "login" into ajax_framework.js -->
    <form action="javascript:login()" method="post">
    <table width="100%" border="0" cellspacing="0" cellpadding="3">
    <tr>
      <td align="right"> </td>
      <td width="150" align="right">Forgot your password?</td>
      <td width="55" align="right"> </td>
      <td width="15" align="right"> </td>
    </tr>
    <tr>
    <!---onFocus="if(this.value=='Email')this.value='';" value="Email"--->
    <!--- onFocus="if(this.value=='Password')this.value='';" value="Password" --->
      <td align="right"><input type="text" name="emailLogin" id="emailLogin" value=""/></td>
      <td align="right"><input type="password" name="pswLogin" id="pswLogin" value=""/></td>
      <td align="right"><input type="submit" name="Submit" value="Login" /></td>
      <td align="right"> </td>
    </tr>
    <tr>
      <td colspan="2" align="right"><!-- Show Message for AJAX response -->
    <div id="login_response"></div>
    </td>
      <td align="right"> </td>
      <td align="right"> </td>
    </tr>
    </table>
    </form>

  • Logic Pro not working right:  HELP!!!!!!!

    Logic Pro is no longer sending audio signals to the mixer. The Output display is no longer available in the Mixer. Do I need to do a major reinstall of Logic from scratch?
    This was not my initial problem, but developed as I tried to "fix" a different one. The following is a history of what I did with ensuing problems noted.
    1) My external keyboard (Roland U-20) was no longer available in the arrange options when I created a track. (initial problem)
    2) I went into the Environment and discovered it was no longer in that window.
    3) I went to Audio Midi Setup and noticed it was there.
    4. I imported an older environment set up. It looked OK so I then also imported this into my Empty Project Template, saved it, and went back to the initial project.
    5. When I tried to play a sound from the Roland, it was not coming out the right speaker, although the correct "instrument" was there. The sound on the left speaker was very distorted.
    6. I went into the UNDO section and went back. The arrange window looked like a mess with many crossed out outputs in the tracks, instead of the names of the original tracks. The environment window no longer had the Roland.
    7. When opening my original piece, I then noticed that the mouse editing control buttons on the top right were altered -- instead of 3 buttons, there are now only 2. I reopened the empty Project and found the same.
    8. I deleted my empty Project template.
    9. In the original project, I noticed that the mixer's output buttons are no longer available. No sound at all coming out of Logic to my Firewire.
    10. I opened a different template. Same thing.
    11. I noticed that Logic saw me touching the keyboard, and then I tried to see if it would record MIDI data. Message: Record drive/partition "MPC12" not found.
    10. Tested both i-Tunes and Garageband which both give me correct audio.
    11. I went back into Time Machine and replaced Logic Pro with yesterday's application.
    12. Problem persists.
    13. I deleted any logic plist. I could find. Reopened Logic. The computer asked me to reregister. After doing so, the software still had not changed.
    14. Rebooted the computer. No change.
    15. Totally frustrated. This message sent.
    Thanks for any help.

    Not at all. Everything has been working fine for months until I did this thing today where I was trying to get my arrange window sequencing to connect with the sounds in my U-20.
    It seems now that my digital audio track is working again but the output and master are not in the Mixer windows. I can not hear the digital instruments that come with Logic when playing through the sequencer. However, I am noting that if I create a separate window with the mixer, and I click on one of the virtual instruments, then touch the keyboard, a sound does come up.
    So:
    1) How do I get the software to create both an output and a master control?
    2) How do I get the software to have three mouse control buttons for the top left of all the editing windows (arrange, score, piano roll, sample editor)?

Maybe you are looking for