return new SessionProvider() {
public Session getSession(HttpServletRequest request, Repository rep, String workspace)
throws LoginException, ServletException, RepositoryException {
final String key = Brix.NS_PREFIX + "jcr-session";
BrixSession s = (BrixSession) request.getAttribute(key);
if (s == null) {
s = EventUtil.wrapSession(original.getSession(request, rep, workspace));
for (Plugin p : getBrix().getPlugins()) {
if (p instanceof SessionAwarePlugin) {
((SessionAwarePlugin) p).onWebDavSession(s);