Michael Hunger wrote:
so that it injects the current uow into an existing:

@Invocation UnitOfWork uow;

within the composite.

WDYT ?

The concerns are reused, so it's not really possible to do.

Michael, who was looking for a problem with that but just forgot to add @Concerns( UnitOfWorkConcern.class ) to the composite. I thought we had some mechanism for Concern detection for annotations but was obviously wrong :)

Ok, so we have thought about this before. The main problem with it is that it becomes difficult to declare order of Concerns.

That being said, in many cases where ordering is important the Concerns will be triggered by annotations, so it *would* be possible to use the annotation ordering to sort it out. It's a bit magic though.

I.e.
@Secure @Logged
public void foo();

would be different from
@Logged @Secure
public void foo();

if the concerns are applied from the annotations, in the order they appear.

It sure would be handy though, just as constraints implementations can be declared on the annotation.

/Rickard


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

Reply via email to