upgrade-080-090.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <html>
  2. <head>
  3. <title>Acegi Security - Upgrading from version 0.8.0 to 1.0.0</title>
  4. </head>
  5. <body>
  6. <h1>Upgrading from 0.8.0 to 1.0.0</h1>
  7. <p>
  8. The following should help most casual users of the project update their
  9. applications:
  10. <ul>
  11. <li>The most significant change in 0.9.0 is that <code>ContextHolder</code> and all of its
  12. related classes have been removed. This significant change was made for the sake of consistency
  13. with the core Spring project's approach of a single <code>ThreadLocal</code> per use case,
  14. instead of a shared <code>ThreadLocal</code> for multiple use cases as the previous
  15. <code>ContextHolder</code> allowed. <b>This is an important change in 0.9.0.</b> Many applications
  16. will need to modify their code (and possibly web views) if they directly interact with the old
  17. <code>ContextHolder</code>. The replacement security <code>ThreadLocal</code> is called
  18. <a href="../multiproject/acegi-security/xref/net/sf/acegisecurity/context/SecurityContext.html">
  19. SecurityContext</a> and provides a single getter/setter for <code>Authentication</code>. There is
  20. thus no need to work with <code>SecureContext</code> or <code>Context</code> anymore. <BR><BR>
  21. To migrate, simply modify all your code that previously worked with <code>ContextHolder</code>,
  22. <code>SecureContext</code> and <code>Context</code> to directly call <code>SecurityContext</code>.
  23. You will also note that the <code>HttpSessionContextIntegrationFilter</code> no longer provides
  24. a <code>context</code> property, so remove it from your application context XML. For the relatively
  25. small number of users who had customised their context, you will need to write your own
  26. <code>ThreadLocal</code> to provide functionality for your specific use case.<BR><BR>
  27. We apologise for the inconvenience, but on a more positive note this means you receive strict
  28. type checking, you no longer need to mess around with casting to and from <code>Context</code>
  29. implementations, your applications no longer need to perform checking of <code>null</code> and
  30. unexpected <code>Context</code> implementation types, and the new <code>SecurityContext</code>
  31. is an <code>InheritableThreadLocal</code> - which should make life easier in rich client
  32. environments.<br><br></li>
  33. <li>AbstractProcessingFilter has changed its getter/setter approach used for customised
  34. authentication exception directions. See the <a href="../multiproject/acegi-security/xref/net/sf/acegisecurity/ui/AbstractProcessingFilter.html">
  35. AbstractProcessingFilter JavaDocs</a> to learn more.<br><br></li>
  36. </ul>
  37. </body>
  38. </html>