JBoss WAS - 해당되는 글 2건

아래의 코드를 복사하셔서 web application context에 vm.jsp로 저장하신 후 확인하시면 됩니다.

<%@ page contentType="text/html; charset=euc-kr" %>
<%@ page import="java.net.InetAddress" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>

<%
  if (request.getParameter("gc") != null) {
    System.gc();
    System.runFinalization();
  }
 Properties p = System.getProperties();
%>

<HTML>
<HEAD>
<META content="text/html; charset=euc-kr" http-equiv=Content-Type>
<!--META http-equiv="Refresh" content="10;url=<%= request.getRequestURI() %>"-->
<link href="style.css" rel=stylesheet type="text/css">
</HEAD>

<body leftmargin=15 topmargin=10>
<center><p>

<table width="600" cellpadding="7" cellspacing="0" border="1" bordercolordark="WHITE" bordercolorlight="BLACK">
<tr><td>
■ HOST : <%= InetAddress.getLocalHost().getHostName() %>
(<%= InetAddress.getLocalHost().getHostAddress() %>)&nbsp;&nbsp;
<% SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd 'at' HH:mm:ss z", Locale.CHINA); %>
■ Current Time : <%= formatter.format(new Date()) %>
</td></tr>

<tr><td align=center>

<%
   Runtime rt = Runtime.getRuntime();
   long free = rt.freeMemory();
   long total = rt.totalMemory();
   long usedRatio = (total - free) * 100 / total;
   long unusedRatio = free * 100 / total;
%>

<table width=100% bgcolor="lightgrey" border=1 cellpadding=6 cellspacing=0>
<tr>
<td align="center" colspan="2">Total Java Virual Machine Memory (<b><%= total/1024 %> KB</b>)</td>
</tr>
<tr bgcolor=#E3E3E3>
<td align="center">Used Memory (<b><%= (total - free)/1024 %> KB</b>)</td>
<td align="center">Available Memory (<b><%= free/1024 %> KB</b>)</td>
</tr>
<tr bgcolor=#E8EEEC>
<td><hr color="#CC3366" align=left size=10 width="<%= usedRatio %>%" noshade>
(<%= usedRatio %> %)</td>
<td><hr color="#0066FF" align=left size=10 width="<%= unusedRatio %>%" noshade>
(<%= unusedRatio %> %)</td>
</tr>
</table>

<p>
<a href="<%= request.getRequestURI() %>?gc=">
<img src="trash.gif" valign=middle border=0>&nbsp;Execution GC</a>
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
<a href="<%= request.getRequestURI() %>">
<img src="refresh.gif" valign=middle border=0>&nbsp;Reload</a>

</td></tr>
</table>

</center>
</BODY>
</HTML>

|

Sometimes, when copying a big package from a distant location in /deploy, the file gets deployed before the file is acctually copied. Instead of copying it to /deploy, split the copying in two steps :
   - Copy the file to any localtion on the local filesystem that JBoss is using
   - Move the file from the temporary location to /deploy.(Move is atomic operation)

In linux, links may also be used.

때때로 /deploy 디렉토리의 원격으로부터 큰 용량의 WAR, EAR등을 카피할 때 JBoss에서 실제 카피가 모두 일어나기 전에 디플로이를 시도함으로써 문제가 발생할 수 있는 데 이 때 다음의 두 단계를 거쳐서 해결하면 됩니다.
   - JBoss가 사용하는 로컬 시스템에 파일을 먼저 복사합니다.
   - mv 명령을 이용하여 JBoss의 /deploy 디렉토리로 옮깁니다.

예> cp some_remote_location/my_big.ear /tmp
      mv /tmp/my_big.ear /home/jboss/server/default/deploy

There was a similar situation when using WebLogic Integration File Transport.
|

놀새~'s Blog is powered by Daum & tistory