Interrupting a wait question

Given the following code:
synchronized(myObject){
    try{
        myObject.wait();
    }catch(InterruptedException e){
        //  This part of the code will not be reached if the lock has not been reaquired,
        //  *even* if this thread has been interrupted
        System.out.println("Thread interrupted");
}Am I correct in thinking that the two commented lines
will never be reached even if the thread has been interrupted,
as long as the lock has not been reaquired?
Note: I experimented with this using an IDE and found that
the println statement was not reached in these experiments,
however I ask the question because I just wanted to be sure.

In your class file, I believe those lines can never be reached: if I'm not mistaken, the compiler will remove the comments when a class file is made.

Similar Messages

  • Semaphore, Mutex , wait question

    Hello,
    I have a question about Semaphore, Mutex or Wait.
    I am using an existing framework when I am calling a dialog to ask the users for some input. When the user is choosing at the dialog I would like to make my process wait. However the current framework does not do that. So I would like some advice on stopping my code. What I have looks like this (in a nutshell):
    public class MyClass
    public void onAction(Component CurrentComponent)
    System.out.println("before call!!!!!! ");
    Prompt ("ask user stuff");
    System.out.println("after call!!!!!! ");
    public void onReturn(Form form,
    java.util.Map map)
    System.out.println("onReturn!!!!!! ");
    onReturn is a call back from the prompt to the user. It returns my information
    So right now I get:
    before call!!!!!!
    after call!!!!!!
    onReturn!!!!!!
    Can someone give some advice on what I should use to wait, and a good way to implement it.
    thanks

    This is what I call a thread-modal dialogue. You want a thread to open a window, then wait for the window to close before proceeding but without actually using a JDialog which takes over the whole GUI.
    What I do is something like what follows.
    class MyDIalog extends JDialog {
          boolean done = false;
          public MyDialog() {
             super("My Title", false);  // not system modal
         public void dispose() { // override dispose method
             super.dispose();
             synchronized(this) {
                  done = true;
                  notifyAll();
         public synchronized void waitFor() {
               while(!done)
                   wait();
    // then in the thread code
         MyDialog dlg = new MyDialog();
         dlg.setVisisible(true);
         dlg.waitFor();
      //  now dialog is finished.

  • Wait--question about uninstallation

    after looking at the other posts in here, i think i know how to solve my problem, but i just have one question. i think i might already know the answer, but i just want to make sure before i do anything. if i uninstall itunes, will it delete all my music i've downloaded?

    hi just totally rad!
    if i uninstall itunes, will it delete all my music i've downloaded?
    here's a good resource on that topic:
    http://discussions.info.apple.com/webx?[email protected]@.68b8642a/0
    and here's a good resource on backing up:
    http://discussions.apple.com/click.jspa?searchID=200001&messageID=1222986
    love, b

  • SPA 941 VoiceMail message waiting question (Linksys)

    Hi Guys/Girls/Everyone
    I was wondering if anyone can help me, I have a Linksys SPA 941, and am tying to get sipgate.co.uk to provide me voicemail message waiting indication  but they have asked me the below:
    If the device sends a SUBSCRIBE or if it waits for a NOTIFY for message waiting.
    I was wondering if anyone can help answer this for me.
    Thanks

    According to the data sheet, it supports notify/subscribe for mwi.
    http://www.cisco.com/en/US/prod/collateral/voicesw/ps6788/phones/ps10033/ps10038/data_sheet_c78-533409.html
    • Voicemail waiting indicator (VMWI) via NOTIFY, SUBSCRIBE
    This means that the spa will subscribe to the service and be notified when a message is left versus the unsolicited notify method where no subscription takes place.

  • Call Waiting Question

    Hi,
    I'm using Blackberry 8520 for the frist time after being a loyal consumer of Nokia phones for almost 10 years. I was just wondering on it's call function, howcome I don't get to see that I am "on waiting" when I call someone who is engaged in another call and his Call Waiting function is enabled?
    I would like this feature or function be enabled or present to know if I'm on Waiting rather than wait for them to answer so I can hang-up just in case the aprty I'm calling is on a call...
    Is this something we can enabled or network related or what???
    Hope to find answers here...

    Hi benmarlowe6380,
    This feature is not available in BlackBerry device. I know you're using this feature in other vendors device. In the mean time I can give you a tip to identify whether the person is already in call or not. If you (A) call B and it connects/rings almost instantly then the person in a call. But if the call connects/rings with slight delay then the call is not waiting.
    I know this not a useful use to figure out call waiting but let us hope that some day it might be integrated in BBs as well. 
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • HELP! Call waiting questions.

    How can I end a call on hold without ending all calls?
    How can I hang up a current call to accept an incoming call without ending all the incoming call and the current call?
    Thanks

    You're not really 'ending' the other call, but when you press end, it disconnects the currently active call. Your phone will look like there are no active calls, but within a few seconds, your phone will ring, and it will be the caller you had on hold. They aren't calling back, they think you just switched back to them. This is how CDMA networks handle call waiting, there is no 'Swap Call' button.
    For your example, you would answer the 2nd call, tell them you'll call them back, then hang up. Your phone will then ring in a few seconds, and you'll be back talking to your 1st caller who will not know your phone just rang again.
    TreoAide

  • Activex interrupts send invalid data.

    Hello,
    Im using an external activeX DLL from which I need to receive interrupts. I used the AutomationOpen block and then polled for interrupts using "Wait On ActiveX Event" block. The interrupt does arrive, yet in it's data variant is written
    "OLE Variant
    Variant Type -> VT_ILLEGAL"
    The interrupt DATA should be of the following form:
    DATAArrived(APP_SNAP_RX* stSnapRX,typAdditionalParams* AdditionalParameters)
    What does it meens, and why can't I cast it using "Variant to DATA" block.
    Another thing,
    When using "InvokeNode" on the ActiveX DLL one of the methods is grayed out. Why? and How can i change it?
    Thanks,
    Yuval

    Hi Yuval,
    I have a couple of questions for you. Have you been successful using this DLL in another environment (other than LabVIEW)? Did you create this DLL? Is it producing an error or just incorrect data? If you want to include the DLL and a small VI, I can take a look at it.
    Travis H.
    National Instruments
    Travis H.
    LabVIEW R&D
    National Instruments

  • I give up! - waiting for items to copy

    I know a lot has been said on the subject and I've said a few things myself.  However, I've about reached my breaking point and would love it if someone could point me the way to someone at Apple to talk to.
    I'm referring to syncing and the dreaded message generally at the end of the sync, "waiting for items to copy."  Sometimes the message will end after a long time (an hour) and all will seemingly be ok, and sometimes it will continue indefinitely.  I've tried virtually every suggestion here and from apple senior support.  I have had the same problem for well over a year with 2 iPads and 2 iPhones.  I've had syncing problems seemingly forever, back to 3 years ago when I had a MacBook Pro and after with my present computer, an iMac.  However, the problem was not the same previously, i.e., waiting for items to sync., in the past year or so.   It seems to be happening with more regularity now, like almost every time I want to completely change songs on my devices.
    If I interrupt the "waiting for items to copy," I often get a huge amount of "other" indicated in the bar graph in iTunes showing the amount of audio, apps, etc.
    I have a large library, almost 2TB and 80k songs.  I don't know if that's the problem.  I also have a 124gb iPad and 2 64gb iPhones.  I rotate the songs every few weeks... I have about 15 playlists set up randomly so I can just switch playlists.  As a result, I can rule out that corrupt songs are causing the problem unless there are a lot of corrupt songs.
    Without exaggeration, I must have talked to 10 senior apple technicians.  I'm covered by Apple Care on all but one of my 3 devices.  It's always a very lengthy conversation and doing mostly the same things over and over with call backs necessary.  And the problem doesn't get resolved.
    The only way I can seem to resolve the issue is by doing a complete erase on the device and syncing my songs 1 playlist at a time.  It's an incredibly lengthy process, especially when I try to sync normally at first and that fails - there went up to a few hours' time.
    However, I'm not so sure about this method any longer.  I sync'd my iPad yesterday, which took an entire day or about 15 hours.  After completely erasing everything and restoring, I sync'd 1 playlist at a time as previously mentioned.  I got the "waiting" message after each sync, but it eventually went away and all seemed fine.  That is, until I checked my iPad.  I should have had 22,000 songs (according to iTunes and a manual count of songs taking the totals from my playlists) but the iPad indicated only 12,000.
    If it is not an inherent problem with every version of iTunes and/or every OS in the last few years, the only other thing I can think of is that's my computer.  I am flinging my hands up in the air at this point and begging for a phone number of someone to talk to who can help.  Most of the senior iTunes reps claim they are unaware of the problem, which is baffling to me.

    (In response to Mike Stitzer's post):
    I'm a 30-year+ PC user (DOS then Windows) with a systems programming and admin background in Unix.  Apple is still a bit foreign to me, although not out of the realm of understanding.  The problems Apple now faces deal with (1) its popularity, which now makes it susceptible to the same kind of hacking-attacks that Windows has endured forever (which has nothing to do with these problems, granted); (2) complexity of the technology and (3) inexperience and/or lack of knowledge plus limited training of its customer & tech support staff (both of these being the central issues of this syncing problem). 
    You make a good point: these companies are now using "us" as their beta-testers. They don't thoroughly vet their products before releasing them into the market, and then leave it up to the users to find problems/bugs, and maybe even figure out how to fix them.  I don't know, honestly, but that's how it seems.  Maybe they don't care.  Maybe they know their client-base will remain steady and reliable because people still want to have iPads and iPhones and iPods.  And like all tech companies, Apple is always moving on to the next best thing, the newest upgrade features which lure their client-base to buy again, and attract new buyers.  Like any other company, their bottom line is what matters, and fixing problems, such as this sync one, may not be cost-effective enough to rise to the level of fixing, simply because it doesn't appear to be widespread enough, although who knows.  I know people who have iphones who NEVER connect them to their laptops for syncing, who buy music from iTunes from their iPhone and that's their music library.  That's the extent of their 'use.'  There are a lot of Apple customers, maybe a majority of users, who have no clue about ninety-percent of what is discussed in these forums. 
    In any event, for some reason, after I updated to the latest iTunes, I was able to sync my three "i" devices, iPhone--which was what I was having the trouble with; then the iPad and just the other day, my iPod Classic; all synced without problem.  Last Sunday I did, momentarily, have the "waiting to apply changes" stick while trying to sync some newly made ring tones to my iPhone, so I bailed out of the process, rebooted my (Windows 7) laptop, and tried again, and it took.  Don't ask me why.  I have no idea. 
    Regarding Windows... I have to say that since Microsoft's XP, I haven't had many problems with the system.  I had seriously considered getting a Mac the next time I get a new laptop, and just going "all Apple" but I'm definitely reconsidering that now.  With all the new products coming on the market now, I don't want to put all my cookies into one jar... you know?  Things change, that's a guarantee. 

  • Cleaning up obsolete interrupts in process chain

    Hi Everyone,
    We have just recently started using process chains to manage our forecasting solution. We use Interrupt Processes to wait for triggers from external systems. However, recently we've had a problem wherein certain interrupts no longer wait for the triggers and just continue to the next process.
    When we checked the table RSPCINTERRUPTLOG, we found several Interrupt entries do not have an associated LOG-ID and INSTANCE-ID. We suspect that this is what's causing those interrupts to just go through without waiting for the correct triggers.
    Would anyone know any standard program/report or process that can clean up / re-initialize this table?
    Thanks,
    Chasky Bolido

    Hi Im a coworker of the original poster,
    Our process chains are always scheduled and active daily but decision logic will end the chain for weekends. The interrupts are waiting for an external event and these are sent daily from another BI system. But it seems due to the reason that the chains are partially active in the weekends (ending with the decision logic before the interrupt process) and the external triggers are received daily, the events register and the next run of the interrupt process will not wait for the new event.
    Are there ways to clean up the registered events?
    Thanks,
    Ram G.

  • Question on example from "Java concurrency in practice"

    "Java concurrency in practice" 14.9 listing ( [Orig here|http://www.javaconcurrencyinpractice.com/listings/ThreadGate.java] ):
    +...The condition predicate used by await is more complicated than simply testing isOpen. This is needed because if N threads are waiting at the gate at the time it is opened, they should all be allowed to proceed. But, if the gate is opened and closed in rapid succession, all threads might not be released if await examines only isOpen: by the time all the threads receive the notification, reacquire the lock, and emerge from wait, the gate may have closed again. So ThreadGate uses a somewhat more complicated condition predicate: every time the gate is closed, a "generation" counter is incremented, and a thread may pass await if the gate is open now or if the gate has opened since this thread arrived at the gate...+
    public class ThreadGate {
        private boolean isOpen;
        private int generation;
        public synchronized void close() {
            isOpen = false;
        public synchronized void open() {
            ++generation;
            isOpen = true;
            notifyAll();
        public synchronized void await() throws InterruptedException {
            int arrivalGeneration = generation;
            while (!isOpen && arrivalGeneration == generation) {
                wait();
    Question:
    Guys, could anyone explain me
    1) the work of code in term of "thread T1 waits, thread T2 closes..." the part arrivalGeneration == generation is unclear?
    2) Why both english and french editions say "every time the gate is closed, a generation counter is incremented"? How this is possible?
    3) Give an example how "the gate may have closed again" ? How this is possible?
    I posted this in other forums, but never had any explanations. Thanks.
    Edited by: maxim_2004 on Jul 14, 2010 9:19 AM

    Generation is a counter of how many times the gate has opened. We use it to determine if the gate has opened since a waiting thread arrived. The criteria for a waiting thread to proceed is not, "Is the gate open now?" but rather "Has the gate opened at least once since this thread started waiting?"
    Say you have N waiting threads and one controller thread. When the controller thread calls open(), we want all N waiting threads to be able to proceed. But the controller thread may call close() at any time, and depending on when he calls close(), how many waiting threads there are (that is, how large N is) and how the scheduler on that JVM/OS is operating, the controller thread may call close() before all of the waiting threads have completed the await() method.
    So a waiting thread may be stuck in the while loop call wait(), and by the time he has been notified, gets CPU cycles, acquires the lock, and goes back to test isOpen, the gate may have opened and closed. But we want him to be able to go, just because the gate did open. We don't care if he didn't get through before it closed again--he's supposed to be able to go anyway.
    Therefore, we don't just wait if the gate is closed. We wait if the number of times it has opened is the same as when we arrived. In other words we wait only, if it hasn't opened since this waiting thread arrived.
    Gate opens 1st time. (generation = 1)
    Gate closes.
    Gate opens 2nd time. (gen = 2)
    T2 arrives. (arrivalGen = 2)
    T2 calls wait()
    Gate opens 3rd time. (gen = 3)
    Gate closes.
    T2 gets CPU time and lock. Executes while test. Gate is closed. BUT gen=3 and arrivalGen=2, so even though the gate is closed now, it has opened since T2 arrived, so T2 is allowed to proceed (arrivalGen != gen)
    Edited by: jverd on Jul 14, 2010 10:05 AM
    Edited by: jverd on Jul 14, 2010 10:08 AM

  • Some question on thread

    i think threads are unpredictable.say, the following code. some questions on the code.
    public class Rpcraven{
         public static void main(String argv[]){
         Pmcraven pm1 = new Pmcraven("One");
         pm1.run(); // line1
         Pmcraven pm2 = new Pmcraven("Two");
         pm2.run();  // line 2
    class Pmcraven extends Thread{
    private String sTname="";
    Pmcraven(String s){
         sTname = s;
    public void run(){
         for(int i =0; i < 2 ; i++){
              try{
               sleep(1000);
              }catch(InterruptedException e){}
              yield();
              System.out.println(sTname);
    }question 1 > note line 1 and line 2 . does this two threds are staarted at the same time ? or line 1 first and line 2 second as in the code ? this is very much important to me.
    question 2 > ok, whoever goes first , now lets come to the try-catch block . there is sleep() who will sleep first ? so i need to know which thread is going to sleep first ? bcoz then i can say who will get the yield() method.
    i find difficult to predict the output of this thred.
    Output of One One Two Two.
    one more thing, threads are always called by start() method ( run() is called implicitly) . here start() is not usued . still the code is working . how ?

    question 1 > note line 1 and line 2 . does this two
    threds are staarted at the same time ? or line 1 first
    and line 2 second as in the code ? this is very much
    important to me.If it's important, you are doing something wrong...
    First, you shouldn't call the threads' run() method, that doesn't "start" the thread, it just calls run(). Use start() instead.
    The threads are sort of started in order, but probably not in the way you think.
    Think of it like this: there is a list of threads in the JVM. start() puts the thread in the list. After that, the CPU of your computer can run any thread in the list, for as long as it feels like. The CPU might run thread 1 for a few instructions, then thread 2 for a while, or it might start with thread 2, ... If you have a multi-CPU machine, the threads are run at the same time. It's unpredictable, except when you do explicit synhcronization or waiting.
    question 2 > ok, whoever goes first , now lets come to
    the try-catch block . there is sleep() who will sleep
    first ? so i need to know which thread is going to
    sleep first ?This is unpredictable. You can't know it. It will vary from run to run.
    If you need two threads to do something in a predictable order, you'll need to do synchronization and waiting.
    one more thing, threads are always called by start()
    method ( run() is called implicitly) . here start()
    is not usued . still the code is working . how ?You are not starting the threads, you are calling their run() methods sequentially.

  • Multithreading question

    Hi all,
    I know the default rule is to use the dispatch thread to perform gui-related job, but there are some exceptions as well.
    I have an application with several tabbed panes. Every tabbed pane shows some charts, which need to be updated even when the tabbed pane is not shown. Since updates come from remote hosts I need something non-blocking. Is it enough to use the SwingUtilities.invokeLater call (and thus using the event dispatch thread) or should I use something like this instead?
    import java.util.concurrent.BlockingQueue;
    import java.util.concurrent.LinkedBlockingQueue;
    import javax.management.Notification;
    * The <code>Worker</code> class asynchronoulsy updates the {@link QCallback} object
    * associated to it. If a new event occurs while the thread is busy, it is
    * temporarily stored to a queue.
    final class Worker implements Runnable {
        // Instance fields
         * Queue holding all the notifications waiting to be processed.
        private BlockingQueue<Notification> eventQueue;
         * The callback object used to udpate the allocation charts.
        private QCallback callback;
         * Flag indicating this thread status.
        private volatile boolean running;
        // Constructor
         * Creates a new <tt>AllocationPanelUpdater</tt> object.
         * @param callback The callback object used to update the allocation charts.
        public Worker(QCallback callback) {
            this.callback = callback;
            this.eventQueue = new LinkedBlockingQueue<Notification>();
            this.running = true;
        // Methods
         * Stops this thread.
        public void stop() {
            running = false;
            Thread.currentThread().interrupt();
         * Stores the specified notification into the temporary buffer, waiting if
         * the buffer is full.
         * @param notification The notification.
         * @throws InterruptedException If interrupted while waiting.
        public void event(Notification notification)
                throws InterruptedException {
            this.eventQueue.put(notification);
        // --------------------------------------------------- Method from Runnable
         * @see java.lang.Runnable#run()
        public void run() {
            while (running) {
                try {
                    Notification n = this.eventQueue.take();
                    try {
                        if (n != null) {
                            this.callback.update(n);
                    } catch (Throwable e) {
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
    }   //  END WorkerAn example of QCallback object is:
    public class SchedulerPanel extends QAbstractPanel implements
            NotificationListener, QCallback, PropertyChangeListener {
         * The thread which updates the charts.
        protected final Worker worker;
         * The has map containing the historial allocation series for each pool
         * (including the scheduler pool).
        private ConcurrentMap<String, TimeSeries> historicalSeries;
    // other fields here
         * Creates a new <tt>SchedulerPanel</tt> object.
         * @param owner The parent component
        public SchedulerPanel(QTabbedPane owner) {
            super(owner, QTabbedPane.SCHEDULER);
            setToolTipText("Scheduler panel");
            this.historicalSeries = new ConcurrentHashMap<String, TimeSeries>();
            this.barChartDataset = new DefaultCategoryDataset();
            this.registeredNodesModel = new SetListModel<String>();
            this.barChartDataset = new DefaultCategoryDataset();
            this.worker = new Worker(this);
            QConsole.getThreadPool().execute(worker);
            // Add a vertical spacer that also guarantees us a minimum width:
            add(Box.createRigidArea(new Dimension(150, 10)));
            this.barChartPanel = new ChartPanel(createBarChart());
            fixPanelOptions(barChartPanel);
            add(barChartPanel, BorderLayout.NORTH);
            add(Box.createVerticalStrut(50)); // extra space
            add(createRegisteredNodesPanel());
            add(Box.createVerticalStrut(150)); // extra space
            TimeSeries schedulerHistorical = getConfiguredTimeseries();
            this.historicalSeries.put(SCHEDULER, schedulerHistorical);
            add(createHistoricalChart(SCHEDULER, schedulerHistorical));
            add(Box.createVerticalStrut(50)); // extra space
    // other methods here
       * Updates this <code>QCallback</code> object (potentially using a
       * different thread) with the data contained into the Notification.
       * @param notification The received notification.
    public void update(Notification notification) {
            final String type = notification.getType();
            if (NotificationType.NODE_ADDED.equals(type)) {
                // If a new node registers we only need to update the
                // relative jlist
                String node = (String) notification.getUserData();
                // this is a list model. All methods are synchronized
                registeredNodesModel.add(node);
            } else if (NotificationType.SERVICE_ADDED.equals(type)) {
                 * When a service added notification is received adds the scheduler
                 * pane to the notification listeners' list with the
                 * schedulerNotificationFilter enabled (so only some notifications
                 * will be delivered to the scheduler pane)
                ObjectName oname = (ObjectName) notification.getUserData();
                addBarChart(oname.getKeyProperty(ObjectNameUtil.QOSP_NAME));
                // Adds the service name to the list of available services
                // (right side of the window)
                owner.getOwner().getListPanel().add(oname);
            } else if (NotificationType.ALLOCATION.equals(type)) {
                allocation((NodeAllocationNotification) notification);
         * Creates a new bar element.
         * @param name The bar name.
         * @exception IllegalArgumentException If the name has already been used.
        protected final void addBarChart(String name)
                throws IllegalArgumentException {
            synchronized (this.barChartDataset) {
                if (this.barChartDataset.getColumnIndex(name) < 0) {
                    this.barChartDataset.addValue(0.d, ROW_KEY, name);
                } else {
                    // this.barChartDataset.setValue(0.d, ROW_KEY, name);
                    throw new IllegalArgumentException(
                            "The name is already contained into the chart");
            TimeSeries series = getConfiguredTimeseries();
            if (this.historicalSeries.putIfAbsent(name, series) != null) {
                throw new IllegalArgumentException(
                        "The name is already contained into the map!");
            add(createHistoricalChart(name, series));
            add(Box.createVerticalStrut(50)); // extra space
    }Will it work?
    Thanks,
    Michele

    Depending on how you setup your dataset I think that
    you can just update them and it will not refresh the
    gui.
    No, the dataset is a JFreeChart component.
    How/Where is the data stored for the charts? The data is stored into the dataset. Whith JFreeChart you inteact only with the dataset, not with the chart panel. The chart panel is added to the main panel/frame at the beginning. Then, if you want to update it you have to update the dataset.
    What if
    you keep it somewhere the you could update and not
    have change events be fired off? Then just grab the
    update to date data and repaint/rebuild the charts
    that are currently displayed.Please see above.
    What I think is that the access to the datasets is thread safe there shouldn't be problems. In fact the charts are panel components, so if a thread updates the dataset, it should be the same thread which updates the related chart. Does this make sense?

  • Getting an interrupted exception when trying to bring down the service

    Hi,
    From the client side , I started an invocation service which is giving an interrupted exception when trying to shut it down.
    2013-08-01 12:21:15.576 PDT ERROR -  -  -  - Oracle Coherence 3.7.1.6 (thread=Invocation:customerLoaderWM:EventDispatcher, member=5): This thread was interrupted while waiting for the results of a request:
    Poll
      PollId=20, active
      InitTimeMillis=1375384875574
      Service=Cluster (0)
      RespondedMemberSet=[]
      LeftMemberSet=[]
      RemainingMemberSet=[1]
    2013-08-01 12:21:15.576 PDT ERROR -  -  -  - Oracle Coherence 3.7.1.6 (thread=Invocation:customerLoaderWM:EventDispatcher, member=5): Error while starting service "customerLoaderWM": (Wrapped: Interrupted while waiting for response from:[Member(Id=1, Timestamp=2013-08-01 12:20:11.375, Address=10.241.100.189:18088, MachineId=42483, Location=site:,machine:slc05esi,process:4777,member:ecs1, Role=OracleChargingLauncher)]) java.lang.InterruptedException
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.processPollInterrupt(Grid.CDB:40)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:54)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ClusterService.ensureService(ClusterService.CDB:15)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.register(Grid.CDB:5)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:3)
        at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:39)
        at com.tangosol.coherence.component.util.SafeService.restartService(SafeService.CDB:28)
        at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:23)
        at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
        at com.tangosol.coherence.commonj.WorkManager.getServers(WorkManager.java:599)
        at com.tangosol.coherence.commonj.WorkManager.disableServer(WorkManager.java:656)
        at com.tangosol.coherence.commonj.WorkManager$ServiceListener.memberLeft(WorkManager.java:1213)
        at com.tangosol.net.MemberEvent.dispatch(MemberEvent.java:116)
        at com.tangosol.net.MemberEvent.dispatch(MemberEvent.java:87)
        at com.tangosol.coherence.component.util.SafeService.translateEvent(SafeService.CDB:28)
        at com.tangosol.coherence.component.util.SafeService.memberLeft(SafeService.CDB:1)
        at com.tangosol.net.MemberEvent.dispatch(MemberEvent.java:116)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$DispatchEvent.run(Grid.CDB:7)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onNotify(Service.CDB:26)
        at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
        at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:39)
    It says one thread is interrupted by another. Has anyone faced this issue?.
    Any info on this is appreciated.
    Thanks.

    Error in the TDS datastream: unknown block: 68Sounds like Microsoft have updated the TDS protocol for MSSQL2000. If you're using the Free TDS (www.freetds.org) driver I know you can configure the it for different versions of TDS (check out the FAQ or the doco on their web site) but whether it works with SQL 2000 or not I don't know.
    Col

  • Phone call interrupting video recording

    Just a quick clarification-
    I've noticed that while recording a video, if a phone call comes in (even if it is declined), the video is ended. This obviously does make sense as incoming calls should have priority, and I suppose means that airplane mode is the way to go if I'm recording a video that I don't want to be interrupted.
    My question is: Is the above statement correct or is there an option or setting I'm missing that would allow a call to be declined during video recording and have the video continue? Using Airplane Mode isn't a huge problem, but it would be nice to be able to monitor incoming calls and have the choice whether to accept the call and end the video or decline the call and have the video continue.
    Thanks for the help!

    I had a iphone 3g and had static during phone calls - mostly on the person who I was calling. I hoped that when I upgraded to the iphone 3gs the problem would go away (thinking maybe I had a faulty speaker). But the problem still persists with this new phone (just a month old). I read where I should reset the phone, recharged the phone and reset the phone. But you would think buying a new phone would have done those same things. Perhaps it is an AT&T issue. That makes more sense since both phone have the same issue. But I would take an answer from Apple if they would like to share the definitive answer to this problem. Apple, your turn.

  • DatagramSocket.receive() and Thread.interrupt() - Inconsistent behavior

    Hi,
    I currently have an application that does in a seperate Thread receive udp packets in a loop around a Datagramsocket.receive(). Whenever a state change should occur, the thread is being interrupted by Thread.interrupt() in order to exit the DatagramSocket.receive().
    That works nicely on the solaris version of the jvm (1.5.0-11) on x86 and sparc but it does not work on linux intel (i386 and amd64). There the receive simply ignores the interrupt.
    What is the intended behavior ?
    Do I have to move to timeOuts on each receive (which hinders fast state changes as timeouts have to occur and the loop has to be timeouted very often in order to be fast).
    Little tests say: (java 1.5)
    Linux 2.6.18 (32/64 Bit) : no interrupt
    FreeBsd (32/64 Bit): interrupt works
    Solaris 10 (sparc/64x86): interrupt works
    MacOs 10.4: no interrupt
    On Linux 2.6.18, java 1.4 - interrupt works.
    At least a consistent behavior is missing!
    J�rn
    Here is the code:
    SubThread.java:
    package test;
    import java.net.*;
    import java.io.*;
    public class SubThread extends Thread {
         public DatagramSocket ds;
         public boolean quit=false;
         public SubThread() {
              super();
              try {
                   ds = new DatagramSocket();
              } catch (Exception E) {
                   System.out.println("new DS failed: "+E.getMessage());
                   System.exit(-1);
         public void run() {
              byte[] buf = new byte[1000];
              DatagramPacket p = new DatagramPacket(buf, buf.length);
              System.out.println("Started subThread !");
              while (!quit) {
                   try {
                        ds.setSoTimeout(10000); // 10 Seconds
                        ds.receive(p);
                   } catch (SocketTimeoutException E) {
                        System.out.println("ST: Hit timeout !");
                   } catch (InterruptedIOException E) {
                        System.out.println("ST: Interrupted IO Works !: "+E.getMessage());
                        quit=true;
                   } catch (Exception E) {
                        System.out.println("ST: Exception: "+E.getMessage());
              System.out.println("Ended subThread !");
    }Test.java:
    package test;
    public class Test {
         static Integer a = 1;
         public static void main(String[] args) {
              SubThread st = new SubThread();
              st.start();
              try {
                   synchronized (a) {
                        System.out.println("Starting wait (1s) !");
                        a.wait(1000);
                        System.out.println("Sending interrupt()");
                        st.interrupt();
                        a.wait(1000);
                        if (!st.quit) {
                             System.out.println("As interrupts do not work, terminating by timeout !");
                             st.quit=true;
                             System.out.println("Waiting for end!");
                        } else
                             System.out.println("Ending !");
              } catch (Exception E) {
                   System.out.println("Exception: "+E.getMessage());
    }

    What is the intended behavior ?The intended behaviour is defined in http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#interrupt()
    ' If this thread is blocked in an I/O operation upon an interruptible channel then the channel will be closed, the thread's interrupt status will be set, and the thread will receive a ClosedByInterruptException.'
    DatagramSocket not being an InterruptibleChannel, this piece doesn't apply. None of the other pieces apply either, so the fallback applies:
    ' If none of the previous conditions hold then this thread's interrupt status will be set.'
    If you're getting an interrupted read() on one platform, that's a bonus, but it's not the defined behaviour.
    Use a DatagramSocket derived from DatagramChannel.open().socket() and it should work on all platforms.

Maybe you are looking for

  • Recent Problem with PDF Preset

    For a long time I've been able to use the "Adobe PDF Preset" options to create various-size PDF files.  However, there appeared to be an Acrobat update today.  When I went to export a file as a low-res PDF, the only option that came up in the "Preset

  • What is the audio output power of the iPad Air in mw

    Can't seem to find this info on the apple website.

  • Conversion from .ai to .svg issue

    Hello all, I'm having problems regarding the conversion from .ai file to .svg file. The problem, as you can see the attachment files , is an alteration of the image. I wanted to ask you, certainly more experienced than me , if is there a way to solve

  • Testing values in logic

    I have used logic to post values to accounts based on the account number. Now I need to post values based on account values. Logically what I want to do is this; if account-1 value = account-2 value post account-1 value to account-3 If Excel this wou

  • Is there a version of XCode for windows?

    I am a big developer in android and windows apps. And looking to get involved in iOS app dev. I dont own a Mac, so is there a vesrion of XCode for windows? Or is a virtual machine my only option?