On Friday 06 June 2008 02:47, Georg Ragaller wrote:
> Guess this is a bug, or?
>
> Question: Should my code have been run (without this assumed bug)? Or is
> my setup to mean, to naive, absolutely wrong, ...?
As Rickard points out, Services MUST BE ServiceComposites. To refactor your
case;
public interface RandomSloganMessage
{
String nextMessage();
}
@Mixins( RandomSloganMessageMixin )
public interface RandomSloganMessageService
extends RandomSloganMessage, ServiceComposite
{}
public static class RandomSloganMessageMixin
implements RandomSloganMessage
{
// your implementation
:
:
}
I would also strongly suggest that you use the SingletonAssembly class to
bootstrap Qi4j for simple cases. Or the AbstractQi4jTest if you want it JUnit
runnable.
> To be naughty: Wasn't there a discussion about final on parameters and
> parameter assignment lately? :)
Well, yes; And I have still not been shown a real usecase where final on local
variables or method arguments could have avoided hard to find bugs. Hence,
they stay out and not litter the code.
Cheers
--
Niclas Hedhman, Software Developer
I live here; http://tinyurl.com/2qq9er
I work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev