Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
dima.alina@gmail.com - 23 Feb 2006 08:30 GMT
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
Chris Uppal - 23 Feb 2006 12:27 GMT
> 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
dima.alina@gmail.com - 23 Feb 2006 12:43 GMT
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?:(
Chris Uppal - 23 Feb 2006 13:07 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.