Equinox in clustered server env [message #88942] |
Wed, 30 May 2007 13:41 |
Eclipse User |
|
|
|
Originally posted by: viy.net.gmail.com
Hi all,
our team needs to develop common infrastructure for extensible J2EE
application. The "infrastructure" delivers common application logic,
interfaces, etc. and should provide way for extending itself by adding
extensions developed by customer side or other development team.
The whole application may be considered as UI-free, so all pluggable
components will ship only logic (non-UI) code.
The target deployment env for the application is JBoss 4 cluster.
We decided:
* to choose Equinox as plug-in framework
* to use Equinox HTTP ServletBridge web-app as packaging method for, at
least, our base infrastructure logic (it is also split into several
Equinox plugins) In other words, we just reassemble bridge.war with our
basic plugins inside and will deploy the WAR-file on server.
My questions are:
1. Did we choose right method to build such a pluggable server-side
application?
2. Especially, is Equinox HTTP ServletBridge appropriate for packaging
the application? Are there any other better methods to deploy
Equinox-enabled app on the server?
3. If we will use Equinox HTTP ServletBridge, how to "hot" add new
plugin to already running application? "Hot" means "without stopping the
application". I guess that default bridge packaging isn't suitable for
hot-adding-- plugins reside inside WAR-file in WEB-INF\eclipse\plugins
dir. And yet another question: how to make possible the plugin-adding be
cluster-wide? I have no any ideas on this point at the moment :(
4. Is it possible to use all powerful features (JMX, JDBC, JNDI, etc.)
provided by J2EE server (JBoss in our case) from inside of our plugin
running inside OSGi/Equnox framework running inside Equinox HTTP bridge
WAR? Is the usage transparent or we need to do something special to use
the features?
Thanks in advance.
|
|
|
Re: Equinox in clustered server env [message #89018 is a reply to message #88942] |
Wed, 30 May 2007 22:08 |
Simon Kaegi Messages: 381 Registered: July 2009 |
Senior Member |
|
|
"Eugene Voytitsky" <viy.net@gmail.com> wrote in message
news:f3juv1$g4a$1@build.eclipse.org...
> Hi all,
>
> our team needs to develop common infrastructure for extensible J2EE
> application. The "infrastructure" delivers common application logic,
> interfaces, etc. and should provide way for extending itself by adding
> extensions developed by customer side or other development team.
>
> The whole application may be considered as UI-free, so all pluggable
> components will ship only logic (non-UI) code.
>
> The target deployment env for the application is JBoss 4 cluster.
>
> We decided:
> * to choose Equinox as plug-in framework
> * to use Equinox HTTP ServletBridge web-app as packaging method for, at
> least, our base infrastructure logic (it is also split into several
> Equinox plugins) In other words, we just reassemble bridge.war with our
> basic plugins inside and will deploy the WAR-file on server.
>
> My questions are:
>
> 1. Did we choose right method to build such a pluggable server-side
> application?
>
This is subjecive of course however I think OSGi in general and Equinox in
particular provide the ideal base for building this style of application.
> 2. Especially, is Equinox HTTP ServletBridge appropriate for packaging the
> application? Are there any other better methods to deploy Equinox-enabled
> app on the server?
>
Your packaging approach looks correct.
Ideally you'd want to package a smaller core set of bundles in your WAR
files and then add others you need dynamically however that requires a
management agent and provisioning strategy.
> 3. If we will use Equinox HTTP ServletBridge, how to "hot" add new plugin
> to already running application? "Hot" means "without stopping the
> application". I guess that default bridge packaging isn't suitable for
> hot-adding-- plugins reside inside WAR-file in WEB-INF\eclipse\plugins
> dir.
This would normally be the job of a management agent.Equinox as a platform
certainly supports this use-case however there is not currently an
out-of-the-box solution. If you want to take a look at this problem you
might "start" by looking at the console and then build your own.
> And yet another question: how to make possible the plugin-adding be
> cluster-wide? I have no any ideas on this point at the moment :(
This is doable however again you would have to handle the hot distribution
and synchronization yourself. The appserver will only cluster what you have
in the webapp.
>
> 4. Is it possible to use all powerful features (JMX, JDBC, JNDI, etc.)
> provided by J2EE server (JBoss in our case) from inside of our plugin
> running inside OSGi/Equnox framework running inside Equinox HTTP bridge
> WAR? Is the usage transparent or we need to do something special to use
> the features?
>
JMX and JDBC work transparently. JNDI works transparently for most resources
however it's not transparent for "java:comp/env" lookups as these are scoped
by the webapps context class loader. To get at these resources (at least for
the moment) you'd have to set the thread context class loader first to the
BridgeServlet's class loader.
HTH
-Simon
|
|
|
Re: Equinox in clustered server env [message #89074 is a reply to message #89018] |
Thu, 31 May 2007 17:24 |
Eclipse User |
|
|
|
Originally posted by: viy.net.gmail.com
Simon Kaegi wrote:
>> 3. If we will use Equinox HTTP ServletBridge, how to "hot" add new plugin
>> to already running application? "Hot" means "without stopping the
>> application". I guess that default bridge packaging isn't suitable for
>> hot-adding-- plugins reside inside WAR-file in WEB-INF\eclipse\plugins
>> dir.
> This would normally be the job of a management agent.Equinox as a platform
> certainly supports this use-case however there is not currently an
> out-of-the-box solution. If you want to take a look at this problem you
> might "start" by looking at the console and then build your own.
Simon, thank you for useful answer.
If I understand right the solution will look like:
main web-app (actually just a reassembled HTTP bridge.was) with our core
functionality (also realized as plugins) deployed on server in ordinary
fashion. web-app starts our logic by auto-starting our plugin(s).
Code in our main plugin starts to watch at some dir (say /extensions)
and when found that new extension-plugin appears or old extension-plugin
has changed then the main logic propagates the change set among the all
cluster nodes. And all cluster nodes refreshes Equinox runtime by
starting_new/restarting the extension-plugin.
Right?
And console app is good example of how to makes these refreshing
dynamically. Right?
Thanks in advance.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02877 seconds