Results 1 to 2 of 2

Thread: "deactivate" MethodDefinitionSourceAdvisor for junit

  1. #1
    Join Date
    Feb 2007
    Posts
    18

    Default "deactivate" MethodDefinitionSourceAdvisor for junit

    Hi,

    I have project with secured bussiness method via @Secured.
    In applicationContext_product I have

    Code:
    <bean class="org.acegisecurity.intercept.method.aopalliance.MethodDefinitionSourceAdvisor">
            <constructor-arg >
                <ref bean="methodSecurityInterceptor" />
            </constructor-arg>
    </bean>
    etc.

    All works fine.

    Now, I have unit tests with Unitils which has another applicationContext_unitils with some changes against
    product context (for example datasource).
    I want to run tests without security - so I want to "deactivate" MethodDefinitionSourceAdvisor in applicationContext_unitils.
    How can I simple do this?
    (without re-define methodSecurityInterceptor and objectDefinitionSource)

    Thanks for any hint.

  2. #2
    Join Date
    Feb 2007
    Posts
    18

    Default Addition

    Addition: of course applicationContext_unitils only extends or changes applicationContext_product, junit uses both contexts. Priority is applicationContext_unitils.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •