> module.addServices( QrmEntityStoreService.class ).setMetaInfo( yourobject );
>
> which is available to the Mixins via an injected ServiceDescriptor.
>
> @State private ServiceDescriptor descriptor;
just to test your suggestoins I did this:
module.addServices( QrmEntityStoreService.class )
.setMetaInfo( new String("meta-info") )
.instantiateOnStartup();
in mixin I do this
@State StateDescriptor descriptor;
and on startup i get:
org.qi4j.runtime.injection.provider.InjectionProviderException:
Injected value has invalid type
at
org.qi4j.runtime.injection.provider.StateInjectionProviderFactory.newInjectionProvider(StateInjectionProviderFactory.java:113)
at
org.qi4j.runtime.injection.provider.InjectionProviderFactoryStrategy.newInjectionProvider(InjectionProviderFactoryStrategy.java:82)
at
org.qi4j.runtime.injection.DependencyModel.bind(DependencyModel.java:273)
at
org.qi4j.runtime.injection.InjectedFieldModel.bind(InjectedFieldModel.java:80)
at
org.qi4j.runtime.injection.InjectedFieldsModel.bind(InjectedFieldsModel.java:71)
at org.qi4j.runtime.composite.MixinModel.bind(MixinModel.java:93)
at
org.qi4j.runtime.composite.AbstractMixinsModel.bind(AbstractMixinsModel.java:243)
at org.qi4j.runtime.service.ServiceModel.bind(ServiceModel.java:158)
at org.qi4j.runtime.service.ServicesModel.bind(ServicesModel.java:48)
at org.qi4j.runtime.structure.ModuleModel.bind(ModuleModel.java:149)
at org.qi4j.runtime.structure.LayerModel.bind(LayerModel.java:84)
at
org.qi4j.runtime.structure.ApplicationModel.bind(ApplicationModel.java:92)
at
org.qi4j.runtime.bootstrap.ApplicationModelFactoryImpl.newApplicationModel(ApplicationModelFactoryImpl.java:85)
at
org.qi4j.bootstrap.Energy4Java.newApplicationModel(Energy4Java.java:70)
at
org.qi4j.test.AbstractQi4jTest.newApplication(AbstractQi4jTest.java:83)
at org.qi4j.test.AbstractQi4jTest.setUp(AbstractQi4jTest.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at
com.intellij.rt.junit4.Junit4TestMethodAdapter.run(Junit4TestMethodAdapter.java:62)
at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
is this the newest feature or am I missing something?
Thanks,
Alex.
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev