upgrade-06-070.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <document><properties><title>Acegi Security - Upgrading from version 0.6 to 0.7</title></properties><body><section name="Upgrading from 0.6 to 0.7.0"><p>
  3. The following should help most casual users of the project update their
  4. applications:
  5. <ul>
  6. <li>UserDetails now has two extra methods. Most people who have extended
  7. Acegi Security's default User implementation of UserDetails will be fine, as
  8. the constructor sets sensible defaults for the extra methods. People who
  9. have written their own UserDetails implementation from scratch will need to
  10. add the additional two methods. Returning true to both methods will normally
  11. be correct.
  12. </li>
  13. <li>AutoIntegrationFilter has been removed. User should instead use
  14. HttpSessionIntegrationFilter (in most cases), or HttpRequestIntegrationFilter
  15. (if using most container adapters) or JbossIntegrationFilter (if using the
  16. JBoss container adapter).</li>
  17. <li>MethodDefinitionMap, which is usually used by MethodSecurityInterceptor
  18. for its objectDefinitionSource property, has been changed. From 0.7.0, when
  19. MethodDefinitionMap is queried for configuration attributes associated with
  20. secure MethodInvocations, it will use any method matching in the method
  21. invocation class (as it always has) plus any method matching any interface
  22. the MethodInvocation class directly implements. So consider a PersonManager
  23. interface, a PersonManagerImpl class that implements it, and a definition of
  24. PersonManager.findAll=ROLE_FOO. In this example, any query for either
  25. PersonManager.findAll OR PersonManagerImpl.findAll will return ROLE_FOO.
  26. As we have always encouraged definition against the interface names (as per
  27. this example), this change should not adversely impact users. This change
  28. was necessary because of the new MethodDefinitionSourceAdvisor (see below).
  29. Refer to the MethodDefinitionMap JavaDocs for further clarification.</li>
  30. <li>MethodDefinitionSourceAdvisor can now be used instead of defining proxies
  31. for secure business objects. The advisor is fully compatible with both
  32. MethodDefinitionMap and MethodDefinitionAttributes. Using an advisor allows
  33. caching of which methods the MethodSecurityInterceptor should handle, thus
  34. providing a performance benefit as MethodSecurityInterceptor is not called
  35. for public (non-secure) objects. It also simplifies configuration.</li>
  36. <li>MethodSecurityInterceptor has moved from
  37. net.sf.acegisecurity.intercept.method.MethodSecurityInterceptor to
  38. net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.
  39. A simple find and replace will suffice to update your application contexts.</li>
  40. <li>All of the EH-CACHE cache implementations provided with Acegi Security have
  41. now been refactored to use a net.sf.ehcache.Cache obtained from
  42. EhCacheManagerFactoryBean, which is included with Spring 1.1.1 and above.
  43. See http://opensource.atlassian.com/confluence/spring/display/DISC/Caching+the+result+of+methods+using+Spring+and+EHCache
  44. for more about this bean, or the Contacts sample application for how to
  45. configure the EH-CACHE implementations provided with Acegi Security.
  46. Note the "cache" property is now required, and the old internally-managed
  47. cache properties have been removed.</li>
  48. </ul>
  49. </p></section></body></document>