On Tue, Nov 24, 2015 at 10:02 PM, Sagara Gunathunga <[email protected]> wrote:
> > > On Mon, Nov 23, 2015 at 2:15 PM, Aruna Karunarathna <[email protected]> > wrote: > >> >> >> On Mon, Nov 16, 2015 at 12:39 PM, Samiyuru Senarathne <[email protected]> >> wrote: >> >>> Hi Sagara, >>> >>> This issue is about loading our implementation >>> of javax.ws.rs.core.Response [1] in OSGi mode using >>> java java.util.ServiceLoader [2] by the relevant bundle. This issue is yet >>> to be fixed and according to the discussions we had, the solution is to use >>> SPI Fly [3] to fix the ServiceLoader issue. >>> >> >> I tried using SPI-fly approach to overcome this problem. Seems like we >> cant use SPI Fly approach directly, since in the javax.ws.rs-api they are >> loading the implementation class using the class.forName(). >> We have to investigate the possibilities of loading the implementation >> class using a fragment bundle approach, and load the class using the >> ServiceLoader.load(). >> > > One quick suggestion, shall we change JAX-RS API sepc implementation from > Oracle to Geronimo and check with SPI-fly ? BTW I haven't check how > Geronimo spec load Response class. > > Hi Sagara, Was able to make it working using the SPI-Fly. But we need the following attributes in the respective bundles. *<SPI-Provider>javax.ws.rs.ext.RuntimeDelegate</SPI-Provider>* in the org.wso2.carbon.mss_1.0.0.SNAPSHOT.jar *<SPI-Consumer>javax.ws.rs.ext.RuntimeDelegate#findDelegate</SPI-Consumer>* in the javax.ws.rs-api_2.0.0.jar I had to tested this by creating a orbit bundle from the javax.ws.rs-api_2.0.0.jar. @Sameera I tried to create a fragment bundle for the javax.ws.rs-api_2.0.0.jar to add the SPI-Consumer entry. Seems like spi-fly not picking up the entry is for the javax.ws.rs-api_2.0.0.jar I guess we have to create an orbit. Any thoughts? Regards, Aruna -- *Aruna Sujith Karunarathna *| Software Engineer WSO2, Inc | lean. enterprise. middleware. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 71 9040362 | Work: +94 112145345 Email: [email protected] | Web: www.wso2.com
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
