Hi, We have a need to bring Apache Aries SPI Fly to support Java Service Provider Interface API [1] for web applications. Java SPI do not work OOTB in OSGi environments, so Apache Aries has implemented the "OSGi ServiceLoader Mediator specification". Aries SPI Fly is pluggable and can be used in number of osgi frameworks including Equinox. [2]
I have tested this and it works fine in AS 5.3.0/6.0.0 SNAPSHOT. The details on testing this can be found in the below mail including the list of needed libraries. The license is ASL 2.0. So, shall we bring this into our platform? [1] http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html [2] https://aries.apache.org/modules/spi-fly.html Thanks, KasunG ---------- Forwarded message ---------- From: Kasun Gajasinghe <[email protected]> Date: Fri, May 30, 2014 at 12:20 PM Subject: Re: ServletContainerInitializer for AS To: Sagara Gunathunga <[email protected]>, Denuwanthi De Silva < [email protected]>, architecture <[email protected]> Cc: Chamil Jeewantha <[email protected]>, Sameera Jayasoma <[email protected]> Hi Sagara, Denuwanthi is working on a solution for this problem using spi-fly. SPI Fly provides a mechanism to expose Java Service Provider Interfaces via OSGi. To make this work, 1. Add the following spi-fly and its dependency bundles to AS - Download links are available at [1]. We need a make a Carbon feature out of this to install in AS. @Denuwanthi, please note. SPI Fly Dynamic Weaving Bundle 1.0.0 Aries Util 1.1.0 ASM 4.0.0 2. You need to make the Myfaces bundle a service provider of javax.servlet.ServletContainerInitializer interface under the OSGi environment. For that you need to add 'Require-Capability', and 'Provide-Capability' Manifest headers as follows. Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" Provide-Capability: osgi.serviceloader; osgi.serviceloader= *javax.servlet.ServletContainerInitializer* 3. Since Tomcat uses a custom mechanism to load the service providers, you do not need to add Consumer's manifest headers. Consumer part for webapps is already handled by our solution. [1] http://aries.apache.org/modules/spi-fly.html Regards, KasunG On Fri, May 30, 2014 at 12:01 PM, Sagara Gunathunga <[email protected]> wrote: > It looks like we need OSGI aware way to find ServletContainerInitializers. > Myfaces use MyFacesContainerInitializer to register MyFaces Servlet but > this is not pick up by the AS that's why JSF not work on ASTomEE. > > Thanks ! > -- > Sagara Gunathunga > > Senior Technical Lead; WSO2, Inc.; http://wso2.com > V.P Apache Web Services; http://ws.apache.org/ > Linkedin; http://www.linkedin.com/in/ssagara > Blog ; http://ssagara.blogspot.com > > -- *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc. email: kasung AT spamfree wso2.com linked-in: http://lk.linkedin.com/in/gajasinghe blog: http://kasunbg.org -- *Kasun Gajasinghe*Senior Software Engineer, WSO2 Inc. email: kasung AT spamfree wso2.com linked-in: http://lk.linkedin.com/in/gajasinghe blog: http://kasunbg.org
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
