Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » IPC, Dirmi, BridgeClassloader
IPC, Dirmi, BridgeClassloader [message #1137210] Mon, 14 October 2013 10:35 Go to next message
Marek Jagielski is currently offline Marek JagielskiFriend
Messages: 85
Registered: April 2012

I am trying to establish an inter-process communication between eclipse plugin and a separate java process launched within eclipse. I found a library Dirmi ( as a good and light solution that would fit my needs. It is bidirectional and it says that it is faster than standard rmi.

During integration test I met some difficulties. As dirmi is working fine in standalone environemnt, I can't simply run it in Eclipse PDE. (Here is an issue that I made in dirmi project: To demonstrate a problem I created a sample project:

Dirmi is a library that uses runtime code generation. When I use it I get an exception:

java.lang.ClassCastException: com.systemincloud.modeler.launch.impl.common.ConsoleIApi$Stub$163 cannot be cast to com.systemincloud.modeler.launch.impl.common.ConsoleIApi

It can be due to the fact that at runtime each bundle has its own classloader. Someone has already provided a patch for dirmi:

In the commit message he explains the problem and that the solution is to use Bridge classloading. Only using a patch didn't solve my problem. However, in the explanation there is a sentence that I don't fully understand:

"The solution is to generate a bridge classloader for each application bundle classloader that simply delegates to the application bundle classloader, except when loading classes that starts with "org.cojen.dirmi" in which case it delegates to the Dirmi bundle classloader."

I don't undestand how can I replace a class loader for a plugin?

Thanks in advance,

Re: IPC, Dirmi, BridgeClassloader [message #1137825 is a reply to message #1137210] Mon, 14 October 2013 19:25 Go to previous message
Marek Jagielski is currently offline Marek JagielskiFriend
Messages: 85
Registered: April 2012
Issue solved by glerup on github:

I am leaving the example for those who want to integrate light ipc in their eclipse plugins.
Previous Topic:Eclipse launch confuguration programatically
Next Topic:custom Editor development in eclipse plugin using eclipse ganymede version
Goto Forum:

Current Time: Tue May 22 02:49:50 GMT 2018

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

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

Back to the top