Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Automatic restart of crashed OLE Object
Automatic restart of crashed OLE Object [message #504318] Fri, 18 December 2009 10:13 Go to next message
Juergen Weber is currently offline Juergen WeberFriend
Messages: 54
Registered: July 2009
Member
Hi,

I tried the Open an OLE Excel sheet snippet from
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet261.java?view=co

Then I killed EXCEL.EXE from Taskmanager and looked what happened. Looks
like the SWT frame is still running, the Excel menus are still there, but don't work any more, the Excel content ist gone.
Is it possible to have Excel restart automatically?

Background: We have a JNI-Module that crashes a lot and takes the Java
VM down with it. Idea is to make the JNI-Module an ActiveX Control,
and embed it into Eclipse like the snippet. Of course, Eclipse should
survive and restart the ActiveX Control.

Would that be possible?

Thanks,
Juergen
Re: Automatic restart of crashed OLE Object [message #504587 is a reply to message #504318] Mon, 21 December 2009 16:08 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
Hi Juergen,

swt's ole implementation does not have anything in place that would do this
automatically. Looking at swt's implementation, the only place that
OleCreate* is called with the program id is in the OleClientSite
constructors. I'm not an OLE expert, but based on this I think the best
that could be hoped for would be for you to detect the crash somehow and
then dispose the OleClientSite and create a new one.

I'm not sure how you would detect the crash though. Maybe ping it
periodically somehow (would doing this to a crashed app result in an swt
crash)? Hopefully someone else has another idea here. swt's ole owner is
away until the new year, so if there aren't any better suggestions in the
meantime then I'll see if he has a suggestion for helping your case.

Grant


"Juergen Weber" <juergen@jwi.de> wrote in message
news:hgfkk3$ec0$1@build.eclipse.org...
> Hi,
>
> I tried the Open an OLE Excel sheet snippet from
>
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet261.java?view=co
>
> Then I killed EXCEL.EXE from Taskmanager and looked what happened. Looks
> like the SWT frame is still running, the Excel menus are still there, but
don't work any more, the Excel content ist gone.
> Is it possible to have Excel restart automatically?
>
> Background: We have a JNI-Module that crashes a lot and takes the Java
> VM down with it. Idea is to make the JNI-Module an ActiveX Control,
> and embed it into Eclipse like the snippet. Of course, Eclipse should
> survive and restart the ActiveX Control.
>
> Would that be possible?
>
> Thanks,
> Juergen
Previous Topic:DND files from KDE based app to swt app?
Next Topic:How to create button on runtime?
Goto Forum:
  


Current Time: Fri Dec 19 12:16:55 GMT 2014

Powered by FUDForum. Page generated in 0.02458 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software