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

Discussion in 'Java' started by dima.alina@gmail.com, Feb 23, 2006.

  1. Guest

    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
     
    , Feb 23, 2006
    #1
    1. Advertising

  2. Chris Uppal Guest

    wrote:


    > 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
     
    Chris Uppal, Feb 23, 2006
    #2
    1. Advertising

  3. Guest

    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?:(
     
    , Feb 23, 2006
    #3
  4. Chris Uppal Guest

    wrote:

    > 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
     
    Chris Uppal, Feb 23, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page