ProfileBase profile;\r
string anonymousCookieName = null;
+#if TARGET_J2EE\r
+ bool _OnLeaveCalled;
+#endif
+
public ProfileModule ()
{
}
if (!ProfileManager.Enabled)\r
return;\r
\r
+#if TARGET_J2EE\r
+ _OnLeaveCalled = false;\r
+#endif\r
+\r
if (HttpContext.Current.Request.IsAuthenticated) {\r
HttpCookie cookie = app.Request.Cookies [anonymousCookieName];\r
if (cookie != null && (cookie.Expires != DateTime.MinValue && cookie.Expires > DateTime.Now)) {\r
}\r
}\r
}
-
+#if TARGET_J2EE
+ internal
+#endif
void OnLeave (object o, EventArgs eventArgs)
{\r
if (!ProfileManager.Enabled)\r
\r
if (!app.Context.ProfileInitialized)
return;
+\r
+#if TARGET_J2EE\r
+ if (_OnLeaveCalled)\r
+ return;\r
+\r
+ _OnLeaveCalled = true;\r
+#endif
if (ProfileManager.AutomaticSaveEnabled) {\r
profile = app.Context.Profile;\r
}
#if TARGET_J2EE
if (doProcessHandler) {
+ foreach (IHttpModule module in Modules) {
+ if (module is System.Web.Profile.ProfileModule) {
+ ((System.Web.Profile.ProfileModule) module).OnLeave (this, EventArgs.Empty);
+ break;
+ }
+ }
yield return false;
goto processHandler;
}