aspose file tools*
The moose likes Other Application Frameworks and the fly likes java plugin framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "java plugin framework" Watch "java plugin framework" New topic
Author

java plugin framework

Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Hi All,

I have been asked to developed several java applications , one of such application will be the core application and the others should be
as pluggins of this application

I have search in the net and i found the following :
1)jpf (java plugin framework) but i found that no more development and also has less resources
2)OSGI ,but am I will not use spring in any of my applications

I am really in need for your feedback , comments , suggestions .....
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
1)jpf (java plugin framework) but i found that no more development and also has less resources

What do you mean by "has less resources"? Does JPF not do what you need done?

2)OSGI ,but am I will not use spring in any of my applications

OSGi is not in any way dependent on Spring. Wherever you got that impression, it's incorrect.


Ping & DNS - my free Android networking tools app
Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Thanks Ulf Dittmer for your reply,

What do you mean by "has less resources"? Does JPF not do what you need done?

I mean you can not find a complete example , as well as Less documents about jpf



OSGi is not in any way dependent on Spring. Wherever you got that impression, it's incorrect.

So can i use it to create plugins without the need for spring ?



Which one of them jpf/OSGi is suitable for my requirements (which I have described in the previous post) ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
So can i use it to create plugins without the need for spring ?

Yes

Which one of them jpf/OSGi is suitable for my requirements (which I have described in the previous post) ?

You have said very little about your requirements, certainly not enough to answer this question. From what you've said, it's conceivable that even something as simple as what I wrote about here might be sufficient.
Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Thanks Ulf Dittmer for your reply ,
You have said very little about your requirements, certainly not enough to answer this question


I want to create several web java applications , of course deploy their .war files on jboss application server , one of such applications will be the core application and the others should be as pluggins of this core application ,

plugin exists once its war file deployed.
plugin does not exist once its war file undeployed.


for example the core application will be like a web page which lists all the available plugins ( the applications which their war files have been deployed to the server)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
It would be quite odd to think of a web app as a "plugin". Web apps exist in their own right; if their functionality should only exist as part of some other web app, then deploying them as web app is not appropriate.

You may want to investigate the concepts of OSGi bundles and services. Those can be used to implement functionality in the context of a larger app (JPF may have similar concepts).
Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Thanks for your reply ,
I have checked the example at the link http://www.javaranch.com/journal/200607/Journal200607.jsp#a1 (which you have referred me in the previous post) , The example is very nice ,

The plugins are .class files

I have the following questions regarding the example :

1) Is it possible to make the plugins as .jar files instead of .class files ?
2) Which one you have used jpf or OSGi to create the examples , it seems that you have your own way , you have not used any one of them , Is it Right ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
#1: yes, jar or zip files would be possible. They'd complicate the I/O code, but not a whole lot, and would be functionally equivalent.

#2: yes, I cooked up my own scheme, which is much less functional than either jpf or osgi. I wouldn't use jpf since it seems dead. Osgi looks like the wave of the future in this space.
Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Thanks Ulf Dittmer for your reply ,

#1: yes, jar or zip files would be possible. They'd complicate the I/O code, but not a whole lot, and would be functionally equivalent.


I would like to draw your attention that my requirements will be : each plugin will be as .jar file (each jar file contains of multiple classes) so we will have multiple .jar files each jar file represents a plugin.
In a summary :
1. I want to create core application which contains of plugins ( each plugin as .jar file)
2. Each jar file might contains multiple classes
3. Adding/removing plugins is nothing but adding/deleting .jar file to/from a particular location.

So is it possible to modify your example according to my requirements ?
I do appreciate your advise , suggestion and feedback ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
It is possible to modify my example to work that way, but it would take quite a bit of work to make it suitable for a production environment. If you're serious about this, check out OSGi, make your plugins OSGi Bundles (or Services), and then you can use Apache Karaf for this.
 
jQuery in Action, 2nd edition
 
subject: java plugin framework