You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Don Brown <mr...@twdata.org> on 2007/07/29 16:42:56 UTC
[s2] Struts 2 OSGi Plugin
Writing an OSGi plugin for Struts 2 has been something I've been
playing with on and off since I put in place the Struts 2 plugin
architecture, and I finally completed an end-to-end functional spike
of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
allow Struts 2 developers to write their applications such that they
can install, upgrade, and uninstall sections of it at a time without
restarting or reloading the whole application or application server.
Think how nice it would be to install a new admin tool in your public,
heavily-used web application without affecting any users, or fixing a
critical bug without, again, taking the application down even for a
few seconds.
The Struts 2 OSGi plugin allows you to separate your application into
jars (called bundles), each containing a struts.xml file, Action
classes, and Velocity (for now) files. Just by adding a few lines in
the jar's manifest.mf:
Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
Export-Package: com.mycompany.myapp.actions
Bundle-Version: 1.0.0
Bundle-SymbolicName: foo.actions
The jar is ready to be deployed. Drop the jar into the
/WEB-INF/classes/bundles directory and it will automatically be
installed when the application starts up.
As this was a spike, there are a bunch of limitations and missing
features such as:
* Only Velocity templates are supported
* Application classes, including third-party jars such as Spring, will
probably not be available in bundles
* No GUI to install, upgrade, and uninstall bundles at runtime
* Bundles cannot contain beans or constants (will probably never be allowed)
* Most likely improper OSGi usage
Still, the code is functional and available in the Struts sandbox:
http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
One of my side goals in this project is to hide as much of OSGi from
the Struts 2 developer as possible, so that bundles will be easy to
write and deploy. Therefore, there is probably a lot of OSGi that is
hidden, which OSGi experts would lament, but the main goal is to allow
Struts actions to be hot deployable, and I think this plugin could
make it happen.
Don
-- copied from my blog post for those too lazy to click links:
http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Martin Cooper <ma...@apache.org>.
On Mon, Jul 14, 2008 at 8:18 PM, Don Brown <do...@gmail.com> wrote:
> The key problem is JSP files cannot be packaged in a JAR, which is the
> default format of a bundle. The way systems like Sling and Spring
> Application Platform get around it is by embedding a Tomcat or Jetty
> instance within the OSGi container, then adding OSGi headers to the
> war manifest and deploying it as an OSGi bundle. The hybrid approach
> taking by the OSGi plugin puts an OSGi container in an existing
> webapp, but doesn't try to run a second application server in OSGi
> space, therefore JSP's won't work without significantly modifying a
> JSP compiler, and besides, Sun has basically deprecated JSP's in favor
> of JSF and even replacing JSP with Facelets in JSP 2.0. Velocity or
> Freemarker templates are so much easier to develop, test, and debug,
> so I don't really see the loss.
To add to what Don says above, I see more and more people moving away from
JSP, and towards solutions like Velocity and FreeMarker, to get away from
all the frustrating limitations of JSP, standard or no standard. This is
especially true as people move away from the old "render the UI on the
server and ship it to the client" model of web app development and towards
newer rich client models based on JSON or XML data transfer, since the need
for a templating language is vastly reduced in such environments.
--
Martin Cooper
>
> Don
>
> On Tue, Jul 15, 2008 at 1:12 PM, alvins <al...@hotmail.com> wrote:
> >
> > I would think JSP support would have to be mandatory for wide
> acceptance?? I
> > know in the alpha plugin you are using is Apache Felix as the OSGi
> container
> > but Equinox is building in JSP support (they also have a struts example)
> -
> > http://www.eclipse.org/equinox/server/jsp_support.php.
> >
> >
> > Don Brown-2 wrote:
> >>
> >> It all depends on the approach. Currently, JSP's aren't supported and
> >> in fact, I doubt they will ever be supported. If tiles can work with
> >> Freemarker or Velocity, then I don't see why we couldn't get it
> >> working.
> >>
> >> Don
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18457332.html
> > Sent from the Struts - Dev mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: [s2] Struts 2 OSGi Plugin
Posted by alvins <al...@hotmail.com>.
Had a closer look into the jsp equinox handling and it looks like there is
active development going on to support this -
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox.jsp.jasper/.
>From what I have read (also did a quick test) the equinox servlet bridge can
run in either container embedded into osgi platform or osgi embedded into
container platform.
--
View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18542814.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Musachy Barroso <mu...@gmail.com>.
yeah, it was so elegant that when I finished it, I said to myslef,
"now this is some some piece of work" and deleted it :). Then I though
of maybe borrowing the code from tomcat for the jsp parser/compiler,
and that was a no-go also.
musachy
On Tue, Jul 15, 2008 at 12:40 AM, alvins <al...@hotmail.com> wrote:
>
> On that - Musachy attempted a hack (=p) a while ago it seems -
> http://www.nabble.com/forum/ViewPost.jtp?post=9913464&framed=y - lol..
> --
> View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18457983.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by alvins <al...@hotmail.com>.
On that - Musachy attempted a hack (=p) a while ago it seems -
http://www.nabble.com/forum/ViewPost.jtp?post=9913464&framed=y - lol..
--
View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18457983.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by alvins <al...@hotmail.com>.
Ahh i see. The reason I can see that people would really want it is the
transition to OSGi would be less painful. People don't want to do too much
rewriting. So far to move to OSGi it is not too difficult and does not
require too much change to an existing project. But if there is no JSP
support it will prove quite difficult and will be difficult to get buy-in
initially I think.
Alvin
Don Brown wrote:
>
> The key problem is JSP files cannot be packaged in a JAR, which is the
> default format of a bundle. The way systems like Sling and Spring
> Application Platform get around it is by embedding a Tomcat or Jetty
> instance within the OSGi container, then adding OSGi headers to the
> war manifest and deploying it as an OSGi bundle. The hybrid approach
> taking by the OSGi plugin puts an OSGi container in an existing
> webapp, but doesn't try to run a second application server in OSGi
> space, therefore JSP's won't work without significantly modifying a
> JSP compiler, and besides, Sun has basically deprecated JSP's in favor
> of JSF and even replacing JSP with Facelets in JSP 2.0. Velocity or
> Freemarker templates are so much easier to develop, test, and debug,
> so I don't really see the loss.
>
> Don
>
--
View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18457942.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Don Brown <do...@gmail.com>.
The key problem is JSP files cannot be packaged in a JAR, which is the
default format of a bundle. The way systems like Sling and Spring
Application Platform get around it is by embedding a Tomcat or Jetty
instance within the OSGi container, then adding OSGi headers to the
war manifest and deploying it as an OSGi bundle. The hybrid approach
taking by the OSGi plugin puts an OSGi container in an existing
webapp, but doesn't try to run a second application server in OSGi
space, therefore JSP's won't work without significantly modifying a
JSP compiler, and besides, Sun has basically deprecated JSP's in favor
of JSF and even replacing JSP with Facelets in JSP 2.0. Velocity or
Freemarker templates are so much easier to develop, test, and debug,
so I don't really see the loss.
Don
On Tue, Jul 15, 2008 at 1:12 PM, alvins <al...@hotmail.com> wrote:
>
> I would think JSP support would have to be mandatory for wide acceptance?? I
> know in the alpha plugin you are using is Apache Felix as the OSGi container
> but Equinox is building in JSP support (they also have a struts example) -
> http://www.eclipse.org/equinox/server/jsp_support.php.
>
>
> Don Brown-2 wrote:
>>
>> It all depends on the approach. Currently, JSP's aren't supported and
>> in fact, I doubt they will ever be supported. If tiles can work with
>> Freemarker or Velocity, then I don't see why we couldn't get it
>> working.
>>
>> Don
>>
>
> --
> View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18457332.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by alvins <al...@hotmail.com>.
I would think JSP support would have to be mandatory for wide acceptance?? I
know the example you are using is Apache Felix as the OSGi container but
Equinox is building in JSP support (they also have a struts example) -
http://www.eclipse.org/equinox/server/jsp_support.php.
Don Brown-2 wrote:
>
> It all depends on the approach. Currently, JSP's aren't supported and
> in fact, I doubt they will ever be supported. If tiles can work with
> Freemarker or Velocity, then I don't see why we couldn't get it
> working.
>
> Don
>
--
View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18457332.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Don Brown <do...@gmail.com>.
Well, at least in my experience so far, for libraries, it is usually
enough to take the default manifest, if there is a version of the jar
available that has one, but for frameworks, you may want to customize
exactly what packages are depended upon and, more importantly, what
dependencies are bundled in the jar. For example, for the Struts 2
bundle, I wanted XWork, OGNL, Freemarker, and several Struts 2 plugins
in the bundle, so I ended up constructing my own bundle with its own
OSGi headers. Freemarker just wasn't working, for whatever reason,
when deployed as its own bundle, and packaging the rest of the deps
into the struts bundle made deployment a lot easier. I've found if
you can reduce the number of bundles you deploy, the less complicated
your life will become.
That said, adding OSGi manifest entries to your library would
certainly be appreciated.
Don
On Mon, Jul 14, 2008 at 5:42 PM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2008/7/14 Don Brown <do...@gmail.com>:
>> Actually, that bit isn't a problem - we could bundle the tiles jars in
>> the struts 2 tiles plugin and generate the manifest for both
>> automatically.
>
> Sorry for the dumb question, but does "bundling" mean "decompress and
> recompress together"? IMHO it's easier to add a bunch of lines in the
> manifest of Tiles jars than decompressing and recompressing jars.
> I suppose it's not difficult, so probably it could be added in Tiles
> 2.0.7 (the latest version is 2.0.6).
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/14 Don Brown <do...@gmail.com>:
> Actually, that bit isn't a problem - we could bundle the tiles jars in
> the struts 2 tiles plugin and generate the manifest for both
> automatically.
Sorry for the dumb question, but does "bundling" mean "decompress and
recompress together"? IMHO it's easier to add a bunch of lines in the
manifest of Tiles jars than decompressing and recompressing jars.
I suppose it's not difficult, so probably it could be added in Tiles
2.0.7 (the latest version is 2.0.6).
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Don Brown <do...@gmail.com>.
On Mon, Jul 14, 2008 at 5:31 PM, Antonio Petrelli
<an...@gmail.com> wrote:
> 2008/7/14 Don Brown <mr...@twdata.org>:
>> It all depends on the approach. Currently, JSP's aren't supported and
>> in fact, I doubt they will ever be supported. If tiles can work with
>> Freemarker or Velocity, then I don't see why we couldn't get it
>> working.
>
> Currently Tiles can use only JSP and FreeMarker.
> Then, for the properties of intersection, only FreeMarker is supported
> with OSGi... Well probably not since the jars of Tiles are not
> OSGi-compatible.
Actually, that bit isn't a problem - we could bundle the tiles jars in
the struts 2 tiles plugin and generate the manifest for both
automatically. In fact, to get Struts 2 working in an OSGi container,
I've had to basically create a bundle containing Struts 2 jars and
select dependencies, and I'm finding that the OSGi headers you want
basically depends on the deployment strategy you want to take (what
plugins are you using, are you bundling freemarker, etc).
Don
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/14 Don Brown <mr...@twdata.org>:
> It all depends on the approach. Currently, JSP's aren't supported and
> in fact, I doubt they will ever be supported. If tiles can work with
> Freemarker or Velocity, then I don't see why we couldn't get it
> working.
Currently Tiles can use only JSP and FreeMarker.
Then, for the properties of intersection, only FreeMarker is supported
with OSGi... Well probably not since the jars of Tiles are not
OSGi-compatible.
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Don Brown <mr...@twdata.org>.
It all depends on the approach. Currently, JSP's aren't supported and
in fact, I doubt they will ever be supported. If tiles can work with
Freemarker or Velocity, then I don't see why we couldn't get it
working.
Don
On Mon, Jul 14, 2008 at 10:36 AM, alvins <al...@hotmail.com> wrote:
>
> Thanks for that Don - great to hear. I would also be interested to know if it
> will have Struts tiles support? Any idea when you think this might land?
>
>
> Don Brown wrote:
>>
>> I'm actually in the middle of a pretty large rollout of OSGi as the
>> basis of the new Atlassian (JIRA, Confluence, etc) plugin framework,
>> which uses an embedded Felix, Spring DM, and supporting code to enable
>> the hybrid architecture. I want to get that into shipping versions of
>> several of our products before coming back to this plugin, as I think
>> code that has been extracted from production systems is generally
>> better than that which was dreamed up from nothing. Speaking of
>> dreamed up code, I've also become more aware of the shortcomings of
>> the codebehind plugin, and am looking forward to transitioning to the
>> convention plugin in 2.2. Speaking of 2.2, don't forget to close out
>> 2.1 bugs so we can get that out the door! :)
>>
>> Don
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18435680.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by alvins <al...@hotmail.com>.
Thanks for that Don - great to hear. I would also be interested to know if it
will have Struts tiles support? Any idea when you think this might land?
Don Brown wrote:
>
> I'm actually in the middle of a pretty large rollout of OSGi as the
> basis of the new Atlassian (JIRA, Confluence, etc) plugin framework,
> which uses an embedded Felix, Spring DM, and supporting code to enable
> the hybrid architecture. I want to get that into shipping versions of
> several of our products before coming back to this plugin, as I think
> code that has been extracted from production systems is generally
> better than that which was dreamed up from nothing. Speaking of
> dreamed up code, I've also become more aware of the shortcomings of
> the codebehind plugin, and am looking forward to transitioning to the
> convention plugin in 2.2. Speaking of 2.2, don't forget to close out
> 2.1 bugs so we can get that out the door! :)
>
> Don
>
>
--
View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18435680.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Don Brown <do...@gmail.com>.
I'm actually in the middle of a pretty large rollout of OSGi as the
basis of the new Atlassian (JIRA, Confluence, etc) plugin framework,
which uses an embedded Felix, Spring DM, and supporting code to enable
the hybrid architecture. I want to get that into shipping versions of
several of our products before coming back to this plugin, as I think
code that has been extracted from production systems is generally
better than that which was dreamed up from nothing. Speaking of
dreamed up code, I've also become more aware of the shortcomings of
the codebehind plugin, and am looking forward to transitioning to the
convention plugin in 2.2. Speaking of 2.2, don't forget to close out
2.1 bugs so we can get that out the door! :)
Don
On Sat, Jul 12, 2008 at 2:44 PM, Musachy Barroso <mu...@gmail.com> wrote:
> There is a service(felix bundle) that polls a directory an install
> uninstalls bundles, but it is kind of buggy still, that's why it is
> commented out in the plugin. An interface to upload bundles and
> install them the would be nice, I was going to work on it but got
> distracted by the convention plugin :). The spring integration also
> needs some polishing, and then we need to make it work with the
> convention plugin, but that's another story.
>
> musachy
>
> On Fri, Jul 11, 2008 at 11:51 PM, alvins <al...@hotmail.com> wrote:
>>
>> Hi Don,
>>
>> I wanted to start working on this where you left off (excellent work btw!).
>> Was thinking of starting with the GUI management to install, uninstall etc.
>> Wanted to make sure there isn't someone already doing this so don't
>> duplicate.. Or if you had any other plans?
>>
>> Alvin
>>
>> btw. sorry I pressed the wrong button so you may get an email
>>
>>
>> Don Brown-2 wrote:
>>>
>>> At this point, the /bundles directory is only read on startup, however, it
>>> wouldn't be too hard to add a polling scanner. The better solution will
>>> be
>>> to write a GUI that will let you install, uninstall, and upgrade bundles
>>> at
>>> runtime.
>>>
>>> Don
>>>
>>> On 7/30/07, Frank W. Zammetti <fz...@omnytex.com> wrote:
>>>>
>>>> Don, could you clarify something for me? You say "Drop the jar into the
>>>> /WEB-INF/classes/bundles directory and it will automatically be
>>>> installed when the application starts up" ... so if I have a running
>>>> application, I have to restart it for the deploy to happen... is that
>>>> restart always going to be necessary, or is that just a side-effect of
>>>> this being an early release?
>>>>
>>>> Frank
>>>>
>>>> Don Brown wrote:
>>>> > Writing an OSGi plugin for Struts 2 has been something I've been
>>>> > playing with on and off since I put in place the Struts 2 plugin
>>>> > architecture, and I finally completed an end-to-end functional spike
>>>> > of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
>>>> > allow Struts 2 developers to write their applications such that they
>>>> > can install, upgrade, and uninstall sections of it at a time without
>>>> > restarting or reloading the whole application or application server.
>>>> > Think how nice it would be to install a new admin tool in your public,
>>>> > heavily-used web application without affecting any users, or fixing a
>>>> > critical bug without, again, taking the application down even for a
>>>> > few seconds.
>>>> >
>>>> > The Struts 2 OSGi plugin allows you to separate your application into
>>>> > jars (called bundles), each containing a struts.xml file, Action
>>>> > classes, and Velocity (for now) files. Just by adding a few lines in
>>>> > the jar's manifest.mf:
>>>> >
>>>> > Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
>>>> > Export-Package: com.mycompany.myapp.actions
>>>> > Bundle-Version: 1.0.0
>>>> > Bundle-SymbolicName: foo.actions
>>>> >
>>>> > The jar is ready to be deployed. Drop the jar into the
>>>> > /WEB-INF/classes/bundles directory and it will automatically be
>>>> > installed when the application starts up.
>>>> >
>>>> > As this was a spike, there are a bunch of limitations and missing
>>>> > features such as:
>>>> > * Only Velocity templates are supported
>>>> > * Application classes, including third-party jars such as Spring, will
>>>> > probably not be available in bundles
>>>> > * No GUI to install, upgrade, and uninstall bundles at runtime
>>>> > * Bundles cannot contain beans or constants (will probably never be
>>>> allowed)
>>>> > * Most likely improper OSGi usage
>>>> >
>>>> > Still, the code is functional and available in the Struts sandbox:
>>>> >
>>>> >
>>>> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
>>>> >
>>>> > One of my side goals in this project is to hide as much of OSGi from
>>>> > the Struts 2 developer as possible, so that bundles will be easy to
>>>> > write and deploy. Therefore, there is probably a lot of OSGi that is
>>>> > hidden, which OSGi experts would lament, but the main goal is to allow
>>>> > Struts actions to be hot deployable, and I think this plugin could
>>>> > make it happen.
>>>> >
>>>> > Don
>>>> >
>>>> > -- copied from my blog post for those too lazy to click links:
>>>> > http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> > For additional commands, e-mail: dev-help@struts.apache.org
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>>
>>>> --
>>>> --
>>>> Frank W. Zammetti
>>>> Founder and Chief Software Architect
>>>> Omnytex Technologies
>>>> http://www.omnytex.com
>>>> AIM/Yahoo: fzammetti
>>>> MSN: fzammetti@hotmail.com
>>>> Author of "Practical Ajax Projects With Java Technology"
>>>> (2006, Apress, ISBN 1-59059-695-1)
>>>> and "JavaScript, DOM Scripting and Ajax Projects"
>>>> (2007, Apress, ISBN 1-59059-816-4)
>>>> Java Web Parts - http://javawebparts.sourceforge.net
>>>> Supplying the wheel, so you don't have to reinvent it!
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18415829.html
>> Sent from the Struts - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Musachy Barroso <mu...@gmail.com>.
There is a service(felix bundle) that polls a directory an install
uninstalls bundles, but it is kind of buggy still, that's why it is
commented out in the plugin. An interface to upload bundles and
install them the would be nice, I was going to work on it but got
distracted by the convention plugin :). The spring integration also
needs some polishing, and then we need to make it work with the
convention plugin, but that's another story.
musachy
On Fri, Jul 11, 2008 at 11:51 PM, alvins <al...@hotmail.com> wrote:
>
> Hi Don,
>
> I wanted to start working on this where you left off (excellent work btw!).
> Was thinking of starting with the GUI management to install, uninstall etc.
> Wanted to make sure there isn't someone already doing this so don't
> duplicate.. Or if you had any other plans?
>
> Alvin
>
> btw. sorry I pressed the wrong button so you may get an email
>
>
> Don Brown-2 wrote:
>>
>> At this point, the /bundles directory is only read on startup, however, it
>> wouldn't be too hard to add a polling scanner. The better solution will
>> be
>> to write a GUI that will let you install, uninstall, and upgrade bundles
>> at
>> runtime.
>>
>> Don
>>
>> On 7/30/07, Frank W. Zammetti <fz...@omnytex.com> wrote:
>>>
>>> Don, could you clarify something for me? You say "Drop the jar into the
>>> /WEB-INF/classes/bundles directory and it will automatically be
>>> installed when the application starts up" ... so if I have a running
>>> application, I have to restart it for the deploy to happen... is that
>>> restart always going to be necessary, or is that just a side-effect of
>>> this being an early release?
>>>
>>> Frank
>>>
>>> Don Brown wrote:
>>> > Writing an OSGi plugin for Struts 2 has been something I've been
>>> > playing with on and off since I put in place the Struts 2 plugin
>>> > architecture, and I finally completed an end-to-end functional spike
>>> > of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
>>> > allow Struts 2 developers to write their applications such that they
>>> > can install, upgrade, and uninstall sections of it at a time without
>>> > restarting or reloading the whole application or application server.
>>> > Think how nice it would be to install a new admin tool in your public,
>>> > heavily-used web application without affecting any users, or fixing a
>>> > critical bug without, again, taking the application down even for a
>>> > few seconds.
>>> >
>>> > The Struts 2 OSGi plugin allows you to separate your application into
>>> > jars (called bundles), each containing a struts.xml file, Action
>>> > classes, and Velocity (for now) files. Just by adding a few lines in
>>> > the jar's manifest.mf:
>>> >
>>> > Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
>>> > Export-Package: com.mycompany.myapp.actions
>>> > Bundle-Version: 1.0.0
>>> > Bundle-SymbolicName: foo.actions
>>> >
>>> > The jar is ready to be deployed. Drop the jar into the
>>> > /WEB-INF/classes/bundles directory and it will automatically be
>>> > installed when the application starts up.
>>> >
>>> > As this was a spike, there are a bunch of limitations and missing
>>> > features such as:
>>> > * Only Velocity templates are supported
>>> > * Application classes, including third-party jars such as Spring, will
>>> > probably not be available in bundles
>>> > * No GUI to install, upgrade, and uninstall bundles at runtime
>>> > * Bundles cannot contain beans or constants (will probably never be
>>> allowed)
>>> > * Most likely improper OSGi usage
>>> >
>>> > Still, the code is functional and available in the Struts sandbox:
>>> >
>>> >
>>> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
>>> >
>>> > One of my side goals in this project is to hide as much of OSGi from
>>> > the Struts 2 developer as possible, so that bundles will be easy to
>>> > write and deploy. Therefore, there is probably a lot of OSGi that is
>>> > hidden, which OSGi experts would lament, but the main goal is to allow
>>> > Struts actions to be hot deployable, and I think this plugin could
>>> > make it happen.
>>> >
>>> > Don
>>> >
>>> > -- copied from my blog post for those too lazy to click links:
>>> > http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> > For additional commands, e-mail: dev-help@struts.apache.org
>>> >
>>> >
>>> >
>>> >
>>> >
>>>
>>> --
>>> --
>>> Frank W. Zammetti
>>> Founder and Chief Software Architect
>>> Omnytex Technologies
>>> http://www.omnytex.com
>>> AIM/Yahoo: fzammetti
>>> MSN: fzammetti@hotmail.com
>>> Author of "Practical Ajax Projects With Java Technology"
>>> (2006, Apress, ISBN 1-59059-695-1)
>>> and "JavaScript, DOM Scripting and Ajax Projects"
>>> (2007, Apress, ISBN 1-59059-816-4)
>>> Java Web Parts - http://javawebparts.sourceforge.net
>>> Supplying the wheel, so you don't have to reinvent it!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18415829.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by alvins <al...@hotmail.com>.
Hi Don,
I wanted to start working on this where you left off (excellent work btw!).
Was thinking of starting with the GUI management to install, uninstall etc.
Wanted to make sure there isn't someone already doing this so don't
duplicate.. Or if you had any other plans?
Alvin
btw. sorry I pressed the wrong button so you may get an email
Don Brown-2 wrote:
>
> At this point, the /bundles directory is only read on startup, however, it
> wouldn't be too hard to add a polling scanner. The better solution will
> be
> to write a GUI that will let you install, uninstall, and upgrade bundles
> at
> runtime.
>
> Don
>
> On 7/30/07, Frank W. Zammetti <fz...@omnytex.com> wrote:
>>
>> Don, could you clarify something for me? You say "Drop the jar into the
>> /WEB-INF/classes/bundles directory and it will automatically be
>> installed when the application starts up" ... so if I have a running
>> application, I have to restart it for the deploy to happen... is that
>> restart always going to be necessary, or is that just a side-effect of
>> this being an early release?
>>
>> Frank
>>
>> Don Brown wrote:
>> > Writing an OSGi plugin for Struts 2 has been something I've been
>> > playing with on and off since I put in place the Struts 2 plugin
>> > architecture, and I finally completed an end-to-end functional spike
>> > of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
>> > allow Struts 2 developers to write their applications such that they
>> > can install, upgrade, and uninstall sections of it at a time without
>> > restarting or reloading the whole application or application server.
>> > Think how nice it would be to install a new admin tool in your public,
>> > heavily-used web application without affecting any users, or fixing a
>> > critical bug without, again, taking the application down even for a
>> > few seconds.
>> >
>> > The Struts 2 OSGi plugin allows you to separate your application into
>> > jars (called bundles), each containing a struts.xml file, Action
>> > classes, and Velocity (for now) files. Just by adding a few lines in
>> > the jar's manifest.mf:
>> >
>> > Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
>> > Export-Package: com.mycompany.myapp.actions
>> > Bundle-Version: 1.0.0
>> > Bundle-SymbolicName: foo.actions
>> >
>> > The jar is ready to be deployed. Drop the jar into the
>> > /WEB-INF/classes/bundles directory and it will automatically be
>> > installed when the application starts up.
>> >
>> > As this was a spike, there are a bunch of limitations and missing
>> > features such as:
>> > * Only Velocity templates are supported
>> > * Application classes, including third-party jars such as Spring, will
>> > probably not be available in bundles
>> > * No GUI to install, upgrade, and uninstall bundles at runtime
>> > * Bundles cannot contain beans or constants (will probably never be
>> allowed)
>> > * Most likely improper OSGi usage
>> >
>> > Still, the code is functional and available in the Struts sandbox:
>> >
>> >
>> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
>> >
>> > One of my side goals in this project is to hide as much of OSGi from
>> > the Struts 2 developer as possible, so that bundles will be easy to
>> > write and deploy. Therefore, there is probably a lot of OSGi that is
>> > hidden, which OSGi experts would lament, but the main goal is to allow
>> > Struts actions to be hot deployable, and I think this plugin could
>> > make it happen.
>> >
>> > Don
>> >
>> > -- copied from my blog post for those too lazy to click links:
>> > http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: dev-help@struts.apache.org
>> >
>> >
>> >
>> >
>> >
>>
>> --
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>> AIM/Yahoo: fzammetti
>> MSN: fzammetti@hotmail.com
>> Author of "Practical Ajax Projects With Java Technology"
>> (2006, Apress, ISBN 1-59059-695-1)
>> and "JavaScript, DOM Scripting and Ajax Projects"
>> (2007, Apress, ISBN 1-59059-816-4)
>> Java Web Parts - http://javawebparts.sourceforge.net
>> Supplying the wheel, so you don't have to reinvent it!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
--
View this message in context: http://www.nabble.com/-s2--Struts-2-OSGi-Plugin-tp11851951p18415829.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Cool, I look forward to either of those... even though I'm not using S2
in production yet, it'd be a nice feature to see, really true
hot-loading. Thanks Don!
Frank
Don Brown wrote:
> At this point, the /bundles directory is only read on startup, however, it
> wouldn't be too hard to add a polling scanner. The better solution will be
> to write a GUI that will let you install, uninstall, and upgrade bundles at
> runtime.
>
> Don
>
> On 7/30/07, Frank W. Zammetti <fz...@omnytex.com> wrote:
>> Don, could you clarify something for me? You say "Drop the jar into the
>> /WEB-INF/classes/bundles directory and it will automatically be
>> installed when the application starts up" ... so if I have a running
>> application, I have to restart it for the deploy to happen... is that
>> restart always going to be necessary, or is that just a side-effect of
>> this being an early release?
>>
>> Frank
>>
>> Don Brown wrote:
>>> Writing an OSGi plugin for Struts 2 has been something I've been
>>> playing with on and off since I put in place the Struts 2 plugin
>>> architecture, and I finally completed an end-to-end functional spike
>>> of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
>>> allow Struts 2 developers to write their applications such that they
>>> can install, upgrade, and uninstall sections of it at a time without
>>> restarting or reloading the whole application or application server.
>>> Think how nice it would be to install a new admin tool in your public,
>>> heavily-used web application without affecting any users, or fixing a
>>> critical bug without, again, taking the application down even for a
>>> few seconds.
>>>
>>> The Struts 2 OSGi plugin allows you to separate your application into
>>> jars (called bundles), each containing a struts.xml file, Action
>>> classes, and Velocity (for now) files. Just by adding a few lines in
>>> the jar's manifest.mf:
>>>
>>> Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
>>> Export-Package: com.mycompany.myapp.actions
>>> Bundle-Version: 1.0.0
>>> Bundle-SymbolicName: foo.actions
>>>
>>> The jar is ready to be deployed. Drop the jar into the
>>> /WEB-INF/classes/bundles directory and it will automatically be
>>> installed when the application starts up.
>>>
>>> As this was a spike, there are a bunch of limitations and missing
>>> features such as:
>>> * Only Velocity templates are supported
>>> * Application classes, including third-party jars such as Spring, will
>>> probably not be available in bundles
>>> * No GUI to install, upgrade, and uninstall bundles at runtime
>>> * Bundles cannot contain beans or constants (will probably never be
>> allowed)
>>> * Most likely improper OSGi usage
>>>
>>> Still, the code is functional and available in the Struts sandbox:
>>>
>>>
>> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
>>> One of my side goals in this project is to hide as much of OSGi from
>>> the Struts 2 developer as possible, so that bundles will be easy to
>>> write and deploy. Therefore, there is probably a lot of OSGi that is
>>> hidden, which OSGi experts would lament, but the main goal is to allow
>>> Struts actions to be hot deployable, and I think this plugin could
>>> make it happen.
>>>
>>> Don
>>>
>>> -- copied from my blog post for those too lazy to click links:
>>> http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: dev-help@struts.apache.org
>>>
>>>
>>>
>>>
>>>
>> --
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>> AIM/Yahoo: fzammetti
>> MSN: fzammetti@hotmail.com
>> Author of "Practical Ajax Projects With Java Technology"
>> (2006, Apress, ISBN 1-59059-695-1)
>> and "JavaScript, DOM Scripting and Ajax Projects"
>> (2007, Apress, ISBN 1-59059-816-4)
>> Java Web Parts - http://javawebparts.sourceforge.net
>> Supplying the wheel, so you don't have to reinvent it!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.10.23/924 - Release Date: 7/28/2007 3:50 PM
--
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
(2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Don Brown <mr...@twdata.org>.
At this point, the /bundles directory is only read on startup, however, it
wouldn't be too hard to add a polling scanner. The better solution will be
to write a GUI that will let you install, uninstall, and upgrade bundles at
runtime.
Don
On 7/30/07, Frank W. Zammetti <fz...@omnytex.com> wrote:
>
> Don, could you clarify something for me? You say "Drop the jar into the
> /WEB-INF/classes/bundles directory and it will automatically be
> installed when the application starts up" ... so if I have a running
> application, I have to restart it for the deploy to happen... is that
> restart always going to be necessary, or is that just a side-effect of
> this being an early release?
>
> Frank
>
> Don Brown wrote:
> > Writing an OSGi plugin for Struts 2 has been something I've been
> > playing with on and off since I put in place the Struts 2 plugin
> > architecture, and I finally completed an end-to-end functional spike
> > of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
> > allow Struts 2 developers to write their applications such that they
> > can install, upgrade, and uninstall sections of it at a time without
> > restarting or reloading the whole application or application server.
> > Think how nice it would be to install a new admin tool in your public,
> > heavily-used web application without affecting any users, or fixing a
> > critical bug without, again, taking the application down even for a
> > few seconds.
> >
> > The Struts 2 OSGi plugin allows you to separate your application into
> > jars (called bundles), each containing a struts.xml file, Action
> > classes, and Velocity (for now) files. Just by adding a few lines in
> > the jar's manifest.mf:
> >
> > Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
> > Export-Package: com.mycompany.myapp.actions
> > Bundle-Version: 1.0.0
> > Bundle-SymbolicName: foo.actions
> >
> > The jar is ready to be deployed. Drop the jar into the
> > /WEB-INF/classes/bundles directory and it will automatically be
> > installed when the application starts up.
> >
> > As this was a spike, there are a bunch of limitations and missing
> > features such as:
> > * Only Velocity templates are supported
> > * Application classes, including third-party jars such as Spring, will
> > probably not be available in bundles
> > * No GUI to install, upgrade, and uninstall bundles at runtime
> > * Bundles cannot contain beans or constants (will probably never be
> allowed)
> > * Most likely improper OSGi usage
> >
> > Still, the code is functional and available in the Struts sandbox:
> >
> >
> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
> >
> > One of my side goals in this project is to hide as much of OSGi from
> > the Struts 2 developer as possible, so that bundles will be easy to
> > write and deploy. Therefore, there is probably a lot of OSGi that is
> > hidden, which OSGi experts would lament, but the main goal is to allow
> > Struts actions to be hot deployable, and I think this plugin could
> > make it happen.
> >
> > Don
> >
> > -- copied from my blog post for those too lazy to click links:
> > http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
> >
> >
> >
>
> --
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Author of "Practical Ajax Projects With Java Technology"
> (2006, Apress, ISBN 1-59059-695-1)
> and "JavaScript, DOM Scripting and Ajax Projects"
> (2007, Apress, ISBN 1-59059-816-4)
> Java Web Parts - http://javawebparts.sourceforge.net
> Supplying the wheel, so you don't have to reinvent it!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: [s2] Struts 2 OSGi Plugin
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Don, could you clarify something for me? You say "Drop the jar into the
/WEB-INF/classes/bundles directory and it will automatically be
installed when the application starts up" ... so if I have a running
application, I have to restart it for the deploy to happen... is that
restart always going to be necessary, or is that just a side-effect of
this being an early release?
Frank
Don Brown wrote:
> Writing an OSGi plugin for Struts 2 has been something I've been
> playing with on and off since I put in place the Struts 2 plugin
> architecture, and I finally completed an end-to-end functional spike
> of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
> allow Struts 2 developers to write their applications such that they
> can install, upgrade, and uninstall sections of it at a time without
> restarting or reloading the whole application or application server.
> Think how nice it would be to install a new admin tool in your public,
> heavily-used web application without affecting any users, or fixing a
> critical bug without, again, taking the application down even for a
> few seconds.
>
> The Struts 2 OSGi plugin allows you to separate your application into
> jars (called bundles), each containing a struts.xml file, Action
> classes, and Velocity (for now) files. Just by adding a few lines in
> the jar's manifest.mf:
>
> Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
> Export-Package: com.mycompany.myapp.actions
> Bundle-Version: 1.0.0
> Bundle-SymbolicName: foo.actions
>
> The jar is ready to be deployed. Drop the jar into the
> /WEB-INF/classes/bundles directory and it will automatically be
> installed when the application starts up.
>
> As this was a spike, there are a bunch of limitations and missing
> features such as:
> * Only Velocity templates are supported
> * Application classes, including third-party jars such as Spring, will
> probably not be available in bundles
> * No GUI to install, upgrade, and uninstall bundles at runtime
> * Bundles cannot contain beans or constants (will probably never be allowed)
> * Most likely improper OSGi usage
>
> Still, the code is functional and available in the Struts sandbox:
>
> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
>
> One of my side goals in this project is to hide as much of OSGi from
> the Struts 2 developer as possible, so that bundles will be easy to
> write and deploy. Therefore, there is probably a lot of OSGi that is
> hidden, which OSGi experts would lament, but the main goal is to allow
> Struts actions to be hot deployable, and I think this plugin could
> make it happen.
>
> Don
>
> -- copied from my blog post for those too lazy to click links:
> http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>
>
--
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
Author of "Practical Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
(2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Don Brown <mr...@twdata.org>.
Cool. I'm trying to keep the plugin's wiki page up to date regarding its
usage, configuration options, etc., so it would be a good place to start:
http://cwiki.apache.org/S2PLUGINS/osgi-plugin.html
Don
On 7/30/07, Musachy Barroso <mu...@gmail.com> wrote:
>
> After spending a couple of days trying to implement this myself, I
> quited :). kudos to Don
>
> I will be playing with it soon :)
>
> musachy
>
> On 7/29/07, Don Brown <mr...@twdata.org> wrote:
> > Writing an OSGi plugin for Struts 2 has been something I've been
> > playing with on and off since I put in place the Struts 2 plugin
> > architecture, and I finally completed an end-to-end functional spike
> > of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
> > allow Struts 2 developers to write their applications such that they
> > can install, upgrade, and uninstall sections of it at a time without
> > restarting or reloading the whole application or application server.
> > Think how nice it would be to install a new admin tool in your public,
> > heavily-used web application without affecting any users, or fixing a
> > critical bug without, again, taking the application down even for a
> > few seconds.
> >
> > The Struts 2 OSGi plugin allows you to separate your application into
> > jars (called bundles), each containing a struts.xml file, Action
> > classes, and Velocity (for now) files. Just by adding a few lines in
> > the jar's manifest.mf:
> >
> > Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
> > Export-Package: com.mycompany.myapp.actions
> > Bundle-Version: 1.0.0
> > Bundle-SymbolicName: foo.actions
> >
> > The jar is ready to be deployed. Drop the jar into the
> > /WEB-INF/classes/bundles directory and it will automatically be
> > installed when the application starts up.
> >
> > As this was a spike, there are a bunch of limitations and missing
> > features such as:
> > * Only Velocity templates are supported
> > * Application classes, including third-party jars such as Spring, will
> > probably not be available in bundles
> > * No GUI to install, upgrade, and uninstall bundles at runtime
> > * Bundles cannot contain beans or constants (will probably never be
> allowed)
> > * Most likely improper OSGi usage
> >
> > Still, the code is functional and available in the Struts sandbox:
> >
> >
> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
> >
> > One of my side goals in this project is to hide as much of OSGi from
> > the Struts 2 developer as possible, so that bundles will be easy to
> > write and deploy. Therefore, there is probably a lot of OSGi that is
> > hidden, which OSGi experts would lament, but the main goal is to allow
> > Struts actions to be hot deployable, and I think this plugin could
> > make it happen.
> >
> > Don
> >
> > -- copied from my blog post for those too lazy to click links:
> > http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: [s2] Struts 2 OSGi Plugin
Posted by Musachy Barroso <mu...@gmail.com>.
After spending a couple of days trying to implement this myself, I
quited :). kudos to Don
I will be playing with it soon :)
musachy
On 7/29/07, Don Brown <mr...@twdata.org> wrote:
> Writing an OSGi plugin for Struts 2 has been something I've been
> playing with on and off since I put in place the Struts 2 plugin
> architecture, and I finally completed an end-to-end functional spike
> of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
> allow Struts 2 developers to write their applications such that they
> can install, upgrade, and uninstall sections of it at a time without
> restarting or reloading the whole application or application server.
> Think how nice it would be to install a new admin tool in your public,
> heavily-used web application without affecting any users, or fixing a
> critical bug without, again, taking the application down even for a
> few seconds.
>
> The Struts 2 OSGi plugin allows you to separate your application into
> jars (called bundles), each containing a struts.xml file, Action
> classes, and Velocity (for now) files. Just by adding a few lines in
> the jar's manifest.mf:
>
> Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
> Export-Package: com.mycompany.myapp.actions
> Bundle-Version: 1.0.0
> Bundle-SymbolicName: foo.actions
>
> The jar is ready to be deployed. Drop the jar into the
> /WEB-INF/classes/bundles directory and it will automatically be
> installed when the application starts up.
>
> As this was a spike, there are a bunch of limitations and missing
> features such as:
> * Only Velocity templates are supported
> * Application classes, including third-party jars such as Spring, will
> probably not be available in bundles
> * No GUI to install, upgrade, and uninstall bundles at runtime
> * Bundles cannot contain beans or constants (will probably never be allowed)
> * Most likely improper OSGi usage
>
> Still, the code is functional and available in the Struts sandbox:
>
> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
>
> One of my side goals in this project is to hide as much of OSGi from
> the Struts 2 developer as possible, so that bundles will be easy to
> write and deploy. Therefore, there is probably a lot of OSGi that is
> hidden, which OSGi experts would lament, but the main goal is to allow
> Struts actions to be hot deployable, and I think this plugin could
> make it happen.
>
> Don
>
> -- copied from my blog post for those too lazy to click links:
> http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: [s2] Struts 2 OSGi Plugin
Posted by Paul Benedict <pb...@apache.org>.
Kudos Don.
Don Brown wrote:
> Writing an OSGi plugin for Struts 2 has been something I've been
> playing with on and off since I put in place the Struts 2 plugin
> architecture, and I finally completed an end-to-end functional spike
> of such a beast. My motivation for a Struts 2 OSGi plugin is to easily
> allow Struts 2 developers to write their applications such that they
> can install, upgrade, and uninstall sections of it at a time without
> restarting or reloading the whole application or application server.
> Think how nice it would be to install a new admin tool in your public,
> heavily-used web application without affecting any users, or fixing a
> critical bug without, again, taking the application down even for a
> few seconds.
>
> The Struts 2 OSGi plugin allows you to separate your application into
> jars (called bundles), each containing a struts.xml file, Action
> classes, and Velocity (for now) files. Just by adding a few lines in
> the jar's manifest.mf:
>
> Bundle-Activator: org.apache.struts2.osgi.StrutsActivator
> Export-Package: com.mycompany.myapp.actions
> Bundle-Version: 1.0.0
> Bundle-SymbolicName: foo.actions
>
> The jar is ready to be deployed. Drop the jar into the
> /WEB-INF/classes/bundles directory and it will automatically be
> installed when the application starts up.
>
> As this was a spike, there are a bunch of limitations and missing
> features such as:
> * Only Velocity templates are supported
> * Application classes, including third-party jars such as Spring, will
> probably not be available in bundles
> * No GUI to install, upgrade, and uninstall bundles at runtime
> * Bundles cannot contain beans or constants (will probably never be allowed)
> * Most likely improper OSGi usage
>
> Still, the code is functional and available in the Struts sandbox:
>
> http://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2-osgi-plugin/
>
> One of my side goals in this project is to hide as much of OSGi from
> the Struts 2 developer as possible, so that bundles will be easy to
> write and deploy. Therefore, there is probably a lot of OSGi that is
> hidden, which OSGi experts would lament, but the main goal is to allow
> Struts actions to be hot deployable, and I think this plugin could
> make it happen.
>
> Don
>
> -- copied from my blog post for those too lazy to click links:
> http://www.jroller.com/mrdon/entry/struts_2_osgi_plugin_spike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org