Simon Willnauer wrote:
Also, feel free to ask more questions on this list.
There we go.. I guess I got the idea of OSGi / Felix and build a nice
simple example adding bundles and using them. The application I wanna
refactor to make extensive use of felix basically runs in a
servletcontainer
and is shipped as a warfile. It seems a bit weak to me to use the osgi
HttpService as a lot of configurations for the container are not
visible as
far as I can see. So anyway I'm interested in a "best practice" way to
integrate felix. Is it as simple as I think it would be just starting
up a
new Felix instance (Felix f = new Felix() ... bla bla) within a context
listener and register several servlets in the web.xml which make use of
services provided by felix?
Am I on the wrong way with this approach?
I know some people have experimented with Oscar/Felix inside of a
servlet container, but I am not really sure if there is a best approach
to this or not...to some degree it seems that it would be dependent on
the servlet container implementation.
But starting up Felix is basically just creating an instance with the
appropriate properties for your situation. I have started a document
about launching and embedding Felix:
http://cwiki.apache.org/FELIX/launching-and-embedding-felix.html
It is not done yet, since I got pulled away on other things, but it
might be of some help as it is.
-> richard