init
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8"%>
|
||||
<%@ page import="com.eactive.eai.common.session.SessionManager"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<HTML>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style>
|
||||
textarea {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
resize: none;
|
||||
}
|
||||
body {
|
||||
font-size: 9pt;
|
||||
scrollbar-face-color: #DCDCDC;
|
||||
scrollbar-shadow-color:#FFFFFF;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color: #BBBBBB;
|
||||
scrollbar-darkshadow-color: #BBBBBB;
|
||||
scrollbar-track-color: #EFEFEF;
|
||||
scrollbar-arrow-color: #626262;
|
||||
}
|
||||
|
||||
table {
|
||||
font-family: µ¸¿ò;
|
||||
font-size: 9pt;
|
||||
line-height: 14px;
|
||||
color: #555555;
|
||||
}
|
||||
</style>
|
||||
<TITLE>SessionManager Cache Info</TITLE>
|
||||
</head>
|
||||
<body>
|
||||
<p style="font-size:13pt;">
|
||||
<b>[ SessionManager Cache Info ]</b>
|
||||
</p>
|
||||
<%
|
||||
String statusLog = null;
|
||||
try {
|
||||
SessionManager sessionManager = SessionManager.getInstance();
|
||||
statusLog = sessionManager.getCacheStatus();
|
||||
}
|
||||
catch(Exception ex) {
|
||||
statusLog = ex.toString();
|
||||
}
|
||||
%>
|
||||
<hr>
|
||||
<p style="font-size:12pt;">
|
||||
<b>SessionManager Cache Info</b>
|
||||
</p>
|
||||
<textarea style="border:none;width=200px;height=100px;">
|
||||
<%= statusLog %>
|
||||
</textarea>
|
||||
|
||||
</body>
|
||||
</HTML>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="euc-kr"?>
|
||||
<%@ page contentType="text/xml; charset=utf-8"%>
|
||||
<%@ page import="java.util.*,com.eactive.eai.common.util.Logger" %>
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ page import="com.eactive.eai.adapter.websocket.WebSocketSessionManager,org.java_websocket.WebSocket"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="com.eactive.eai.common.session.SessionManager,com.eactive.eai.common.session.SessionVO"%>
|
||||
<%@ page import="com.eactive.eai.common.session.CacheInfoVO"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ page import="org.apache.mina.common.IoSession"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="net.sf.ehcache.Cache,net.sf.ehcache.Element"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.ExpiringMap"%>
|
||||
<%@ page import="com.eactive.eai.common.util.DatetimeUtil"%>
|
||||
<%@ page import="com.eactive.eai.common.server.EAIServerManager"%>
|
||||
<%@ page import="com.eactive.eai.common.session.*"%>
|
||||
<Dataset>
|
||||
<Columns>
|
||||
<Column Name="eaiSvrInstNm" Type="string" Size="50" />
|
||||
<Column Name="loginUserId" Type="string" Size="50" />
|
||||
<Column Name="loginInstId" Type="string" Size="50" />
|
||||
<Column Name="wsInstId" Type="string" Size="50" />
|
||||
<Column Name="wsAdapterGroupName" Type="string" Size="50" />
|
||||
<Column Name="uuid" Type="string" Size="50" />
|
||||
<Column Name="hitCount" Type="string" Size="50" />
|
||||
<Column Name="creationTime " Type="string" Size="50" />
|
||||
<Column Name="lastAccessTime" Type="string" Size="50" />
|
||||
</Columns>
|
||||
<Rows>
|
||||
<%
|
||||
String eaiSvrInstNm = EAIServerManager.getInstance().getLocalServerName();
|
||||
String loginUserId = request.getParameter("loginUserId");
|
||||
boolean isSpUserFound = false;
|
||||
int rowCount = 0;
|
||||
String spUuid = null;
|
||||
try {
|
||||
SessionManager sessionManager = SessionManager.getInstance();
|
||||
|
||||
if(loginUserId == null) {
|
||||
loginUserId = "";
|
||||
}
|
||||
else {
|
||||
loginUserId = loginUserId.trim();
|
||||
if(loginUserId.length() > 0) {
|
||||
isSpUserFound = true;
|
||||
for(String uuid : sessionManager.getHttpLoginCache().getKeys()) {
|
||||
SessionVO httpLogin = sessionManager.getHttpLogin(uuid);
|
||||
if( loginUserId.equals(httpLogin.getLoginUserId()) ) {
|
||||
spUuid = httpLogin.getUuid();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CacheInfoVO cache = sessionManager.getHttpLoginCache();
|
||||
if(isSpUserFound) {
|
||||
SessionVO svo = sessionManager.getHttpLogin(spUuid);
|
||||
if(svo != null) {
|
||||
rowCount++;
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data><%= svo.getLoginUserId() %></Data>
|
||||
<Data><%= svo.getLoginInstId() %></Data>
|
||||
<Data><%= svo.getWsInstId() %></Data>
|
||||
<Data><%= svo.getWsAdapterGroupName() %></Data>
|
||||
<Data><%= svo.getUuid() %></Data>
|
||||
</Row>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else {
|
||||
String cacheName = cache.getName();
|
||||
String cacheSize = String.valueOf(cache.getSize());
|
||||
String cacheTime = String.valueOf(cache.getTimeToLiveSeconds());
|
||||
|
||||
for(String key : cache.getKeys()) {
|
||||
SessionVO svo = sessionManager.getHttpLogin(key);
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data><%= svo.getLoginUserId() %></Data>
|
||||
<Data><%= svo.getLoginInstId() %></Data>
|
||||
<Data><%= svo.getWsInstId() %></Data>
|
||||
<Data><%= svo.getWsAdapterGroupName() %></Data>
|
||||
<Data><%= svo.getUuid() %></Data>
|
||||
</Row>
|
||||
<%
|
||||
rowCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if(rowCount == 0) {
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
</Row>
|
||||
<%
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace(out);
|
||||
}
|
||||
%>
|
||||
</Rows>
|
||||
</Dataset>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="euc-kr"?>
|
||||
<%@ page contentType="text/xml; charset=utf-8"%>
|
||||
<%@ page import="java.util.*,com.eactive.eai.common.util.Logger" %>
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ page import="com.eactive.eai.adapter.websocket.WebSocketSessionManager,org.java_websocket.WebSocket"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="com.eactive.eai.common.session.SessionManager,com.eactive.eai.common.session.SessionVO"%>
|
||||
<%@ page import="com.eactive.eai.common.session.CacheInfoVO"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ page import="org.apache.mina.common.IoSession"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="net.sf.ehcache.Cache,net.sf.ehcache.Element"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.ExpiringMap"%>
|
||||
<%@ page import="com.eactive.eai.common.util.DatetimeUtil"%>
|
||||
<%@ page import="com.eactive.eai.common.server.EAIServerManager"%>
|
||||
<Dataset>
|
||||
<Columns>
|
||||
<Column Name="eaiSvrInstNm" Type="string" Size="50" />
|
||||
<Column Name="loginUserId" Type="string" Size="50" />
|
||||
<Column Name="loginInstId" Type="string" Size="50" />
|
||||
<Column Name="wsInstId" Type="string" Size="50" />
|
||||
<Column Name="wsAdapterGroupName" Type="string" Size="50" />
|
||||
<Column Name="uuid" Type="string" Size="50" />
|
||||
<Column Name="hitCount" Type="string" Size="50" />
|
||||
<Column Name="creationTime" Type="string" Size="50" />
|
||||
<Column Name="lastAccessTime" Type="string" Size="50" />
|
||||
</Columns>
|
||||
<Rows>
|
||||
<%
|
||||
String eaiSvrInstNm = EAIServerManager.getInstance().getLocalServerName();
|
||||
String loginUserId = request.getParameter("loginUserId");
|
||||
boolean isSpUserFound = false;
|
||||
int rowCount = 0;
|
||||
try {
|
||||
if(loginUserId == null) {
|
||||
loginUserId = "";
|
||||
}
|
||||
else {
|
||||
loginUserId = loginUserId.trim();
|
||||
if(loginUserId.length() > 0) isSpUserFound = true;
|
||||
}
|
||||
SessionManager sessionManager = SessionManager.getInstance();
|
||||
CacheInfoVO cache = sessionManager.getLoginCache();
|
||||
|
||||
if(isSpUserFound) {
|
||||
SessionVO svo = sessionManager.getLogin(loginUserId);
|
||||
if(svo != null) {
|
||||
rowCount++;
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data><%= svo.getLoginUserId() %></Data>
|
||||
<Data><%= svo.getLoginInstId() %></Data>
|
||||
<Data><%= svo.getWsInstId() %></Data>
|
||||
<Data><%= svo.getWsAdapterGroupName() %></Data>
|
||||
<Data><%= svo.getUuid() %></Data>
|
||||
</Row>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else {
|
||||
String cacheName = cache.getName();
|
||||
String cacheSize = String.valueOf(cache.getSize());
|
||||
String cacheTime = String.valueOf(cache.getTimeToLiveSeconds());
|
||||
for(String key : cache.getKeys()) {
|
||||
SessionVO svo = sessionManager.getLogin(key);
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data><%= svo.getLoginUserId() %></Data>
|
||||
<Data><%= svo.getLoginInstId() %></Data>
|
||||
<Data><%= svo.getWsInstId() %></Data>
|
||||
<Data><%= svo.getWsAdapterGroupName() %></Data>
|
||||
<Data><%= svo.getUuid() %></Data>
|
||||
</Row>
|
||||
<%
|
||||
rowCount++;
|
||||
}
|
||||
}
|
||||
if(rowCount == 0) {
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
</Row>
|
||||
<%
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace(out);
|
||||
}
|
||||
%>
|
||||
</Rows>
|
||||
</Dataset>
|
||||
@@ -0,0 +1,274 @@
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8"%>
|
||||
<%@ page import="com.eactive.eai.adapter.websocket.WebSocketSessionManager,org.java_websocket.WebSocket"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="com.eactive.eai.common.session.SessionManager,com.eactive.eai.common.session.SessionVO"%>
|
||||
<%@ page import="com.eactive.eai.common.session.CacheInfoVO"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ page import="org.apache.mina.common.IoSession"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="net.sf.ehcache.Cache"%>
|
||||
<%@ page import="net.sf.ehcache.Cache,net.sf.ehcache.Element"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.ExpiringMap"%>
|
||||
<%@ page import="com.eactive.eai.common.util.DatetimeUtil"%>
|
||||
<%@ page import="com.eactive.eai.common.server.EAIServerManager"%>
|
||||
<HTML>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style>
|
||||
body {
|
||||
font-size: 9pt;
|
||||
scrollbar-face-color: #DCDCDC;
|
||||
scrollbar-shadow-color:#FFFFFF;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color: #BBBBBB;
|
||||
scrollbar-darkshadow-color: #BBBBBB;
|
||||
scrollbar-track-color: #EFEFEF;
|
||||
scrollbar-arrow-color: #626262;
|
||||
}
|
||||
|
||||
table {
|
||||
font-family: µ¸¿ò;
|
||||
font-size: 9pt;
|
||||
line-height: 14px;
|
||||
color: #555555;
|
||||
}
|
||||
</style>
|
||||
<TITLE>WebSocket Login Monitoring</TITLE>
|
||||
</head>
|
||||
<body>
|
||||
<p style="font-size:13pt;">
|
||||
<b>[ WebSocket Login Monitoring ]</b>
|
||||
</p>
|
||||
<%
|
||||
String eaiSvrInstNm = EAIServerManager.getInstance().getLocalServerName();
|
||||
String loginUserId = request.getParameter("loginUserId");
|
||||
boolean isSpUserFound = false;
|
||||
String spUuid = null;
|
||||
try {
|
||||
if(loginUserId == null) {
|
||||
loginUserId = "";
|
||||
}
|
||||
else {
|
||||
loginUserId = loginUserId.trim();
|
||||
if(loginUserId.length() > 0) isSpUserFound = true;
|
||||
}
|
||||
SessionManager sessionManager = SessionManager.getInstance();
|
||||
CacheInfoVO mcache = sessionManager.getEvictMasterCache();
|
||||
%>
|
||||
<li>WAS Instance name : <%=eaiSvrInstNm %>
|
||||
<li>Current DateTime : <%=DatetimeUtil.getTimeStampString() %>
|
||||
<li>Search parameter : loginUserId
|
||||
<form>
|
||||
<input type="text" name="loginUserId" value="<%= loginUserId %>" size="20"><input type="submit" name="filter" value="filter">
|
||||
</form>
|
||||
<hr>
|
||||
<p style="font-size:12pt;">
|
||||
<b>Adapter WebSocket (Local)</b>
|
||||
</p>
|
||||
<table width="100%" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
|
||||
<%
|
||||
WebSocketSessionManager wsSessionManager = WebSocketSessionManager.getInstance();
|
||||
HashMap<String, ConcurrentHashMap<String, WebSocket>> adapterGroups = wsSessionManager.getAdapterGroupConnections();
|
||||
Iterator i = adapterGroups.keySet().iterator();
|
||||
while (i.hasNext()) {
|
||||
String key = (String) i.next();
|
||||
ConcurrentHashMap<String, WebSocket> conMap = adapterGroups.get(key);
|
||||
%>
|
||||
<tr bgcolor="#ccccff">
|
||||
<td>adapterGroupName</td>
|
||||
<td>loginUserId</td>
|
||||
<td>localSocketAddress</td>
|
||||
<td>RemoteSocketAddress</td>
|
||||
<td>socketStatus</td>
|
||||
</tr>
|
||||
<%
|
||||
if(isSpUserFound) {
|
||||
WebSocket s = (WebSocket)conMap.get(loginUserId);
|
||||
if(s!= null) {
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= key %></td>
|
||||
<td><%= loginUserId %></td>
|
||||
<td><%= s.getLocalSocketAddress() %></td>
|
||||
<td><%= s.getRemoteSocketAddress() %></td>
|
||||
<td><%= s.getReadyState().name() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else {
|
||||
Iterator ci = conMap.keySet().iterator();
|
||||
while (ci.hasNext()) {
|
||||
String ckey = (String) ci.next();
|
||||
WebSocket s = (WebSocket)conMap.get(ckey);
|
||||
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= key %></td>
|
||||
<td><%= ckey %></td>
|
||||
<td><%= s.getLocalSocketAddress() %></td>
|
||||
<td><%= s.getRemoteSocketAddress() %></td>
|
||||
<td><%= s.getReadyState().name() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CacheInfoVO cacheInfo = sessionManager.getLoginCache();
|
||||
String cacheName = cacheInfo.getName();
|
||||
String cacheSize = String.valueOf(cacheInfo.getSize());
|
||||
String cacheTime = String.valueOf(cacheInfo.getTimeToLiveSeconds());
|
||||
%>
|
||||
</table>
|
||||
<hr>
|
||||
<p style="font-size:12pt;">
|
||||
<b>Shared Cache Info (Distributed)</b>
|
||||
</p>
|
||||
CacheName: <%= cacheName %>, CacheSize: <%= cacheSize %>, Cache TTL: <%= cacheTime %>
|
||||
|
||||
<p style="font-size:11pt;">
|
||||
<b>Shared Cache - Login Session Info</b>
|
||||
</p>
|
||||
<table width="100%" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
|
||||
<!-- <tr bgcolor="#ccccff"> -->
|
||||
<!-- <td>key</td> -->
|
||||
<!-- <td colspan="5">SessionVO</td> -->
|
||||
<!-- <td colspan="3">Cache Info</td> -->
|
||||
<!-- </tr> -->
|
||||
<tr bgcolor="#ccccff">
|
||||
<td>key</td>
|
||||
<td>loginUserId</td>
|
||||
<td>loginInstId</td>
|
||||
<td>wsInstId</td>
|
||||
<td>wsAdapterGroupName</td>
|
||||
<td>uuid</td>
|
||||
<td>brncd</td>
|
||||
<td>terminalId</td>
|
||||
</tr>
|
||||
<%
|
||||
if(isSpUserFound) {
|
||||
SessionVO svo = null;
|
||||
for(String uuid : sessionManager.getHttpLoginCache().getKeys()) {
|
||||
SessionVO httpLogin = sessionManager.getHttpLogin(uuid);
|
||||
if( loginUserId.equals(httpLogin.getLoginUserId()) ) {
|
||||
svo = httpLogin;
|
||||
spUuid = httpLogin.getUuid();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(svo != null) {
|
||||
spUuid = svo.getUuid();
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= loginUserId %></td>
|
||||
<td><%= svo.getLoginUserId() %></td>
|
||||
<td><%= svo.getLoginInstId() %></td>
|
||||
<td><%= svo.getWsInstId() %></td>
|
||||
<td><%= svo.getWsAdapterGroupName() %></td>
|
||||
<td><%= svo.getUuid() %></td>
|
||||
<td><%= svo.getBrncd() %></td>
|
||||
<td><%= svo.getTerminalId() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(String key : cacheInfo.getKeys()) {
|
||||
SessionVO svo = sessionManager.getHttpLogin(key);
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= key %></td>
|
||||
<td><%= svo.getLoginUserId() %></td>
|
||||
<td><%= svo.getLoginInstId() %></td>
|
||||
<td><%= svo.getWsInstId() %></td>
|
||||
<td><%= svo.getWsAdapterGroupName() %></td>
|
||||
<td><%= svo.getUuid() %></td>
|
||||
<td><%= svo.getBrncd() %></td>
|
||||
<td><%= svo.getTerminalId() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<hr>
|
||||
<%
|
||||
CacheInfoVO hcache = sessionManager.getHttpLoginCache();
|
||||
cacheName = hcache.getName();
|
||||
cacheSize = String.valueOf(hcache.getSize());
|
||||
cacheTime = String.valueOf(hcache.getTimeToLiveSeconds());
|
||||
%>
|
||||
<p style="font-size:12pt;">
|
||||
<b>HTTP Login Cache Info (Distributed)</b>
|
||||
</p>
|
||||
CacheName: <%= cacheName %>, CacheSize: <%= cacheSize %>, Cache TTL: <%= cacheTime %>
|
||||
|
||||
<p style="font-size:11pt;">
|
||||
<b>HTTP Login Cache - Session Info</b>
|
||||
</p>
|
||||
<table width="100%" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
|
||||
<tr bgcolor="#ccccff">
|
||||
<td>key</td>
|
||||
<td>loginUserId</td>
|
||||
<td>loginInstId</td>
|
||||
<td>wsInstId</td>
|
||||
<td>wsAdapterGroupName</td>
|
||||
<td>uuid</td>
|
||||
<td>brncd</td>
|
||||
<td>terminalId</td>
|
||||
</tr>
|
||||
<%
|
||||
int rowCount = 0;
|
||||
if(isSpUserFound) {
|
||||
SessionVO svo = sessionManager.getHttpLogin(spUuid);
|
||||
if(svo != null) {
|
||||
%>
|
||||
<tr bgcolor="white">
|
||||
<td><%= spUuid %></td>
|
||||
<td><%= svo.getLoginUserId() %></td>
|
||||
<td><%= svo.getLoginInstId() %></td>
|
||||
<td><%= svo.getWsInstId() %></td>
|
||||
<td><%= svo.getWsAdapterGroupName() %></td>
|
||||
<td><%= svo.getUuid() %></td>
|
||||
<td><%= svo.getBrncd() %></td>
|
||||
<td><%= svo.getTerminalId() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(String key : hcache.getKeys()) {
|
||||
SessionVO svo = sessionManager.getHttpLogin(key);
|
||||
if (svo == null){
|
||||
continue;
|
||||
}
|
||||
%>
|
||||
<tr bgcolor="white">
|
||||
<td><%= key %></td>
|
||||
<td><%= svo.getLoginUserId() %></td>
|
||||
<td><%= svo.getLoginInstId() %></td>
|
||||
<td><%= svo.getWsInstId() %></td>
|
||||
<td><%= svo.getWsAdapterGroupName() %></td>
|
||||
<td><%= svo.getUuid() %></td>
|
||||
<td><%= svo.getBrncd() %></td>
|
||||
<td><%= svo.getTerminalId() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<hr>
|
||||
<%
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace(out);
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</body>
|
||||
</HTML>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="euc-kr"?>
|
||||
<%@page import="java.util.concurrent.ConcurrentMap"%>
|
||||
<%@page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page contentType="text/xml; charset=utf-8"%>
|
||||
<%@ page import="java.util.*,com.eactive.eai.common.util.Logger" %>
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.config.SocketAdapterManager"%>
|
||||
<%@ page import="com.eactive.eai.common.session.SessionManager,com.eactive.eai.common.session.TerminalVO"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.protocol.ISocketAdapter"%>
|
||||
<%@ page import="org.apache.mina.common.IoSession"%>
|
||||
<%@ page import="net.sf.ehcache.Cache,net.sf.ehcache.Element"%>
|
||||
<%@ page import="net.sf.ehcache.Cache"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.ExpiringMap"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.TimeUtil"%>
|
||||
<%@ page import="com.eactive.eai.common.server.EAIServerManager"%>
|
||||
<Dataset>
|
||||
<Columns>
|
||||
<Column Name="eaiSvrInstNm" Type="string" Size="50" />
|
||||
<Column Name="adapterGroupName" Type="string" Size="50" />
|
||||
<Column Name="terminalNo" Type="string" Size="50" />
|
||||
<Column Name="localSocketAddress" Type="string" Size="50" />
|
||||
<Column Name="remoteSocketAddress" Type="string" Size="50" />
|
||||
<Column Name="createTime" Type="string" Size="20" />
|
||||
<Column Name="idleTime" Type="string" Size="20" />
|
||||
</Columns>
|
||||
<Rows>
|
||||
<%
|
||||
String eaiSvrInstNm = EAIServerManager.getInstance().getLocalServerName();
|
||||
//String terminalNo = request.getParameter("terminalNo");
|
||||
String terminalNo = "";
|
||||
//boolean isSpUserFound = false;
|
||||
int rowCount = 0;
|
||||
try {
|
||||
/*
|
||||
if(terminalNo == null) {
|
||||
terminalNo = "";
|
||||
}
|
||||
else {
|
||||
SessionManager sessionManager = SessionManager.getInstance();
|
||||
terminalNo = terminalNo.trim();
|
||||
if(terminalNo.length() > 0) {
|
||||
isSpUserFound = true;
|
||||
Cache lcache = sessionManager.getTerminalCache();
|
||||
Element el = lcache.get(terminalNo);
|
||||
if(el != null) {
|
||||
TerminalVO svo = (TerminalVO)el.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
ConcurrentMap<String, ConcurrentHashMap<String, ISocketAdapter>> adapterGroups = SocketAdapterManager.getInstance().getSocketAdapterGroups();
|
||||
for (String adapterGroupName : adapterGroups.keySet()) {
|
||||
ConcurrentHashMap<String, ISocketAdapter> adapters = adapterGroups.get(adapterGroupName);
|
||||
for (Map.Entry<String, ISocketAdapter> entry : adapters.entrySet()) {
|
||||
ISocketAdapter adapter = entry.getValue();
|
||||
if ("!XC3EPB".equals(adapter.getContext().getProtocol())){
|
||||
continue;
|
||||
}
|
||||
for (Iterator<IoSession> iii = adapter.getSessionPool().iterator() ; iii.hasNext(); ) {
|
||||
IoSession session1 = iii.next();
|
||||
TerminalVO vo = (TerminalVO)session1.getAttribute("TERMINAL_KEY");
|
||||
if (vo != null){
|
||||
terminalNo = vo.getTerminalNo();
|
||||
}
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data><%= adapterGroupName %></Data>
|
||||
<Data><%= terminalNo %></Data>
|
||||
<Data><%= session1.getLocalAddress() %></Data>
|
||||
<Data><%= session1.getRemoteAddress() %></Data>
|
||||
<Data><%= TimeUtil.formatDate(session1.getCreationTime())%></Data>
|
||||
<Data><%= TimeUtil.elapsedTime(session1.getLastIoTime())%></Data>
|
||||
</Row>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch(Exception e){
|
||||
}
|
||||
%>
|
||||
</Rows>
|
||||
</Dataset>
|
||||
@@ -0,0 +1,192 @@
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ page language="java" contentType="text/html; charset=utf-8"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.config.SocketAdapterManager"%>
|
||||
<%@ page import="com.eactive.eai.common.session.SessionManager,com.eactive.eai.common.session.TerminalVO"%>
|
||||
<%@ page import="com.eactive.eai.common.session.CacheInfoVO"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ page import="org.apache.mina.common.IoSession"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentMap"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="net.sf.ehcache.Cache"%>
|
||||
<%@ page import="net.sf.ehcache.Cache,net.sf.ehcache.Element"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.ExpiringMap"%>
|
||||
<%@ page import="com.eactive.eai.common.util.DatetimeUtil"%>
|
||||
<%@ page import="com.eactive.eai.common.server.EAIServerManager"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.config.SocketAdapterManager"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.protocol.ISocketAdapter"%>
|
||||
<%@ page import="org.apache.mina.common.IoSession"%>
|
||||
<%@ page import="net.sf.ehcache.Cache,net.sf.ehcache.Element"%>
|
||||
<%@ page import="net.sf.ehcache.Cache"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.ExpiringMap"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.TimeUtil"%>
|
||||
<%@ page import="com.eactive.eai.common.server.EAIServerManager"%>
|
||||
<HTML>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<style>
|
||||
body {
|
||||
font-size: 9pt;
|
||||
scrollbar-face-color: #DCDCDC;
|
||||
scrollbar-shadow-color:#FFFFFF;
|
||||
scrollbar-highlight-color:#FFFFFF;
|
||||
scrollbar-3dlight-color: #BBBBBB;
|
||||
scrollbar-darkshadow-color: #BBBBBB;
|
||||
scrollbar-track-color: #EFEFEF;
|
||||
scrollbar-arrow-color: #626262;
|
||||
}
|
||||
|
||||
table {
|
||||
font-family: µ¸¿ò;
|
||||
font-size: 9pt;
|
||||
line-height: 14px;
|
||||
color: #555555;
|
||||
}
|
||||
</style>
|
||||
<TITLE>Socket Terminal Monitoring</TITLE>
|
||||
</head>
|
||||
<body>
|
||||
<p style="font-size:13pt;">
|
||||
<b>[ Socket Terminal Monitoring ]</b>
|
||||
</p>
|
||||
<%
|
||||
String eaiSvrInstNm = EAIServerManager.getInstance().getLocalServerName();
|
||||
String terminalNo = request.getParameter("terminalNo");
|
||||
boolean isSpUserFound = false;
|
||||
String spUuid = null;
|
||||
try {
|
||||
if(terminalNo == null) {
|
||||
terminalNo = "";
|
||||
}
|
||||
else {
|
||||
terminalNo = terminalNo.trim();
|
||||
if(terminalNo.length() > 0) isSpUserFound = true;
|
||||
}
|
||||
SessionManager sessionManager = SessionManager.getInstance();
|
||||
%>
|
||||
<li>WAS Instance name : <%=eaiSvrInstNm %>
|
||||
<li>Current DateTime : <%=DatetimeUtil.getTimeStampString() %>
|
||||
<li>Search parameter : terminalNo
|
||||
<form>
|
||||
<input type="text" name="terminalNo" value="<%= terminalNo %>" size="20"><input type="submit" name="filter" value="filter">
|
||||
</form>
|
||||
<hr>
|
||||
<p style="font-size:12pt;">
|
||||
<b>Adapter Socket (Local)</b>
|
||||
</p>
|
||||
<table width="100%" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
|
||||
<tr bgcolor="#ccccff">
|
||||
<td>eaiSvrInstNm</td>
|
||||
<td>adapterGroupName</td>
|
||||
<td>terminalNo</td>
|
||||
<td>localSocketAddress</td>
|
||||
<td>remoteSocketAddress</td>
|
||||
<td>createTime</td>
|
||||
<td>idleTime</td>
|
||||
</tr>
|
||||
<%
|
||||
ConcurrentMap<String, ConcurrentHashMap<String, ISocketAdapter>> adapterGroups = SocketAdapterManager.getInstance().getSocketAdapterGroups();
|
||||
for (String adapterGroupName : adapterGroups.keySet()) {
|
||||
ConcurrentHashMap adapters = (ConcurrentHashMap) adapterGroups.get(adapterGroupName);
|
||||
for (Enumeration ee = adapters.elements() ; ee.hasMoreElements() ;) {
|
||||
ISocketAdapter adapter = (ISocketAdapter) ee.nextElement();
|
||||
if (!"XC3EPB".equals(adapter.getContext().getProtocol())){
|
||||
break;
|
||||
}
|
||||
for (Iterator iii = adapter.getSessionPool().iterator() ; iii.hasNext(); ) {
|
||||
IoSession session1 = (IoSession) iii.next();
|
||||
TerminalVO vo = (TerminalVO)session1.getAttribute("TERMINAL_KEY");
|
||||
%>
|
||||
|
||||
<%
|
||||
if(isSpUserFound && vo != null && vo.getTerminalNo().equals(terminalNo) ) {
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= eaiSvrInstNm %></td>
|
||||
<td><%= adapterGroupName %></td>
|
||||
<td><%= vo.getTerminalNo() %></td>
|
||||
<td><%= session1.getLocalAddress() %></td>
|
||||
<td><%= session1.getRemoteAddress() %></td>
|
||||
<td><%= TimeUtil.formatDate(session1.getCreationTime()) %></td>
|
||||
<td><%= TimeUtil.elapsedTime(session1.getLastIoTime()) %></td>
|
||||
</tr>
|
||||
<%
|
||||
} else {
|
||||
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= eaiSvrInstNm %></td>
|
||||
<td><%= adapterGroupName %></td>
|
||||
<td><%= vo.getTerminalNo() %></td>
|
||||
<td><%= session1.getLocalAddress() %></td>
|
||||
<td><%= session1.getRemoteAddress() %></td>
|
||||
<td><%= TimeUtil.formatDate(session1.getCreationTime()) %></td>
|
||||
<td><%= TimeUtil.elapsedTime(session1.getLastIoTime()) %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CacheInfoVO cacheInfo = sessionManager.getTerminalCache();
|
||||
String cacheName = cacheInfo.getName();
|
||||
String cacheSize = String.valueOf(cacheInfo.getSize());
|
||||
String cacheTime = String.valueOf(cacheInfo.getTimeToLiveSeconds());
|
||||
%>
|
||||
</table>
|
||||
<hr>
|
||||
<p style="font-size:12pt;">
|
||||
<b>Terminal Cache Info (Distributed)</b>
|
||||
</p>
|
||||
CacheName: <%= cacheName %>, CacheSize: <%= cacheSize %>, Cache TTL: <%= cacheTime %>
|
||||
|
||||
<p style="font-size:11pt;">
|
||||
<b>Shared Cache - Terminal Session Info</b>
|
||||
</p>
|
||||
<table width="100%" border=0 bgcolor='black' cellpadding="1" cellspacing="1">
|
||||
<tr bgcolor="#ccccff">
|
||||
<td>key</td>
|
||||
<td>terminalNo</td>
|
||||
<td>RofcCd</td>
|
||||
<td>Brncd</td>
|
||||
<td>BrnName</td>
|
||||
</tr>
|
||||
<%
|
||||
if(isSpUserFound) {
|
||||
TerminalVO svo = sessionManager.getTerminal(terminalNo);
|
||||
if(svo != null) {
|
||||
spUuid = svo.getTerminalNo();
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= terminalNo %></td>
|
||||
<td><%= svo.getTerminalNo() %></td>
|
||||
<td><%= svo.getRofcCd() %></td>
|
||||
<td><%= svo.getBrncd() %></td>
|
||||
<td><%= svo.getBrnName() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(String key : cacheInfo.getKeys()) {
|
||||
TerminalVO svo = sessionManager.getTerminal(key);
|
||||
%>
|
||||
<tr bgcolor='white'>
|
||||
<td><%= key %></td>
|
||||
<td><%= svo.getTerminalNo() %></td>
|
||||
<td><%= svo.getRofcCd() %></td>
|
||||
<td><%= svo.getBrncd() %></td>
|
||||
<td><%= svo.getBrnName() %></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace(out);
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</body>
|
||||
</HTML>
|
||||
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="euc-kr"?>
|
||||
<%@ page contentType="text/xml; charset=utf-8"%>
|
||||
<%@ page import="java.util.*,com.eactive.eai.common.util.Logger" %>
|
||||
<%@ page import="java.io.*"%>
|
||||
<%@ page import="com.eactive.eai.adapter.websocket.WebSocketSessionManager,org.java_websocket.WebSocket"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="com.eactive.eai.common.session.SessionManager,com.eactive.eai.common.session.SessionVO"%>
|
||||
<%@ page import="java.util.*"%>
|
||||
<%@ page import="org.apache.mina.common.IoSession"%>
|
||||
<%@ page import="java.util.concurrent.ConcurrentHashMap"%>
|
||||
<%@ page import="net.sf.ehcache.Cache,net.sf.ehcache.Element"%>
|
||||
<%@ page import="net.sf.ehcache.Cache"%>
|
||||
<%@ page import="com.eactive.eai.adapter.socket2.common.ExpiringMap"%>
|
||||
<%@ page import="com.eactive.eai.common.server.EAIServerManager"%>
|
||||
<Dataset>
|
||||
<Columns>
|
||||
<Column Name="eaiSvrInstNm" Type="string" Size="50" />
|
||||
<Column Name="adapterGroupName" Type="string" Size="50" />
|
||||
<Column Name="loginId" Type="string" Size="50" />
|
||||
<Column Name="localSocketAddress" Type="string" Size="50" />
|
||||
<Column Name="remoteSocketAddress" Type="string" Size="50" />
|
||||
<Column Name="socketStatus" Type="string" Size="20" />
|
||||
</Columns>
|
||||
<Rows>
|
||||
<%
|
||||
String eaiSvrInstNm = EAIServerManager.getInstance().getLocalServerName();
|
||||
String loginUserId = request.getParameter("loginUserId");
|
||||
boolean isSpUserFound = false;
|
||||
String spUuid = null;
|
||||
int rowCount = 0;
|
||||
try {
|
||||
if(loginUserId == null) {
|
||||
loginUserId = "";
|
||||
}
|
||||
else {
|
||||
SessionManager sessionManager = SessionManager.getInstance();
|
||||
loginUserId = loginUserId.trim();
|
||||
if(loginUserId.length() > 0) {
|
||||
isSpUserFound = true;
|
||||
for(String uuid : sessionManager.getHttpLoginCache().getKeys()) {
|
||||
SessionVO httpLogin = sessionManager.getHttpLogin(uuid);
|
||||
if( loginUserId.equals(httpLogin.getLoginUserId()) ) {
|
||||
spUuid = httpLogin.getUuid();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WebSocketSessionManager wsSessionManager = WebSocketSessionManager.getInstance();
|
||||
HashMap<String, ConcurrentHashMap<String, WebSocket>> adapterGroups = wsSessionManager.getAdapterGroupConnections();
|
||||
System.out.println("adapterGroups. " + adapterGroups);
|
||||
Iterator i = adapterGroups.keySet().iterator();
|
||||
while (i.hasNext()) {
|
||||
String adapterGroupName = (String) i.next();
|
||||
ConcurrentHashMap<String, WebSocket> conMap = adapterGroups.get(adapterGroupName);
|
||||
Iterator ci = conMap.keySet().iterator();
|
||||
|
||||
if(isSpUserFound) {
|
||||
WebSocket s = (WebSocket)conMap.get(loginUserId);
|
||||
if(s!= null) {
|
||||
rowCount++;
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data><%= adapterGroupName %></Data>
|
||||
<Data><%= loginUserId %></Data>
|
||||
<Data><%= s.getLocalSocketAddress() %></Data>
|
||||
<Data><%= s.getRemoteSocketAddress() %></Data>
|
||||
<Data><%= s.getReadyState().name() %></Data>
|
||||
</Row>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else {
|
||||
while (ci.hasNext()) {
|
||||
String ckey = (String) ci.next();
|
||||
//System.out.println(ckey + "=" + conMap.get(ckey));
|
||||
WebSocket s = (WebSocket)conMap.get(ckey);
|
||||
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data><%= adapterGroupName %></Data>
|
||||
<Data><%= ckey %></Data>
|
||||
<Data><%= s.getLocalSocketAddress() %></Data>
|
||||
<Data><%= s.getRemoteSocketAddress() %></Data>
|
||||
<Data><%= s.getReadyState().name() %></Data>
|
||||
</Row>
|
||||
<%
|
||||
rowCount++;
|
||||
}
|
||||
}
|
||||
if(rowCount == 0) {
|
||||
%>
|
||||
<Row>
|
||||
<Data><%= eaiSvrInstNm %></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
<Data></Data>
|
||||
</Row>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
//e.printStackTrace(out);
|
||||
}
|
||||
%>
|
||||
</Rows>
|
||||
</Dataset>
|
||||
Reference in New Issue
Block a user