|
|
Re: OSGi on the server-side [message #39028 is a reply to message #38849] |
Tue, 30 March 2004 13:26 |
ted stockwell Messages: 123 Registered: July 2009 |
Senior Member |
|
|
"Martin Lippert" <lippert@acm.org> wrote in message
news:c49k2b$rjs$1@eclipse.org...
> Hi,
>
> I am just working on some RCP application that uses an J2EE application
> server and I am just asking me (and now you ;-) whether it would be
> possible to run the OSGi-based runtime also within the application
> server somehow (or vice versa). I would love to have some of my
> plugins/bundles are be deployed on the server side and be able to use,
> for example, the extension-point mechanism. Any thoughts on that or
> maybe even experiences using this kind of setting?
>
>
I think it makes a lot of sense to use the Eclipse runtime platform on the
server side. I have done so a few times now.
I think that the most practical approach is to run the server-side
components (Tomcat and JBoss) inside of Eclipse, not the other way around.
----------------------------
Did you know that Eclipse currently embeds an instance of Tomcat?
You can package a web application in a plugin. The plugin can start it's
web application using the org.eclipse.help.internal.appserver.WebappManager
class.
Start a web application like so...
WebappManager.start("rpc", "com.rpc.core.web", new Path("rpc"));
The first argument above is the location of the web application directory
within the plugin that contains the application. The 2nd argument is the id
of the plugin that contains the web application. The last argument is used
to map the application to the web server's namespace.
To use Eclipse on the server side I created my own Eclipse application (an
extension of the org.eclipse.core.runtime.application extension point).
This application explicitly starts up its web application(s). In the future
I could create an extension point that would discover all the application to
start.
One nice thing about packaging web application in plugins is that Tomcat no
longer is in charge of classloading, Eclipse is. Therefore you don't put
your application's libraries in the web application's lib directory, you put
them in other plugins and put a <requires> element in your application's
plugin manifest file.
----------------------------
About a year ago I created some plugins that wrap JBoss. Using these
plugins I was able package EJB's, web applications, and MBeans in plugins.
Basically I created a custom version of JBoss's main server application
classes, JBossMain and ServerImpl that use Eclipse classloaders instead of
JBoss classloaders. Then I was able to create an extension point that used
the JBOSS MainDeployer class to deploy EJBs, Web apps, an MBeans that were
packaged inside other plugins. A plugin just needed to register the URI of
thier J2EE component and the JBOSS MainDeployer would correctly deploy it.
I can send code if anyone is further interested but I bring it up because
it's proof that the concept is workable.
-----------------------------
The next time I want to deploy an EJB in Eclipse I may look at creating a
plugin that embeds OpenEJB since OpenEJB works with Tomcat and since Eclipse
already has an embedded Tomcat. Or, since OpenEJB is designed to be
embedded it may make more sense to embed OpenEJB directly.
---------------------
Ted Stockwell
RPC Software
|
|
|
Re: OSGi on the server-side [message #39059 is a reply to message #39028] |
Tue, 30 March 2004 16:14 |
Sten Ernerot Messages: 26 Registered: July 2009 |
Junior Member |
|
|
I agree
To add:
In many P2P like situations the server is the client:-)
If you wich you can also download OSGi compliant bundles to run other
servers, like Jetty, inside Eclipse.
-Sten
"ted stockwell" <emorning@yahoo.com> wrote in message
news:c4bs9e$h43$1@eclipse.org...
>
> "Martin Lippert" <lippert@acm.org> wrote in message
> news:c49k2b$rjs$1@eclipse.org...
> > Hi,
> >
> > I am just working on some RCP application that uses an J2EE application
> > server and I am just asking me (and now you ;-) whether it would be
> > possible to run the OSGi-based runtime also within the application
> > server somehow (or vice versa). I would love to have some of my
> > plugins/bundles are be deployed on the server side and be able to use,
> > for example, the extension-point mechanism. Any thoughts on that or
> > maybe even experiences using this kind of setting?
> >
> >
>
>
> I think it makes a lot of sense to use the Eclipse runtime platform on the
> server side. I have done so a few times now.
> I think that the most practical approach is to run the server-side
> components (Tomcat and JBoss) inside of Eclipse, not the other way around.
>
> ----------------------------
>
> Did you know that Eclipse currently embeds an instance of Tomcat?
> You can package a web application in a plugin. The plugin can start it's
> web application using the
org.eclipse.help.internal.appserver.WebappManager
> class.
>
> Start a web application like so...
> WebappManager.start("rpc", "com.rpc.core.web", new Path("rpc"));
>
> The first argument above is the location of the web application directory
> within the plugin that contains the application. The 2nd argument is the
id
> of the plugin that contains the web application. The last argument is
used
> to map the application to the web server's namespace.
>
> To use Eclipse on the server side I created my own Eclipse application (an
> extension of the org.eclipse.core.runtime.application extension point).
> This application explicitly starts up its web application(s). In the
future
> I could create an extension point that would discover all the application
to
> start.
>
> One nice thing about packaging web application in plugins is that Tomcat
no
> longer is in charge of classloading, Eclipse is. Therefore you don't put
> your application's libraries in the web application's lib directory, you
put
> them in other plugins and put a <requires> element in your application's
> plugin manifest file.
>
> ----------------------------
>
> About a year ago I created some plugins that wrap JBoss. Using these
> plugins I was able package EJB's, web applications, and MBeans in plugins.
> Basically I created a custom version of JBoss's main server application
> classes, JBossMain and ServerImpl that use Eclipse classloaders instead of
> JBoss classloaders. Then I was able to create an extension point that
used
> the JBOSS MainDeployer class to deploy EJBs, Web apps, an MBeans that were
> packaged inside other plugins. A plugin just needed to register the URI
of
> thier J2EE component and the JBOSS MainDeployer would correctly deploy it.
> I can send code if anyone is further interested but I bring it up because
> it's proof that the concept is workable.
>
> -----------------------------
>
> The next time I want to deploy an EJB in Eclipse I may look at creating a
> plugin that embeds OpenEJB since OpenEJB works with Tomcat and since
Eclipse
> already has an embedded Tomcat. Or, since OpenEJB is designed to be
> embedded it may make more sense to embed OpenEJB directly.
>
> ---------------------
>
>
> Ted Stockwell
> RPC Software
>
|
|
|
Re: OSGi on the server-side [message #39823 is a reply to message #39028] |
Tue, 06 April 2004 18:23 |
Eclipse User |
|
|
|
Originally posted by: sg.media-style.removeme.com
Hi,
i would be very interested to see your code can you send it to me
offlist or publish it here?
Thanks a lot!
Stefan
> About a year ago I created some plugins that wrap JBoss. Using these
> plugins I was able package EJB's, web applications, and MBeans in plugins.
> Basically I created a custom version of JBoss's main server application
> classes, JBossMain and ServerImpl that use Eclipse classloaders instead of
> JBoss classloaders. Then I was able to create an extension point that used
> the JBOSS MainDeployer class to deploy EJBs, Web apps, an MBeans that were
> packaged inside other plugins. A plugin just needed to register the URI of
> thier J2EE component and the JBOSS MainDeployer would correctly deploy it.
> I can send code if anyone is further interested but I bring it up because
> it's proof that the concept is workable.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04060 seconds