<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JBoss / Wildfly &#8211; Ling&#039;s Note</title>
	<atom:link href="https://www.chunho-ling.com/category/computing/infrastructure-%e5%9f%ba%e5%bb%ba/server-%e4%bc%ba%e6%9c%8d%e5%99%a8/jboss-wildfly/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.chunho-ling.com</link>
	<description>Everything related IT, and me.</description>
	<lastBuildDate>Thu, 29 Nov 2018 09:53:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<site xmlns="com-wordpress:feed-additions:1">104401516</site>	<item>
		<title>[JBoss] 設定memory assignment</title>
		<link>https://www.chunho-ling.com/jboss-%e8%a8%ad%e5%ae%9amemory-assignment/</link>
					<comments>https://www.chunho-ling.com/jboss-%e8%a8%ad%e5%ae%9amemory-assignment/#respond</comments>
		
		<dc:creator><![CDATA[C.H. Ling]]></dc:creator>
		<pubDate>Thu, 29 Nov 2018 09:53:55 +0000</pubDate>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Infrastructure 基建]]></category>
		<category><![CDATA[JBoss / Wildfly]]></category>
		<guid isPermaLink="false">https://www.chunho-ling.com/?p=1142</guid>

					<description><![CDATA[最近投產的JBoss 效能不穩, 檢查system log 後發現它的memory 不夠, 但電腦已經夠多的RAM, 檢查後原來JBoss 的memory management 設定須要修改. 在{JBOSS_HOME}\bin\standalone.conf 中, 修改以下內容. REM set "JAVA_OPTS=-Xms1G -Xmx1G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m" set "JAVA_OPTS=-Xms4G -Xmx4G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=4G" 修改後 restart JBoss 後便可.]]></description>
										<content:encoded><![CDATA[<p>最近投產的JBoss 效能不穩, 檢查system log 後發現它的memory 不夠, 但電腦已經夠多的RAM, 檢查後原來JBoss 的memory management 設定須要修改.<span id="more-1142"></span></p>
<p>在{JBOSS_HOME}\bin\standalone.conf 中, 修改以下內容.</p>
<pre class="lang:default decode:true ">REM set "JAVA_OPTS=-Xms1G -Xmx1G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m"
set "JAVA_OPTS=-Xms4G -Xmx4G -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=4G"</pre>
<p>修改後 restart JBoss 後便可.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chunho-ling.com/jboss-%e8%a8%ad%e5%ae%9amemory-assignment/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1142</post-id>	</item>
		<item>
		<title>[JBoss] 解決deploy timeout 問題</title>
		<link>https://www.chunho-ling.com/jboss-%e8%a7%a3%e6%b1%badeploy-timeout-%e5%95%8f%e9%a1%8c/</link>
					<comments>https://www.chunho-ling.com/jboss-%e8%a7%a3%e6%b1%badeploy-timeout-%e5%95%8f%e9%a1%8c/#respond</comments>
		
		<dc:creator><![CDATA[C.H. Ling]]></dc:creator>
		<pubDate>Fri, 07 Sep 2018 03:54:05 +0000</pubDate>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Infrastructure 基建]]></category>
		<category><![CDATA[JBoss / Wildfly]]></category>
		<category><![CDATA[Server 伺服器]]></category>
		<guid isPermaLink="false">http://www.chunho-ling.com/?p=1120</guid>

					<description><![CDATA[當在JBoss deploy jar / war 檔時, 有時會遇到Timeout after [300] seconds waiting for service container stability. 的問題, 這是由於要deploy 的檔案太大, 於預設的時間(5分鐘)不能deploy 完成. 可以透過修改%JBOSS_HOME%\bin\standalone.conf.bat 來解決. rem Resolve timeout issue. set "JAVA_OPTS=%JAVA_OPTS% -Djboss.as.management.blocking.timeout=600" &#160;]]></description>
										<content:encoded><![CDATA[<p>當在JBoss deploy jar / war 檔時, 有時會遇到Timeout after [300] seconds waiting for service container stability. 的問題, 這是由於要deploy 的檔案太大, 於預設的時間(5分鐘)不能deploy 完成.<span id="more-1120"></span></p>
<p>可以透過修改%JBOSS_HOME%\bin\standalone.conf.bat 來解決.</p>
<pre class="lang:default decode:true">rem Resolve timeout issue.
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.as.management.blocking.timeout=600"</pre>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chunho-ling.com/jboss-%e8%a7%a3%e6%b1%badeploy-timeout-%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1120</post-id>	</item>
		<item>
		<title>[JBoss] 將JBoss EAP 設定為windows service</title>
		<link>https://www.chunho-ling.com/jboss-%e5%b0%87jboss-eap-%e8%a8%ad%e5%ae%9a%e7%82%bawindows-service/</link>
					<comments>https://www.chunho-ling.com/jboss-%e5%b0%87jboss-eap-%e8%a8%ad%e5%ae%9a%e7%82%bawindows-service/#respond</comments>
		
		<dc:creator><![CDATA[C.H. Ling]]></dc:creator>
		<pubDate>Sun, 22 Jul 2018 15:07:50 +0000</pubDate>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Infrastructure 基建]]></category>
		<category><![CDATA[JBoss / Wildfly]]></category>
		<category><![CDATA[Server 伺服器]]></category>
		<guid isPermaLink="false">http://www.chunho-ling.com/?p=1066</guid>

					<description><![CDATA[部署JBoss 時, 在Linux 中, 可以透過設定chkconfig 加入JBoss 便可於system boot 時自行啟動. 而在Windows, 因為JBoss EAP 須要課金下載JBoss Core Services Jsvc Package 才可. 但其實有其實方法實現, 方法如下. 設定system variable JBOSS_HOME: &#60;&#60;JBoss 安裝路徑&#62;&#62; 設定Common Deamon. 下載commons-daemon, 並unzip 到%JBOSS_HOME%\bin 中 網址: http://mirrors.advancedhosters.com/apache/commons/daemon/binaries/windows/ 設定JBoss Service. <a class="mh-excerpt-more" href="https://www.chunho-ling.com/jboss-%e5%b0%87jboss-eap-%e8%a8%ad%e5%ae%9a%e7%82%bawindows-service/" title="[JBoss] 將JBoss EAP 設定為windows service">[...]</a>]]></description>
										<content:encoded><![CDATA[<p>部署JBoss 時, 在Linux 中, 可以透過設定chkconfig 加入JBoss 便可於system boot 時自行啟動. 而在Windows, 因為JBoss EAP 須要課金下載JBoss Core Services Jsvc Package 才可. 但其實有其實方法實現, 方法如下.<span id="more-1066"></span></p>
<ol>
<li>設定system variable<br />
JBOSS_HOME: &lt;&lt;JBoss 安裝路徑&gt;&gt;</li>
<li>設定Common Deamon.<br />
下載commons-daemon, 並unzip 到%JBOSS_HOME%\bin 中<br />
網址: <a href="http://mirrors.advancedhosters.com/apache/commons/daemon/binaries/windows/" target="_blank" rel="noopener">http://mirrors.advancedhosters.com/apache/commons/daemon/binaries/windows/</a></li>
<li>設定JBoss Service.<br />
利用administrator 權限開啟command prompt. 並輸入以下指令.</p>
<pre class="lang:default decode:true">%JBOSS_HOME%\bat\service.bat install</pre>
</li>
<li>啟動service.<br />
利用administrator 權限開啟services.msc, 找出JBossEAP, 並啟動它.</li>
<li>進行測試.<br />
在瀏覽器中輸入http://localhost:8080, 若出現JBoss main page 代表測試成功.</li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chunho-ling.com/jboss-%e5%b0%87jboss-eap-%e8%a8%ad%e5%ae%9a%e7%82%bawindows-service/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1066</post-id>	</item>
		<item>
		<title>[JBoss] 解決不能透過remote host 進入問題</title>
		<link>https://www.chunho-ling.com/jboss-%e8%a7%a3%e6%b1%ba%e4%b8%8d%e8%83%bd%e9%80%8f%e9%81%8eremote-host-%e9%80%b2%e5%85%a5%e5%95%8f%e9%a1%8c/</link>
					<comments>https://www.chunho-ling.com/jboss-%e8%a7%a3%e6%b1%ba%e4%b8%8d%e8%83%bd%e9%80%8f%e9%81%8eremote-host-%e9%80%b2%e5%85%a5%e5%95%8f%e9%a1%8c/#respond</comments>
		
		<dc:creator><![CDATA[C.H. Ling]]></dc:creator>
		<pubDate>Sun, 22 Jul 2018 14:38:39 +0000</pubDate>
				<category><![CDATA[Infrastructure 基建]]></category>
		<category><![CDATA[JBoss / Wildfly]]></category>
		<category><![CDATA[Server 伺服器]]></category>
		<guid isPermaLink="false">http://www.chunho-ling.com/?p=1063</guid>

					<description><![CDATA[當JBoss初次利用standalone mode 進行部署時, 其他的電腦有機會不能進入網頁. 這是因為JBoss 預先進行了harden 設定, 避了不必要的保安漏洞.而解決方法, 則只須修改 %JBOSS_HOME%/standalone/configuration/standalone.xml 便可. 內容如下. standalone.xml &#60;interfaces&#62; &#60;interface name="management"&#62; &#60;inet-address value="${jboss.bind.address.management:127.0.0.1}"/&#62; &#60;/interface&#62; &#60;interface name="public"&#62; &#60;!--&#60;inet-address value="${jboss.bind.address:127.0.0.1}"/&#62;--&#62; &#60;any-address /&#62; &#60;/interface&#62; &#60;/interfaces&#62; 在此會將public interface 設定為所有IP address. 如果須要限制某subnet 的話, 則設定如下: &#60;inet-address <a class="mh-excerpt-more" href="https://www.chunho-ling.com/jboss-%e8%a7%a3%e6%b1%ba%e4%b8%8d%e8%83%bd%e9%80%8f%e9%81%8eremote-host-%e9%80%b2%e5%85%a5%e5%95%8f%e9%a1%8c/" title="[JBoss] 解決不能透過remote host 進入問題">[...]</a>]]></description>
										<content:encoded><![CDATA[<p>當JBoss初次利用standalone mode 進行部署時, 其他的電腦有機會不能進入網頁. 這是因為JBoss 預先進行了harden 設定, 避了不必要的保安漏洞.<span id="more-1063"></span>而解決方法, 則只須修改 %JBOSS_HOME%/standalone/configuration/standalone.xml 便可. 內容如下.</p>
<p>standalone.xml</p>
<pre class="lang:default decode:true">&lt;interfaces&gt;
        &lt;interface name="management"&gt;
            &lt;inet-address value="${jboss.bind.address.management:127.0.0.1}"/&gt;
        &lt;/interface&gt;
        &lt;interface name="public"&gt;
            &lt;!--&lt;inet-address value="${jboss.bind.address:127.0.0.1}"/&gt;--&gt;
            <strong>&lt;any-address /&gt;</strong>
        &lt;/interface&gt;
    &lt;/interfaces&gt;</pre>
<p>在此會將public interface 設定為所有IP address. 如果須要限制某subnet 的話, 則設定如下:</p>
<pre class="lang:default decode:true ">&lt;inet-address value="${jboss.bind.address:192.168.0.0}"/&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chunho-ling.com/jboss-%e8%a7%a3%e6%b1%ba%e4%b8%8d%e8%83%bd%e9%80%8f%e9%81%8eremote-host-%e9%80%b2%e5%85%a5%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1063</post-id>	</item>
		<item>
		<title>[Java] 部署 Spring Application 到 JBoss EAP / Wildfly 中運行</title>
		<link>https://www.chunho-ling.com/java-%e9%83%a8%e7%bd%b2-spring-application-%e5%88%b0-jboss-eap-wildfly-%e4%b8%ad%e9%81%8b%e8%a1%8c/</link>
					<comments>https://www.chunho-ling.com/java-%e9%83%a8%e7%bd%b2-spring-application-%e5%88%b0-jboss-eap-wildfly-%e4%b8%ad%e9%81%8b%e8%a1%8c/#respond</comments>
		
		<dc:creator><![CDATA[C.H. Ling]]></dc:creator>
		<pubDate>Thu, 12 Jul 2018 06:50:26 +0000</pubDate>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[JBoss / Wildfly]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<guid isPermaLink="false">http://www.chunho-ling.com/?p=1038</guid>

					<description><![CDATA[除了Tomcat 外, JBoss / Wildfly 都是熱門的Java Application Server. 與前者比較, JBoss / Wildfly 對整合 Java Enterprise Edition (JEE) 較佳. 而將spring 部署到 JBoss 中雖然較少, 但其穩定性則相對較佳. 示範中會利用Gradle spring application project 進行部署. 修改application property 檔案. 在/src/main/resources/application.properties 中, 加入以下設定. server.servlet.path <a class="mh-excerpt-more" href="https://www.chunho-ling.com/java-%e9%83%a8%e7%bd%b2-spring-application-%e5%88%b0-jboss-eap-wildfly-%e4%b8%ad%e9%81%8b%e8%a1%8c/" title="[Java] 部署 Spring Application 到 JBoss EAP / Wildfly 中運行">[...]</a>]]></description>
										<content:encoded><![CDATA[<p>除了Tomcat 外, JBoss / Wildfly 都是熱門的Java Application Server. 與前者比較, JBoss / Wildfly 對整合 Java Enterprise Edition (JEE) 較佳. 而將spring 部署到 JBoss 中雖然較少, 但其穩定性則相對較佳. 示範中會利用Gradle spring application project 進行部署.<span id="more-1038"></span></p>
<ol>
<li>修改application property 檔案.<br />
在<strong>/src/main/resources/application.properties</strong> 中, 加入以下設定.</p>
<pre class="lang:default decode:true">server.servlet.path = /*
spring.jmx.enabled=false</pre>
<p><strong>server.servlet.path</strong> 用作於JBoss 中設定其servlet directory; 而<strong>spring.jmx.enabled</strong> 則須要disabled 因為當兩個spring boot application 啟動時會產生Unable to register MBean 錯誤.</li>
<li>修改gradle 設定.<br />
開啟<strong>build.gradle</strong> 並修改內容如下.</p>
<pre class="lang:default decode:true">apply plugin: 'war'

dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
	{
		exclude group: "org.springframework.boot"
      	exclude module: "spring-boot-starter-tomcat"
	}
}</pre>
<p>因為spring boot 內建tomcat 設定, 會令deployment 時出現ClassCastException, 所以須要exclude tomcat starter package. 而在deployment 時亦會以war 檔形式. 故須加入apply plugin.</li>
<li>建立war 檔.<br />
在<strong>Gradle Task</strong> 中選取project, 打開<strong>build</strong> 並右鍵選取<strong>build</strong>, 按<strong>Run Gradle Task</strong>.<br />
<img data-recalc-dims="1" decoding="async" class="alignnone size-medium wp-image-1039" src="https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_37_49-eclipse-workspace-org.matilda.backend.roi_build.gradle-Eclipse-IDE.png?resize=300%2C160&#038;ssl=1" alt="" width="300" height="160" srcset="https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_37_49-eclipse-workspace-org.matilda.backend.roi_build.gradle-Eclipse-IDE.png?resize=300%2C160&amp;ssl=1 300w, https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_37_49-eclipse-workspace-org.matilda.backend.roi_build.gradle-Eclipse-IDE.png?w=609&amp;ssl=1 609w" sizes="(max-width: 300px) 100vw, 300px" /></li>
<li>進行部署.<br />
將<strong>%PROJECT_DIR%\libs\</strong> 中的war 檔放到JBoss 的deployment 文件夾 (<strong>%JBOSS_HOME%\standalone\deployments\</strong>)中. 若JBoss 正在運作中的話, 會自動進行deployment, 順利的話, 會見到.deployed 檔出現.<br />
<img data-recalc-dims="1" decoding="async" class="alignnone size-medium wp-image-1040" src="https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_45_46-deployments.png?resize=300%2C124&#038;ssl=1" alt="" width="300" height="124" srcset="https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_45_46-deployments.png?resize=300%2C124&amp;ssl=1 300w, https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_45_46-deployments.png?resize=768%2C318&amp;ssl=1 768w, https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_45_46-deployments.png?w=883&amp;ssl=1 883w" sizes="(max-width: 300px) 100vw, 300px" /></li>
<li>進行測試.<br />
於瀏覽器中輸入網址http://localhost:8080/&lt;&lt;war 檔名稱&gt;&gt;/ , 若有結果出現, 代表測試成功.<br />
<img data-recalc-dims="1" fetchpriority="high" decoding="async" class="alignnone size-medium wp-image-1041" src="https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_46_49-localhost_8080_org.matilda.backend.roi_main_findStaffByStaffID_staffID43.png?resize=300%2C167&#038;ssl=1" alt="" width="300" height="167" srcset="https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_46_49-localhost_8080_org.matilda.backend.roi_main_findStaffByStaffID_staffID43.png?resize=300%2C167&amp;ssl=1 300w, https://i0.wp.com/www.chunho-ling.com/wp-content/uploads/2018/07/2018-07-12-14_46_49-localhost_8080_org.matilda.backend.roi_main_findStaffByStaffID_staffID43.png?w=566&amp;ssl=1 566w" sizes="(max-width: 300px) 100vw, 300px" /></li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://www.chunho-ling.com/java-%e9%83%a8%e7%bd%b2-spring-application-%e5%88%b0-jboss-eap-wildfly-%e4%b8%ad%e9%81%8b%e8%a1%8c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1038</post-id>	</item>
	</channel>
</rss>
