*Sigh* --> Scheduler has a strange cross Service reference, between

In ServiceActivation
@Service
private ScheduleRepository scheduleRepository;

and

In ScheduleRepository.Mixin

@Service
private SchedulerService scheduler;

effectively creating a cyclic dependency between the two.

So, I guess I come back to my original question;

Is it a bug that the Service is available before activate() has been executed?



Cheers
Niclas

2011/7/2 Niclas Hedhman <[email protected]>:
> 2011/7/2 Niclas Hedhman <[email protected]>:
>> The only (obvious) solution I can think of, is to have a
>> ThreadLocal<Boolean> for preventing re-entering the protected block.
>
> Instead, extended the reentrance check in RDFIndexingService to do;
>
> @Service
> private ServiceReference<Repository> repository;
>
> if( repository == null || !repository.isActive() || !repository.isAvailable() 
> )
>
> instead of previous;
>
> @Service
> private Repository repository;
>
> if( repository == null )
>
>
> Will make sure that there are no others before committing this up to 
> 'develop'.
>
>
> Cheers
> --
> Niclas Hedhman, Software Developer
> http://www.qi4j.org - New Energy for Java
>
> I live here; http://tinyurl.com/3xugrbk
> I work here; http://tinyurl.com/24svnvk
> I relax here; http://tinyurl.com/2cgsug
>



-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to