Thank you for the comment, inside our team have many time raised question about migration to SMX4, but we are not sure about maturity of SMX4. What do you think about it? And it seems development of SMX 3 is stalled. Am I right?
Gert Vanthienen wrote: > > L.S., > > Yeah, I don't think there's a problem for the SU classloader to access > the JRuby/Groovy/... classes, the problem is in spring-context that > needs to access those classes. That jar is in the container classpath > so it won't have access to the classes you deployed in your SU. For > ServiceMix 3.3.x, adding the necessary jars to lib/optional might well > be the only viable alternative to get the classes together in the same > classloader. > > In ServiceMix 4, built on an OSGi framework, you can use OSGi > packaging to deploy your JBI endpoints, giving you a lot more > fine-grained control over the classpath/classloaders. > > Regards, > > Gert Vanthienen > ------------------------ > Open Source SOA: http://fusesource.com > Blog: http://gertvanthienen.blogspot.com/ > > > > On 15 February 2010 08:05, Alexanderz <[email protected]> wrote: >> >> Hello >> >> There is some interesting fact, It is possible to instantiate classed: >> org/jruby/exceptions/JumpException or >> org/codehaus/groovy/control/CompilationFailedException as plain spring >> beans. >> >> >> Alexanderz wrote: >>> >>> Hello, >>> >>> Nope, it does not help me: >>> >>> <beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" >>> xmlns:lang="http://www.springframework.org/schema/lang" >>> ... > >>> >>> <classpath inverse="true"/> >>> >>> <lang:jruby scope="prototype" id="setterInterceptor" >>> script-interfaces="org.apache.cxf.phase.PhaseInterceptor" >>> script-source="classpath:PropertySetter.rb"/> >>> ... >>> <beans> >>> >>> BR, >>> Alexander >>> >>> >>> Gert Vanthienen wrote: >>>> >>>> L.S., >>>> >>>> This is probably being caused by the way classloading works in JBI -- >>>> by default, the SU has a parent-first classloading mechanism so it >>>> will start looking in the component/container classpath before loading >>>> classes from the SU. By putting the required jars in the lib/optional >>>> directory, they're being considered part of the container classpath >>>> and that's why this fixes the issue. >>>> >>>> You should be able to resolve this by explicitly configuring the SU to >>>> use self-first classloading as explained in >>>> http://servicemix.apache.org/classloaders.html. If you're going to >>>> build multiple SU that use the same libraries, you might also want to >>>> consider packaging those up as a shared library and reference that >>>> from your SU (explained on the same wiki page). >>>> >>>> Regards, >>>> >>>> Gert Vanthienen >>>> ------------------------ >>>> Open Source SOA: http://fusesource.com >>>> Blog: http://gertvanthienen.blogspot.com/ >>>> >>>> >>>> >>>> On 13 February 2010 17:56, Alexanderz <[email protected]> wrote: >>>>> >>>>> Hi! >>>>> >>>>> Does anyone have an example of using the spring script >>>>> beans(http://static.springsource.org/spring/docs/2.5.x/reference/dynamic-language.html) >>>>> in SU without servicemix-script or servicemix-scripting SEs in SMX 3? >>>>> >>>>> For example I would like to implement custom cxf-api interceptor or >>>>> custom >>>>> predicate for eip:content-base-router on groovy or jruby spring beans. >>>>> But >>>>> It seems I've faced with classloading problem: >>>>> >>>>> >>>>> 1) <loc-message>org/jruby/exceptions/JumpException</loc-message> >>>>> >>>>> <stack-trace><