Announcement Announcement Module
Collapse
No announcement yet.
intercept-methods and TransactionProxyFactoryBean Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • intercept-methods and TransactionProxyFactoryBean

    I am calling a method (someMethod) from a webflow and that method is a secured method like this:

    Code:
    <bean id="baseTP" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    ...
    </bean>
    
    
    <bean id="service" parent="baseTP">
      <property name="target">
        <bean class="some.class.ServiceImpl">
          <sec:intercept-methods access-decision-manager-ref="adm">
            <sec:protect method="some.class.ServiceImpl.getAll" access="ROLE_ADMIN, AFTER_ACL_COLLECTION_READ"/>
          </sec:intercept-methods>
        </bean>
      </property>
    </bean>
    However, this causes a nosuchmethodexception to be thrown for someMethod but when I get rid of the intercept-method things work fine (except I don't get the correct filtering of my returned collection).

    Notice that it is irrelevant which method is called as long as it is any method from the ServiceImpl. Basically, whenever I try to secure any method on that class in the way shown above, I will get a nosuchmethodexception when attempting to call any method in that class.

    Does anyone know what is wrong? Thanks.
Working...
X