Thread synch

Hi all!
I wrote an application using RMI. A client calls an RMI method of a server. The method checks some conditions and if it is necessary I use wait() to wait the current thread. A different client calls a different RMI method in order to notify the waiting clients.
Is this a "good" solution by using wait() and notify() on the RMI server. Does this work under all conditions?
Best regards
Gerhard

Why not use a callback?
Client makes RMI call to server, this is an async, one way message.
Upon receiving the request from the client the server creates an object to handle the request result, upon completion the helper object makes a callback to the client and passes the result back. Upon receiving the result the client then notifies itself that the result has returned.
This way you can determine if and when the thread should time out. You don't hold a socket open, and the time out doesn't have to be fatal.
Whats needed:
Server Interface (can be the same for client and server)
A Server IMPL
Client Interface
A Client IMPL
A Message object
A Helper object
Let me know if this doesn't make sense.

Similar Messages

  • CVI UI Panel updating from TestStand

    I'm experimenting with using a CVI graph strip chart in TestStand(4.0).   I'm new to threading in TestStand. I would like to do two simple things at first:
    1.Load the CVI UI graph panel
    2. Update the graph attributes.
    Attached is a solution that uses a separate thread for running the CVI GUI and the main thread for updating the title,axis names and data . For some reason, I seem have to have a generic wait to allow the separate thread to update the seqcontext (FileGlobals being updated in TS). If I don't wait, the FileGlobals have not been updated yet, so the UpdateGraph function fails.
    Is there anything besides a blanket wait statement that I can use to know when the separate thread has updated the FileGlobals so that I can continue with my UpdateGraph function? I thought about a loop/timeout function, but I thought maybe there was some other thread/synch mechanism that I missed.
    Attachments:
    CVIGraph.zip ‏1191 KB
    GraphTest.seq ‏7 KB

    Hey jsmalley,
    A Wait step is definitely a good and simple solution to your challenge, however, you could also try taking a look at some of the other TestStand Synchronization steps, which are often used when multithreading.  Documentation on these steps can be found on your machine by browsing to Start»Programs»National Instruments»TestStand»Online Help»Manuals»TestStand Reference Manual.  The documentation I'm referring to can be found in Appendix B of this document.
    Furthermore, there should be some synchronization examples found on your machine at <TestStand>\Examples\Synchronization.
    I hope this helps!
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • Trying to wrap my head around synchronized, wait, notify

    Hi There,
    I've been researching on how to make my midlet repeat cpu-intensive tasks for long periods of time. I found that if I put the big jobs in separate threads, that works fine. However, I'm at a point now where I need my "worker threads" to be able to do a big job, check to see if they need to keep going, then repeat. It seems that synchronized, wait, and notify are the way to do that. But I'm new to this concept.
    Apparently you can only use synchronized to create a spinlock between objects. So I guess that I need to define a new class, that starts its own thread, and has a method inside that thread that is synchronized?
    If that is true, then can my midlet call notify() on that? How does my midlet become a monitor?
    What does notify really do? Does it make the thread synch up state with the midlet globals? How can I get updated information to the thread?
    These things will help me get started.
    Thanks,
    theotherldso

    I answered my own question. I solved the problem by creating my own runnable class with some methods to control the thread. It works great, it's kind of like having my own main() that is controlled from my midlet.

  • Yet Another "Can't Synch My iPod With Outlook" Thread

    For some time now I've been trying to get my Outlook 2007 to synch calendars with my iPod, an 8GB Nano. Contacts are synching but not calendars. I see many threads here from people with similar or related problems, but no real solutions and no comments from Apple.
    I am rigorously following the instructions at http://support.apple.com/kb/HT1418?viewlocale=en_US and the troubleshooting instructions at http://support.apple.com/kb/TS2051?viewlocale=en_US. No dice.
    It's interesting that the instructions insist that Outlook will raise the dialog that asks you to confirm iTunes's access to Outlook for either contacts or calendars, but I've never seen it.
    Sometimes during a synch I'll see iTunes spend a lot of time saying that it's synching calendars, but in the end there's nothing there on the iPod. At other times it will tell me that it can't synch calendars and that I should quit everything, log out of Windows and log back in again. This never makes a difference.

    Answered.....thanks

  • I have not deleted ANY texts since I got my phone and Ihave not synched.  I just can't scroll back in a thread to older texts.  How can I get back to read those?

    I have not deleted ANY texts since i got my phone 10 weeks ago.   Nor have I syched.  How can I go back to earlier texts in a thread to see them again?

    I've found that the easiest way to view old texts is by archiving them to my computer using a program such as PhoneView (Mac) or TouchCopy (Mac or PC). I generally save important threads to a .pdf for future reference.

  • I have an iPhone 5 and got my daughter an iPod Touch. I set it up using my apple ID so she could use my iTunes. Now we are having contacts synch issues and she is receiving some text message threads that I exchange with other iPhone users.

    What is the best practice here? I want her to have her own contacts, etc., but to be able to download music and aps from the store using my account, and to synch her music with my iTunes. Any suggestions? Thanks!

    - On her iPod go to Settings>iCloud  and turn off contacts and other things if you want.
    - On the iPod go to Settings>Messages>Send and Receive and add here own email address and delete the Apple ID email address. Also uncheck yur phone number if it appears. The only way to delete the phone number is to use an Apple ID not associated with the phone. You do that in Settings>Messages>Apple ID
    You can go to Settings>FaceTime>Yu can be reached at and add here email and delete the Apple ID.

  • Playlist selected for synching no longer exists - can't synch ipod

    I just installed itune yesterday. Not sure why this error has popped up, but after getting all my music into the itunes folder, there is no longer anything on the ipod itslef, adn I receive this error message.
    How can I reset the ipod to synch without the playlist it is looking for? As far as I know, I don't have any playlists other than the pretitled ones. I was unable to locate anythinbg in the settings to find out anything about synched playlists. thanks

    This may resolve your problem.
    http://discussions.apple.com/thread.jspa?messageID=607312&#607312

  • Hot synch between my m105 and Windows PC

    Until recently I had no problems synching my PC and m105 handheld. Then I had a big crash on the PC, since when I get the message "The connection between your handheld and the desktop could not be established. Please check your setup and try again".
    I have no idea how to "check my setup", can somebody please enlighten me?
    Post relates to: Palm m105

    Hi, and welcome to the Palm Support Community.
    If you have not already done so, I suggest you go through the Hotsync Troubleshooting support article from Palm, linked below. It covers the causes of, and the and solutions to the vast majority of Hotsync issues.
    http://tinyurl.com/g5jkh
    You might need to do a clean uninstall and reinstall of the Palm Desktop.  Check the "stickied" threads at the top of this board for directions.
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • Hot Synch Palm VIIx - Macintosh Unsuccessful

    I have spent a  considerable amount of time looking through the various threads looking to see if I could get the HotSynch of my Palm Pilot VIIx to work on my Mac Powerbook G4 and have thus far been unsuccessful.
    I have a PowerBook G4 Mac OS X version 10.4.11
    I recently installed the Palm software from the Palm website for Mac version 4.2.1
    Palm Pilot VIIx version 3.5 with the Serial Cable
    Keyspan USA-19HS which others on the forum have said works. I installed the drivers, I think - correctly as I am a novice at all of this computer stuff.
    How do I know if I have revision A or D installed as I do not recall which one I downloaded?  As it looks like revision A supports the VII series, and from what I can see version D does not.
    When I hit the HotSynch on the palm it opens the hotsynch progress window with a status of Establishing connection.  I do not get any beeps. The green led on the usb to serial adapter blinks 2 times then goes solid green.  After a period of time the palm will beep and bring up a message box saying that the Connection between your handheld computer and the desktop could not be established. Please check your setup and try again.  I have checked numerous items as outlined in many of the other posts to no avail. In the HotSync software set up window the button is clicked on for HotSynch enabled.  In the status window it says: HotSynch software is enabled. To disable the HotSynch software, click the "disabled" radio button above. Listening on usa19h3b1p1.-port.
    I know that the cable and the palm will hotsynch as I have been using this serial cable with a different usb to serial adapter to successfully synch to my PC.
    Right now I can not remember all of the other things that I have tried, but many of them were on the threads for the Palm V.
    Thanks in advance for your kind suggestions and assistance.
    Sharron
    Post relates to: Palm VIIx

    I am experiencing almost the EXACT same problems with my Mac desk top unit. Can anyone help us resolve this issue??
    Thank you.
    Post relates to: Palm IIIx

  • Hot Synch Tungsten E2 to VIsta

    I am trying to synch my Tungsten E2 to a Sony laptop running Vista.  I have a bluetooth adapter installed.  The bluetooth program is asking for a pairing code.  Any ideas?
    Post relates to: Tungsten E2

    Dread wrote:
    Twice my tungsten asked for a pass code or something like that but I have no way to input that data into the PDA. I tried several ways but no luck.
    On your device, tap the line where you wish the numbers to be entered, then either write them via Graffitti, or use the soft keyboard to enter the numbers!
    Once you tap the line, a cursor should appear...  Have you tried starting the pairing from your E2 instead of the computer?
    EDIT:  Apparently Dread has figured out how to enter the numbers (as revealed in a duplicate thread in the BT/Wifi board...)
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • I have itunes set up on a PC with all my music, apps, etc. I want to stop using PC and move my iTunes and files to a Mac I bought and synch my iPhone with the Mac. Can I just synch iPhone with Mac iTunes and will it copy all my stuff onto Mac, or will I h

    I have itunes set up on a PC with all my music, apps, etc. I want to stop using PC and move my iTunes and files to a Mac I bought and synch my iPhone with the Mac. Can I just synch iPhone with Mac iTunes and will it copy all my stuff onto Mac, or will I have to copy files from PC onto Mac?

    Here are some of the links to get you started.
    https://discussions.apple.com/thread/3727530?start=0&tstart=0
    http://support.apple.com/kb/HT4527
    http://www.macworld.com/article/1146958/move_itunes_windows_mac.html

  • How do I use Premiere Elements 9 to synch and mix 2 video feeds?

    I am trying to put together a wrestling television show using Premiere Elements 9. We use 2 different cameras, a stationary hard camera and a moving ring camera. In the past I have used an Avio system where I manually synched the 2 feeds and then I was able to drag and drop the ring camera feed on to the stationary hard camera.  How do I do this function using this software? Thanks!

    Welcome to the forum.
    Unfortunately, PrE does not have direct multi-cam functionality. PrPro does, allowing one to sync up to 4 cameras, and if you Nest Multi-camera Sequences, you can do more, though not quite so easily as with four.
    With PrE, it's probably easiest to place your main camera Clip(s) on Video Track 1, and edit that as needed. Then, bring in the second camera's Clip(s) onto Video Track 2, and reduce the Fixed Effect>Opacity to ~ 40 - 50%, so that you can "see through" them. Then, adjust those, Trimming, as desired, leaving gaps between them. When done, change the Effect>Opacity back to 100%. Transitions can then be applied, if desired, to the Head & Tail of each of those Video Track 2 Clips.
    So long as the footage from the two cameras is the same Frame Size, and also matches the Project's Preset Frame Size, nothing more needs to be done, as the footage on Video Track 2 will just visually replace any Frames on Video Track 1.
    If you do much multi-cam work, PrPro might be a great investment, as it's Multi-Camera feature will make life so very, very easy.
    Good luck,
    Hunt
    PS - it seems that a few months ago, there was another multi-cam question here, and that Steve Grisetti had a slightly different workflow, than the one that I described. I will post a link to that thread, if I can find it.

  • Mac Pro 2.66 Logic , still synch error ? is this possible ?

    well , here goes my suprise . got recently Mac Pro 2.66 , one of the fastest machines around and i still get "could not synchronise data in time " error when CPU Usage of OS X is only on 12% !!! with not much happening in a Song ? is this still draging every body else down ? i used to have a lot of synch errors when i was on Pentium 4 Logic 5.5
    now i switched to Mac hoping to have better workflow and still having Logic stoping because of that annoying synch error. what about you out there , quad owners !
    p.s. i have audio buffer on set 125 . should not be a problem
    with quad 2.66 . am i wrong ?
    B
    Mac Pro 2.66   Mac OS X (10.4.8)  
    Mac Pro 2.66   Mac OS X (10.4.8)  
    Mac Pro 2.66   Mac OS X (10.4.8)  
    Mac Pro 2.66   Mac OS X (10.4.8)  
    Mac Pro 2.66   Mac OS X (10.4.8)  

    i think logic is fine Instrument it needs to be improved just as any other major DAW's . synch errors like , coundn't process data in time etc, is 20th century . there is enough tech knowelege nowedays to sort this legacy of the past out . what i'm afraid to go into is to start twicking OS till i would go Grey and not having any improvement as i did when i was usin PC & Windos . Melissa .., i have those error poping up without audio files in a song , only logic Synths and Stylus can cause those pop up . i don't want to dramatize it i have qute bearable interaptions but still those kind of Audio or whatever related problems they might be should be sorted out once and for all by Apple . also i constructed audoload on a new system i was using Cubase before i moved to Mac .
    for Chris', attention i've got quite qood Audio interface hooked up : Yamaha i88x Mlan interface .
    i'm hopeing to hear more feedback on this thread though.
    B
    Mac Pro 2.66   Mac OS X (10.4.8)  

  • File not Found error when synching Ipod

    I have a fairly new Ipod and synced successfully for months, but now iTunes says it cant synch because of a "File not Found error" (no error number or other clues). I'm running the latest iTines and Ipod software, and I've reset USB drivers but still no luck. I cant reset the iPod itself becase I then got a "1418 error", which is why I then reset USB. I'm stuck, has anyone seen this before?
    The Ipod itself plays fine and Itunes recgnises it OK, albeit very slowly, even thought I'm using USB 2.
    One other piece of info; when this first happened, the sync must have first deleted the songs I no longer wanted, prior to unsuccesfully adding new ones. Those old songs show up on the iPod but are skipped when I try to play them.

    Its on the same thread as this one ("connecting iPod nano (second Generation ) to Windows"). Scroll through the authors, you will find it.

  • Messages from iPad not Synching with MacBook Pro when Powered Off

    I have the new MacBook Pro (2 GHz, i7, purchased Feb 2014), 15" Retina running OSX 10.9.4.  I also had an iPad3 (Retina) but just upgraded to the new iPad Air 2 weeks ago.  I do not have an iPhone, but that's next.  I have used the same iCloud account for all devices.
    The issue:
    Messages (or message conversations) that I have when using my iPad Air are not synching with the MacBook under certain conditions.
    1) If my MacBook is on, there is no issue. Messages between devices (whether being composed on the iPad or MacBook) synch instantly between devices.
    2) If my MacBook is sleeping, most (but I do not think all) messages sent from my iPad will synch with the MacBook when it wakes up from sleep.
    3) If my MacBook was powered off and I had message conversations using my iPad while the MacBook was off, these messages do not synch with my MacBook after I turn it back on.  BUT, this depends:
         a) if I power on the MacBook shortly after (5-10 min) I had the message conversation on the iPad, sometimes these messages on the iPad will synch with my MacBook after I power it on.
         b) If my MacBook was powered off for several hours after I had a message conversation on my iPad, and then I power on the MacBook, these conversations are not synching on the MacBook at all.
         i.e Assume MacBook is powered off.  I have a message conversation on my iPad at 4:30 PM.  If I power on my MacBook at 4:35 PM, the message from my iPad synchs with the MacBook.  However, if I power on my MacBook say at 10 PM or the next day, then the message conversation I had on the iPad DOES NOT synch with my MacBook.
    Confused?  So am I.  To complicate matters, I did not have these issues while I had my old iPad 3.  I only starting noticing it when I bought the new iPad Air two weeks ago.  I do not know if this is related.
    Another issue:  SOME message conversations on my MacBook and iPad air now appear to get out of chronological order.  In fact, on my iPad air, I received a message at 10 AM (message A) and then had several other messages with this person throughout the day on my iPad (at 11 AM, and then 2 PM).  Later that evening around 10 PM, the original message (message A) was received again as a new message on my iPad (i.e. received a new message notification).  Now, message A appears out of order (it shows the timestamp of 10 AM, but it displays after the messages that came at 11 AM and 2 PM).  Since my MacBook was on, these messages synched with my MacBook, but were (and remain) in the proper chronological order.
    Other iCloud apps (calendar, mail, FaceTime notifications, notes, keychain, Photo-stream etc. seem to be synching fine between devices).  One last observation, when I bought the iPad air and restored it from the backup I made from the old iPad 3, everything restored fine from the backup except for Calendar.  For whatever reason, some old calendar entries did not restore on the new iPad.
    I have run a myriad of tests (sending messages to myself from both my new and old iPad (even created a new apple ID from the old iPad)) with my MacBook sleeping or powered off for varying amounts of time in order to provide the information above.  I also reinstalled the operating system on my MacBook but this did not resolve the issue.
    If anyone has any ideas or suggestions, I would be extremely grateful. I have been in contact by phone with Apple support and have them baffled as well, but they are doing their best to help.
    Thanks,
    HankSTL
    ps.  I may post to several communities so if you see this message in several communities, I am just trying to get the best coverage.

    The same thing is happening to me.
    And it's similar to this thread:
    http://discussions.apple.com/thread.jspa?threadID=2492646&tstart=0
    Thought I'd cross-ref the two.

Maybe you are looking for

  • How do I fix the audio dropouts and clipping/clicking since upgrading to Mavericks?

    Since I upgraded to Mavericks on both my MacBook Pro (15" Mid 2010) and my Mac Pro (2 x 2.26 GHz Quad-Core Intel Xeon, Early 2009), I've been getting various audio playback issues. Randomly, I can be on a website like YouTube or Vimeo, or using softw

  • Create reports in RESTful webservice

    Hi I am using BO 4.1 SP2. I know that report can be created using restful url. Is there any url to connect the created report with a particular universe. help me in this Regards, Kavitha S

  • WS-Groups-members and WS-Memebership don't match

    Hi I need to look very closely at WS-Groups for a piece of work. After scratching my head for a little while I came to realise who assumption was the mother of. My WS-objects may show that they are a member of a group (ok that is fine) BUT another gr

  • Set attribute not working in conjuction with RequestDispachter

    Hi Team, In my application I have two servlets in the same package . In the first servlet i set a attribute in httpServletRequest Object and forward the request , response object to another servlet using the requestDispatcher.forward(). In the second

  • Link between

    i want link between schedule wise po qtys tables and lot number tables for example link between like tables eket and qals. common fields r there but i want links regarding deliveries, schedules. so plz give me tables related to above discussion. chai