Hi,

I would like to implement a web socket in an OSGi application that runs in Karaf.
I know Jetty 9.x comes with Pax-Web 4.x, which is itself used in Karaf 4.x.

However, I have a custom Karaf distribution based on 3.x (3.0.2 now).
And I wanted to use Pax-Web 4.1 with Karaf 3.x. Removing Pax-Web 3.x was easy. I then stopped Karaf and removed the *etc/jetty.xml* file, to prevent NoClassDefFound exceptions. When I restart Karaf, my former web applications work correctly. But I have errors with package imports in ...*karaf.http.core* and in the web console. This is related to the version of the *javax.servlet* package.

To be honest, I do not know what to do, hence this message.

1. One solution could be to switch to Karaf 4.x, but our project aims at being as stable as possible Contributing and testing Karaf 4.x would not be a problem, but relying on a development version for months is not the best option.

2. Another solution could be to implement web sockets with a different Java framework (but still deployed in Karaf). Since Jetty was already deployed in our custom distribution, it made sense to reuse it. But if we cannot, we will have to stick with another server. Or maybe is there another way of dealing with web sockets in Karaf?

3. An alternative could also be to support Pax-Web 4.x with Karaf 3.x.
That would mean having the "standard" feature with Pax-Web 3.x and a "standard-4.x" with Pax-Web 4.x. If the name is not well-chosen, the idea is here. I do not know if it seems feasible with the package imports versions (there may be incompatible constraints). But if it is, I could try to help on this.

Otherwise, any suggestion is welcome.
And last but not least, I mentioned custom distributions. If there was an automatic solution to deploy Pax-Web 4.x in Karaf 3.x, that would be great. I saw [0] on the bug tracker, it could be the solution. The 3rd option (above) would also fit.

Thanks for reading me.

Cheers,

                Vincent.


[ 0 ] : https://issues.apache.org/jira/browse/KARAF-3259


--
Vincent Zurczak
Linagora: www.linagora.com <http://www.linagora.com/>

Twitter <https://twitter.com/VincentZurczak> Vincent Zurczak @ LinkedIn <http://fr.linkedin.com/pub/vincent-zurczak/18/b35/6a7> My Skype ID <callto://vincent.zurczak> My English blog <http://vzurczak.wordpress.com>

Reply via email to