Hi,
I found a major issue with the new declarative bootstrap. Before you
could do this:
module.addService(MyService).identifiedBy("Service1");
module.addService(MyService).identifiedBy("Service2");
Which would declare two services with different id's but same type. With
the new bootstrap API it looks like this:
module.service(MyService).identifiedBy("Service1");
module.service(MyService).identifiedBy("Service2");
which is not the same, since the second call will modify the same
service assembly as the first, so you end up with one service identified
by Service2.
There are quite a number of tests that break because of this, and I
would have to say that it is a legitimate need to be able to register
the same service type many times, for different service instances, so I
would suggest that the old add* methods simply are not @Deprecated, but
instead force creation of new assemblies. So, both styles would be
allowed and usable, depending on what you're trying to do.
Does that make sense?
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev