[Vivek Nigam] Re: destroy method is not destroying the OutOf Process EclipseEngine!!

From: Andrew John Sadler <ajs2_at_icparc.ic.ac.uk>
Date: Thu 14 Apr 2005 10:37:11 AM GMT
Message-ID: <wzu0m9d4q0.fsf@cow.icparc.ic.ac.uk>

attached mail follows:


Hello Andrew,

                Thank for your quick response (I was very surprised
that someone answered so quickly... ;) ).

                Amazing, you got it just right!!!, I was using another
thread to close the connection... I made the changes as you suggested
and it worked...

                If you need the code, I can prepare it and send it to
you (case want to analyze it...).

Thanks a lot!!!

Vivek Nigam

On Apr 12, 2005 4:28 PM, Andrew John Sadler <ajs2@icparc.ic.ac.uk> wrote:
> Hi Vivek,
> 
> I would imagine that what you are experiencing is some form of
> deadlock (whereby two different Java threads are trying to access a
> single resource at the same time).
> 
> It would be helpfull if you could send a complete (but small) example
> of code that demonstrates your problem, but I will try to offer some
> suggestions as to what the problem might be from what you have already
> sent.
> 
> My first guess would be that your your function "disconnectEclipse()"
> is being called from a different thread whilst the thread that created
> your OutOfProcessEclipse is inside the listener attached to your
> "num_of_bomb" queue.  Some of the locks held by the thread that is
> serving your EclipseConnection (which will be the same thread that
> runs any QueueListener methods), might be needed by the thread which
> is attempting to close the stream.
> 
> We have been quite carefull about such threading issues in the
> Java/Eclipse interface, though it is possible that there is a bug.  If
> you could create a small, self contained example I would be very happy
> to look into it further.  Also if you could give some information
> about the follwing questions, this would help us to track down any
> problems...
> 
> 1) The version of ECLiPSe that you are using
> 
> 2) The version and vendor of Java (eg Sun JDK 1.4, or IBM JDK 1.3, or whatever)
> 
> 3) The operating system and hardware that you are runnign on (Windows
>   & Pentium2, Linux & pentium, OSX and i-Mac)
> 
> AndyS
> 
> Vivek Nigam <vivek.nigam@gmail.com> writes:
> 
> > Hello,
> >
> >            I don't understand what happened, I am using the Java client
> > application to communicate with a Java Server via RMI. The Server is
> > managing the eclipse processes, however when I ask the server to
> > destroy the eclipse it stops!!! It doesn't generate any exceptions!!!
> >
> > public void disconnectEclipse()
> >       {
> >               try {
> >                       ask_new_click.removeListener();
> >                       ask_new_click.close();
> >                       num_of_bomb.removeListener();
> >                       num_of_bomb.close();
> >                       click_options.removeListener();
> >                       click_options.close();
> >                       bomb_found.removeListener();
> >                       bomb_found.close();
> >                       safe_click_found.removeListener();
> >                       safe_click_found.close();
> >                       ((OutOfProcessEclipse) eclipse).destroy();
> >               } catch (Exception e) {
> >
> >                       e.printStackTrace();
> >               }
> >
> >       }
> >
> > First I tried the code above, and it stopped in the:
> >
> >   "num_of_bomb.close();"
> >
> > Then I removed everything except the destroy line, and still stops...
> > I was wondering if someone could help me understand how these methods
> > work...
> >
> > Thanks,
> >
> > Vivek Nigam
> 
>
Received on Thu Apr 14 11:40:39 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:35 PM GMT GMT