running different plugins within a java application in different JVMs [urgent need of help]

D

dima.alina

Hello everyone,

I am developing an application that supports loading plugins. It is
using the JPF framwork. The problem that I am having is that I want to
start each of the plugins within the application in different java
versions (start a JVM within another JVM). Currently, the plugins are
running as parts of my main application and not as different
applications...this is what JPF supports.

Can anyone please help me with this? It is really important that I
manage to do this.

Thanks alot,
Alina
 
C

Chris Uppal

I am developing an application that supports loading plugins. It is
using the JPF framwork. The problem that I am having is that I want to
start each of the plugins within the application in different java
versions (start a JVM within another JVM). Currently, the plugins are
running as parts of my main application and not as different
applications...this is what JPF supports.

I don't really understand what you are trying to do, and I don't know anything
about JPF except what 10 seconds skimming the website tells me. But I'm not
sure if you'll be able to do what you want (whatever it is). The only way to
run code in another JVM is to start another process, and then it's just like
starting another process that was written in C++, Delphi, or Lisp -- there is
no "special" communication with it. So, although you can certainly start
another Java process, there won't be the intimate connection between the pieces
that constitute a pluggable architecture.

You might be able to get somewhere by using RMI, or something similar, to
communicate between the two processes. But that could be quite awkward unless
JPF can accommodate the extra failure modes that remote method invocation
brings with it (e.g. the network might go down). Possibly you could define a
layer of your own generic wrappers/proxies which are all that JPF "sees", and
which use RMI (and its own proxies) internally without letting JPF know about
them.

You might also consider changing your architecture entirely so that the
framework "knows" about (and perhaps is built on) RMI. You might even switch
to a different kind of component architecture like JavaSpaces (or whatever that
is called these days).

-- chris
 
D

dima.alina

Hi,

Thanks for your reply!

What I am trying to support is that each of the plugins that are loaded
within my application can be loaded with different Java versions which
are currently installed. In other words, say one of the plugins only
supports Java 1.3...that means that if my application runs in Java 1.4,
that plugin currently cannot function properly...I am looking for a way
to still allow the plugin to be running on Java 1.3 even if my main
application runs on 1.4.

Any ideas?:(
 
C

Chris Uppal

say one of the plugins only
supports Java 1.3...that means that if my application runs in Java 1.4,
that plugin currently cannot function properly...

That /shouldn't/ be a problem. Sun try quite hard to ensure upward
compatibility. Code compiled for a 1.3 platform should run fine on a 1.4 or
1.5 JVM. (The reverse is not true.)

That doesn't mean that you'll never see a problem, but they should be -- at
worst -- rare.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top