upgrade-06-070.html 3.2 KB

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