I fear we _will_ need more once containers start to bring their own version of a config system which uses those files.
Think about testing Java10 ;) It might not be needed _now_ but as soon as Tamaya makes it into some containers we will probably need it. But maybe I'm already far too advanced and we shall rather make it work _now_? LieGrue, strub > On Thursday, 29 January 2015, 9:54, Romain Manni-Bucau > <[email protected]> wrote: > > Well AFAIK it doesnt bring isolation, just the ability to fake SPIs. > If we don't need more that's ok - if you dont forget to restore > Thread.currentThread() ;) > > > Romain Manni-Bucau > @rmannibucau > http://www.tomitribe.com > http://rmannibucau.wordpress.com > https://github.com/rmannibucau > > > > 2015-01-29 9:40 GMT+01:00 Oliver B. Fischer <[email protected]>: >> Here is the test case I wrote yesterday: >> >> public classJavaConfigurationProviderIT { >> >> @Test >> public voidbla() { >> JavaArchive roundtrip = ShrinkWrap.create(JavaArchive.class) >> .addAsServiceProvider(PropertySource.class, MPS.class); >> >> ClassLoader parent = > Thread.currentThread().getContextClassLoader(); >> ShrinkWrapClassLoader swcl =newShrinkWrapClassLoader(roundtrip); >> >> Thread.currentThread().setContextClassLoader(swcl); >> >> >> for(PropertySource propertySource : >> ServiceLoader.load(PropertySource.class)) { >> System.out.println("*****"); >> System.out.println(propertySource.getName()); >> } >> >> System.out.println(roundtrip.toString(true)); >> } >> >> public static classMPSimplementsPropertySource {} >> } >> >> >> >> Am 29.01.15 um 09:27 schrieb Oliver B. Fischer: >>> >>> But even with Arquillian we would need ShrinkWrap to build deployable >>> artifacts. Or what do you mean? For SE we need only to tweak our class > path >>> or class loader. >>> >>> Bye, >>> >>> Oliver >>> >>> Am 29.01.15 um 08:31 schrieb Mark Struberg: >>>> >>>> That's why I wanted some 'isolating' Arquillian SE > adaptor :) >>>> I prefer using Arquillian over any homegrown solution as we might > use >>>> that to later test EE containers as well. >>>> >>>> LieGrue, >>>> strub >>>> >>>> >>>> >>>> >>> >> >> -- >> N Oliver B. Fischer >> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany >> P +49 30 44793251 >> M +49 178 7903538 >> E [email protected] >> S oliver.b.fischer >> J [email protected] >> X http://xing.to/obf >> >
