I share your sentiments. You could just deploy Felix HttpService and use
that to deploy your webapp. Your webapp then becomes more of a jar deployed
on the OSGI container and less dependent on all the gazillions of several MB
jars of PAX, CXF etc. The HttpService is a bit more limited that a full web
container like Tomcat but it embeds Jetty (if you so choose) so underneath
you could just hack that to expose more functionality if that is a problem.
Well, how big an effort it gets for you is a factor of course. So maybe just
give it a try if you are interested. I have done my webapp with HttpService.
It is nice and relatively lightweight and mostly enough for me. But you get
all the nasty OSGI features with classloading, less documentation and
experiences to help with your problems, and some difficulties to access more
advanced Jetty features. But thats a choice..

2011/4/6 Daniele Dellafiore <[email protected]>

> Hi. I am trying to achive this goal.
> What do I hate the most of webapp development in java? That to put a webapp
> online after you've changed a single line of code, you have to deploy a
> whole war. Now, I can manage to reduce the war by hand to be around 1 MB
> but
> yet is too big, and also complicated: I have to put by hand all the jars in
> a JEE/lib folder and keep them alignet, by hand.
> Then what if I do not change the webapp bundle but just a dep? I have to
> repackage. For me this is hell. Moreover, the JEE containers itself is
> hell.
>
>
> Enter OSGI. What I want to achieve is deploy a webapp as a JAR, not as a
> WAR. Or a war, but without the dependencies.
>
> The war belongs to the idea of being a super package with all the dep in
> it.
> I want to deploy a jar with a web.xml, but it seems that no one ever did
> this and I have no idea how to do this. W
> With this solution, my modularized app can be deployed in seconds cause
> every jar is just a few Kb of data, eitehr the webapp jar than the jar it
> depends upon.
>
> Any tip for this? All the pax-web stuff are really targetted to deploy a
> war.
> I think that even a custom solution with some custom code to start a
> servlet
> container and it's web.xml from an osgi Activator would be better than the
> standard jee hell.
>
>
> --
> Daniele Dellafiore
> http://danieledellafiore.net
>

Reply via email to