On Jul 18, 2012, at 5:16 PM, Tibor Mlynarik wrote:
>> Tibor Mlynarik a écrit :
>>> I was looking at existing FileEntityStoreService which is JSON format. But
>>> it wants it's own configuration ( another config config module ? ). So I
>>> thought that recursion needs to be stopped.
>> If you want to provide your "YamlConfigStore" a file path at assembly
>> time to prevent this recursive case you could do it using the MetaInfo.
>>
>> module.services( YamlConfigStoreService.class ).setMetaInfo( new File(
>> "../whatever.yaml" ) );
>>
>>
>> And then in the service mixin:
>>
>>
>> @This ServiceComposite meAsService;
>> ...
>> File yamlFile = meAsService.metaInfo( File.class );
ServiceComposite has no metaInfo() method, but ServiceDescriptor has.
@This
ServiceComposite myService;
@Structure
Qi4j qi4j;
@Override
public void activate()
{
ServiceDescriptor sd = qi4j.getServiceDescriptor( myService);
...
thanks,
- Tibor
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev