Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [net4j] JVM connector requirements?
[net4j] JVM connector requirements? [message #634994] Mon, 25 October 2010 11:09 Go to next message
Michal Tkacz is currently offline Michal TkaczFriend
Messages: 105
Registered: July 2009
Senior Member
Hi,

I would like to use JVM connector in a scenario where the two
communicating parties are loaded using different classloaders. That
means there're actually two copies of net4j classes loaded in memory,
one for each party. Will JVM connector work in such case? Or does it
require that there's only one copy of net4j classes which work as a
communication point? If not, what's the communication channel? Shared
memory?

Thanks,

Michal
Re: [net4j] JVM connector requirements? [message #635000 is a reply to message #634994] Mon, 25 October 2010 11:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 25.10.2010 13:09, schrieb Michał Tkacz:
> Hi,
>
> I would like to use JVM connector in a scenario where the two communicating parties are loaded using different classloaders. That means there're actually two copies of net4j classes loaded in memory, one for each party. Will JVM connector work in such case?
I've never tested this but I guess it could work if you manually register the IJVMAcceptor of the one classloader with the acceptor registry of the other classloader:

IJVMAcceptorManager.INSTANCE.getAcceptorRegistry(). put(...)

Does that work?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



> Or does it require that there's only one copy of net4j classes which work as a communication point? If not, what's the communication channel? Shared memory?
>
> Thanks,
>
> Michal


Re: [net4j] JVM connector requirements? [message #635279 is a reply to message #635000] Tue, 26 October 2010 08:56 Go to previous message
Michal Tkacz is currently offline Michal TkaczFriend
Messages: 105
Registered: July 2009
Senior Member
Thanks for your suggestion Eike, but I guess it won't work since each
party has its own version of IJVMAcceptor class loaded in memory.

Anyway I was more interested in a question whether the communication is
based on some common (static) objects or some other more or less
implementation independent mechanism (some kind of shared memory?).
It looks like the former is true which explains why JVM connector
doesn't work for me.

In my scenario I have two OSGi runtimes deployed as separate war files
inside Tomcat. As they both run inside the same JVM, I thought I could
use JVM connector, but it turns out I'll need to use TCP connector.

Thanks anyway,

Michal

On 10/25/2010 01:26 PM, Eike Stepper wrote:
> Am 25.10.2010 13:09, schrieb Michał Tkacz:
>> Hi,
>>
>> I would like to use JVM connector in a scenario where the two
>> communicating parties are loaded using different classloaders. That
>> means there're actually two copies of net4j classes loaded in memory,
>> one for each party. Will JVM connector work in such case?
> I've never tested this but I guess it could work if you manually
> register the IJVMAcceptor of the one classloader with the acceptor
> registry of the other classloader:
>
> IJVMAcceptorManager.INSTANCE.getAcceptorRegistry(). put(...)
>
> Does that work?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
>> Or does it require that there's only one copy of net4j classes which
>> work as a communication point? If not, what's the communication
>> channel? Shared memory?
>>
>> Thanks,
>>
>> Michal
Previous Topic:EMFCompare and compare with Repository
Next Topic:Saving a Double.POSITIVE_INFINITY writes Infinity instead of INF
Goto Forum:
  


Current Time: Fri Apr 19 06:28:07 GMT 2024

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

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

Back to the top