Hi,

I am facing an issue that I know is weird, but I can put my finger on the
root cause of the issue.

Basically I have an App developped around several Tapestry Modules. One of
my Module defines a MenuService that list down all the nodes available in
the different navigation in the site.

Then I have Advisors that filters out the results returned by the
MenuService based on several constrains.

My idea is that each Module can add its own Advises to filter further more
based on new constrains.

Hence, in each Module you would find a method like this :

        @Advise(serviceInterface=MenuService.class)
        public static void filterMenuServiceResults(MethodAdviceReceiver 
receiver,
                                MenuServiceAdvisor menuServiceAdvisor, 
                                final SecurityManager securityManager, 
                                final ApplicationStateManager 
applicationStateManager) {
                
                // AclConstrain Advisor
                MethodAdvice aclma = new 
AclContrainMethodAdvice(securityManager,
applicationStateManager);
                menuServiceAdvisor.addAdvice(aclma, receiver);
        }

Currently I have 2 Modules doing similar things. They both use the same
MenuServiceAdvisor but add different MethodAdvice.

The result is that when I run the App, I randomly have one or the other
MethodAdvice actually really active, and I have a message in the logs sating
that a MenuService service is already existing so the second one will be
ignored ( this message appears only  when I try to add the second Advice ).

I am using Tapestry 5.3.5... and I must miss something as I know I should be
able to add several advices on 1 service.

Anyone have an idea ?

Thanks for the help :)



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Several-Advices-on-same-service-tp5716615.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to