From 0abf5c87ae95556e38d0147f2c1767aaf6c69e6f Mon Sep 17 00:00:00 2001 From: sseifert Date: Mon, 12 Dec 2016 23:55:53 +0100 Subject: [PATCH 1/4] set version to 2.3.3.0 --- AEMManager/Properties/AssemblyInfo.cs | 4 ++-- AEMManagerSetup/Product.wxs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AEMManager/Properties/AssemblyInfo.cs b/AEMManager/Properties/AssemblyInfo.cs index 4c7fe38..ad789a1 100644 --- a/AEMManager/Properties/AssemblyInfo.cs +++ b/AEMManager/Properties/AssemblyInfo.cs @@ -29,8 +29,8 @@ // Build Number // Revision // -[assembly: AssemblyVersion("2.3.2.0")] -[assembly: AssemblyFileVersion("2.3.2.0")] +[assembly: AssemblyVersion("2.3.3.0")] +[assembly: AssemblyFileVersion("2.3.3.0")] // Configure log4net using the .config file [assembly: log4net.Config.XmlConfiguratorAttribute(Watch = true)] diff --git a/AEMManagerSetup/Product.wxs b/AEMManagerSetup/Product.wxs index d45ed27..589154a 100644 --- a/AEMManagerSetup/Product.wxs +++ b/AEMManagerSetup/Product.wxs @@ -2,7 +2,7 @@ + Version="2.3.3.0"> From 4ee897c6beab648d5fd7ac17119bea5abeb02411 Mon Sep 17 00:00:00 2001 From: sseifert Date: Tue, 20 Dec 2016 17:09:11 +0100 Subject: [PATCH 2/4] use only sample content in dialog label, it's not always geometrixx --- AEMManager/AemInstanceDialog.Designer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AEMManager/AemInstanceDialog.Designer.cs b/AEMManager/AemInstanceDialog.Designer.cs index d1d5016..c04dca1 100644 --- a/AEMManager/AemInstanceDialog.Designer.cs +++ b/AEMManager/AemInstanceDialog.Designer.cs @@ -768,9 +768,9 @@ private void InitializeComponent() { this.chkRunmodeSampleContent.AutoSize = true; this.chkRunmodeSampleContent.Location = new System.Drawing.Point(80, 112); this.chkRunmodeSampleContent.Name = "chkRunmodeSampleContent"; - this.chkRunmodeSampleContent.Size = new System.Drawing.Size(287, 17); + this.chkRunmodeSampleContent.Size = new System.Drawing.Size(226, 17); this.chkRunmodeSampleContent.TabIndex = 15; - this.chkRunmodeSampleContent.Text = "Install AEM Sample Content (Geometrixx) on first startup"; + this.chkRunmodeSampleContent.Text = "Install AEM Sample Content on first startup"; this.chkRunmodeSampleContent.UseVisualStyleBackColor = true; // // AemInstanceDialog From 08ac9bbfb51d964fabd0f54aa811b5fa5f515f5c Mon Sep 17 00:00:00 2001 From: sseifert Date: Thu, 22 Dec 2016 15:26:56 +0100 Subject: [PATCH 3/4] introduce generic http timeout for all calls that are not bundle list status make sure HTTP call can not hang up when AEM is restarting and responding in unexpected fashion --- AEMManager/AemActions.cs | 6 ++-- AEMManager/AemInstance.cs | 11 ++++-- AEMManager/App.config | 39 ++++++++++++---------- AEMManager/Properties/Settings.Designer.cs | 27 ++++++++++----- AEMManager/Properties/Settings.settings | 9 +++-- AEMManager/SlingDavExServlet.cs | 6 ++-- 6 files changed, 59 insertions(+), 39 deletions(-) diff --git a/AEMManager/AemActions.cs b/AEMManager/AemActions.cs index 9439c5f..b063c3e 100644 --- a/AEMManager/AemActions.cs +++ b/AEMManager/AemActions.cs @@ -324,9 +324,8 @@ public static void StopInstance(AemInstance pInstance) { pInstance.ConsoleOutputWindow.AppendConsoleLog("Shutting down instance..."); - WebRequest request = pInstance.WebRequestCreate(shutdownUrl); + HttpWebRequest request = pInstance.WebRequestCreate(shutdownUrl); request.Method = "POST"; - request.Timeout = 3000; request.GetResponse(); } @@ -586,9 +585,10 @@ public static BundleStatus GetCombinedBundleStatus(AemInstance pInstance) { try { mLog.Debug("Get bundle list from URL: " + bundleListUrl); - WebRequest request = pInstance.WebRequestCreate(bundleListUrl); + HttpWebRequest request = pInstance.WebRequestCreate(bundleListUrl); request.Method = "GET"; request.Timeout = AEMManager.Properties.Settings.Default.BundleListTimeout; + request.ReadWriteTimeout = AEMManager.Properties.Settings.Default.BundleListTimeout; responseTimeStopwatch.Start(); using (WebResponse response = request.GetResponse()) { diff --git a/AEMManager/AemInstance.cs b/AEMManager/AemInstance.cs index cab5036..384f3c2 100644 --- a/AEMManager/AemInstance.cs +++ b/AEMManager/AemInstance.cs @@ -803,14 +803,21 @@ public ConsoleWindow ConsoleOutputWindow { /// AEM instance /// URL /// - public WebRequest WebRequestCreate(string url) { - WebRequest request = WebRequest.Create(url); + public HttpWebRequest WebRequestCreate(string url) { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); // "manual" preemptive authentication string authInfo = this.Username + ":" + this.Password; authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo)); request.Headers["Authorization"] = "Basic " + authInfo; + // default timeouts + request.Timeout = AEMManager.Properties.Settings.Default.HttpTimeout; + request.ReadWriteTimeout = AEMManager.Properties.Settings.Default.HttpTimeout; + + // disable keep alive + request.KeepAlive = false; + return request; } diff --git a/AEMManager/App.config b/AEMManager/App.config index 5f74906..e2ac71f 100644 --- a/AEMManager/App.config +++ b/AEMManager/App.config @@ -43,24 +43,27 @@ - - 1000 - - - True - - - 3000 - - - 2000 - - - C:\Programme\jprofiler7\bin\windows - - - C:\Programme\jprofiler7\bin\agent.jar - + + 1000 + + + True + + + 2000 + + + C:\Programme\jprofiler7\bin\windows + + + C:\Programme\jprofiler7\bin\agent.jar + + + 3000 + + + 2000 + diff --git a/AEMManager/Properties/Settings.Designer.cs b/AEMManager/Properties/Settings.Designer.cs index e7ba9d9..6052dcb 100644 --- a/AEMManager/Properties/Settings.Designer.cs +++ b/AEMManager/Properties/Settings.Designer.cs @@ -41,15 +41,6 @@ public bool ProcessNameViaShortcut { } } - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("400")] - public int BundleListTimeout { - get { - return ((int)(this["BundleListTimeout"])); - } - } - [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("2000")] @@ -76,5 +67,23 @@ public string JProfilerAgent { return ((string)(this["JProfilerAgent"])); } } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("3000")] + public int BundleListTimeout { + get { + return ((int)(this["BundleListTimeout"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("2000")] + public int HttpTimeout { + get { + return ((int)(this["HttpTimeout"])); + } + } } } diff --git a/AEMManager/Properties/Settings.settings b/AEMManager/Properties/Settings.settings index 2fc2353..461d622 100644 --- a/AEMManager/Properties/Settings.settings +++ b/AEMManager/Properties/Settings.settings @@ -8,9 +8,6 @@ True - - 400 - 2000 @@ -20,5 +17,11 @@ C:\Programme\jprofiler7\bin\agent.jar + + 3000 + + + 2000 + \ No newline at end of file diff --git a/AEMManager/SlingDavExServlet.cs b/AEMManager/SlingDavExServlet.cs index 3912cff..b1cc52d 100644 --- a/AEMManager/SlingDavExServlet.cs +++ b/AEMManager/SlingDavExServlet.cs @@ -42,9 +42,8 @@ private bool IsDavExEnabled() { try { mLog.Debug("Get bundle list from URL: " + davExUrl); - WebRequest request = instance.WebRequestCreate(davExUrl); + HttpWebRequest request = instance.WebRequestCreate(davExUrl); request.Method = "GET"; - request.Timeout = AEMManager.Properties.Settings.Default.BundleListTimeout; responseTimeStopwatch.Start(); using (WebResponse response = request.GetResponse()) { @@ -82,9 +81,8 @@ private void EnableDavEx() { ASCIIEncoding ascii = new ASCIIEncoding(); byte[] postBytes = ascii.GetBytes(postData.ToString()); - WebRequest request = instance.WebRequestCreate(configPostUrl); + HttpWebRequest request = instance.WebRequestCreate(configPostUrl); request.Method = "POST"; - request.Timeout = AEMManager.Properties.Settings.Default.BundleListTimeout; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = postBytes.Length; From 93a0ca4cac1545c0c5c1f1a15510c9110b30808a Mon Sep 17 00:00:00 2001 From: sseifert Date: Thu, 22 Dec 2016 15:35:47 +0100 Subject: [PATCH 4/4] set version to 2.3.4.0 --- AEMManager/Properties/AssemblyInfo.cs | 4 ++-- AEMManagerSetup/Product.wxs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AEMManager/Properties/AssemblyInfo.cs b/AEMManager/Properties/AssemblyInfo.cs index ad789a1..924fecb 100644 --- a/AEMManager/Properties/AssemblyInfo.cs +++ b/AEMManager/Properties/AssemblyInfo.cs @@ -29,8 +29,8 @@ // Build Number // Revision // -[assembly: AssemblyVersion("2.3.3.0")] -[assembly: AssemblyFileVersion("2.3.3.0")] +[assembly: AssemblyVersion("2.3.4.0")] +[assembly: AssemblyFileVersion("2.3.4.0")] // Configure log4net using the .config file [assembly: log4net.Config.XmlConfiguratorAttribute(Watch = true)] diff --git a/AEMManagerSetup/Product.wxs b/AEMManagerSetup/Product.wxs index 589154a..85b0f11 100644 --- a/AEMManagerSetup/Product.wxs +++ b/AEMManagerSetup/Product.wxs @@ -2,7 +2,7 @@ + Version="2.3.4.0">