On Wed, Jan 12, 2011 at 7:30 AM, Stanislav Muhametsin
<[email protected]> wrote:

> Hmm, interesting, if that isn't working, then I am not sure what is wrong
> with that. I used to have similar scenario to that, and I got it working by
> doing like I told in previous mail. Are there any existing tests for
> testcases like this in Qi4j-Core? Perhaps something went broken since I last
> time tried to use Lifecycle on property-only entities. Are you sure you are
> presenting real test-case? IIRC Qi4j should throw exception on non-static
> inner (maybe non-public too?) classes that are used as mixins.

Yes, non-static inner classes' constructor has the outer class' as the
first argument, and Qi4j would not be able to resolve that.

I don't have time right now to see if there is special handling of
Lifecycle different from Activatable, which has similar common issue,
but as a immediate work-around;

The handling of Property methods is not special hard-coded internals.
If you look at Composite type, you will see that it has a
PropertyMixin declared, which you can replace with your own
implementation. So, I suggest that the Mixin extends PropertyMixin and
then implements Lifecycle, that should work.


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

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

Reply via email to