MODE-1270 Add support for setting Session's user ID based upon JAAS Subject in J2EE The standard way to get the current JAAS Subject given the LoginContext or AccessController works in standard Java but not in J2EE. Apparently this is a well-known issue. The recommended approach for J2EE is to instead get the Subject via the JACC API.
This change adds an optional (e.g., "provided") dependency on the JACC API, changes the JaasProvider implementation to accept an optional SubjectResolver implementation that the provider will use to resolve the Subject should the standard JAAS technique not work, and to change the JcrRepository implementation to give the JaasProvider a new JaccSubjectResolver implementation (when the JACC API is available).
It is not really possible to test whether this technique works in our unit or integration tests (as we don't deploy to a J2EE container). However, all existing unit and integration tests do pass (meaning it doesn't break their functionality), and Kurt is verifying that the JACC-style approach works within Guvnor and will (after this commit) verify that these changes do indeed work within Guvnor (which uses Seam in JBoss AS).
MODE-1251 Downgrade Hibernate to 3.3.2 Downgraded our use of Hibernate (only on the 2.5.x branch) to 3.3.2.GA and made one change to the POM and to the HibernateAdapter class, which was using an API introduced in Hibernate in 3.5.
All unit and integration tests pass with these changes.