It's ok for me Regards Krzysztof
On 16.12.2015 20:23, Jean-Baptiste Onofré wrote: > Hi Benson, > > ServiceMix could be a host for such kind of service/API. > > I'm OK to add this (we already have servicemix-spec around that), let see > what the others think. > > Regards > JB > > On 12/13/2015 05:33 PM, Benson Margulies wrote: >> https://github.com/apache/cxf/pull/102 >> >> contains a Rube Goldberg machine that I built to use Hibernate Bean >> Validation inside of a CXF web service inside of pax web inside of >> Apache Karaf. >> >> I wonder how much of this might be replaced by something that exists, >> or could exist, in ServiceMix. >> >> Step 1: javax.validation has an SPI. Everything I've read pointed to >> using an explicit provider that knows how to get a Hibernate provider, >> rather than any attempt to make the SPI mechanism work in OSGi. Does >> anyone here have any contrary view that the SPI could be made to >> function via a sufficiency of Dynamic-ImportPackage? On the other >> hand, would it make sense to put the Helper class that uses the >> provider API to avoid the SPI into ServiceMix? >> >> Step 2: Using the SPI, you obtain a ValidatorFactory. Using the >> ValidatiorFactory, you obtain a Validator. >> >> When you _call_ the Hibernate Validator, it in turn uses the javax.el >> SPI to obtain an implementation of the expression language. To get >> around this, I wrapped a proxy around the Validator that sets the >> Thread context classloader to a class loader from a bundle with an >> import of 'com.sun.el', the package containing the implementation of >> EL that I have in the container. >> >> Does, or could, Servicemix provide a wrapper around the EL API that >> would avoid this? >> > -- Krzysztof Sobkowiak JEE & OSS Architect, Integration Architect Apache Software Foundation Member (http://apache.org/) Apache ServiceMix Committer & PMC Member (http://servicemix.apache.org/) Senior Solution Architect @ Capgemini SSC (http://www.capgeminisoftware.pl/) Robocap.pl - workshops of programming and robotics for kids (http://robocap.pl/)