init
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/target
|
||||||
|
/.settings
|
||||||
|
/.classpath
|
||||||
|
/.project
|
||||||
|
/.idea
|
||||||
|
*.iml
|
||||||
|
/build
|
||||||
277
pom.xml
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>kr.co.mantech</groupId>
|
||||||
|
<artifactId>acc-webapp-mvn</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>acc-webapp-mvn</name>
|
||||||
|
<description>Maven Accordion Webapp Test</description>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<java-version>1.8</java-version>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
|
||||||
|
<!-- String -->
|
||||||
|
<org.springframework-version>4.3.14.RELEASE</org.springframework-version>
|
||||||
|
<org.aspectj-version>1.8.9</org.aspectj-version>
|
||||||
|
|
||||||
|
<!-- Web -->
|
||||||
|
<jsp.version>2.2.1</jsp.version>
|
||||||
|
<jstl.version>1.2.1</jstl.version>
|
||||||
|
<servlet.version>3.0.1</servlet.version>
|
||||||
|
|
||||||
|
<!-- Logging -->
|
||||||
|
<org.slf4j-version>1.7.25</org.slf4j-version>
|
||||||
|
<log4-version>1.2.17</log4-version>
|
||||||
|
<org.apache.tiles.version>3.0.3</org.apache.tiles.version>
|
||||||
|
|
||||||
|
<!-- Maven -->
|
||||||
|
<maven-eclipse-plugin-version>2.10</maven-eclipse-plugin-version>
|
||||||
|
<maven-compiler-plugin-version>3.7.0</maven-compiler-plugin-version>
|
||||||
|
<exec-maven-plugin-version>1.6.0</exec-maven-plugin-version>
|
||||||
|
|
||||||
|
<!-- DB -->
|
||||||
|
<dbh2.version>1.4.187</dbh2.version>
|
||||||
|
<mariadb.version>2.7.2</mariadb.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- Spring -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-context</artifactId>
|
||||||
|
<version>${org.springframework-version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<!-- Exclude Commons Logging in favor of SLF4j -->
|
||||||
|
<exclusion>
|
||||||
|
<groupId>commons-logging</groupId>
|
||||||
|
<artifactId>commons-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-webmvc</artifactId>
|
||||||
|
<version>${org.springframework-version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- AspectJ -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.aspectj</groupId>
|
||||||
|
<artifactId>aspectjrt</artifactId>
|
||||||
|
<version>${org.aspectj-version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Logging -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-api</artifactId>
|
||||||
|
<version>${org.slf4j-version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>jcl-over-slf4j</artifactId>
|
||||||
|
<version>${org.slf4j-version}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
|
<version>${org.slf4j-version}</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>log4j</groupId>
|
||||||
|
<artifactId>log4j</artifactId>
|
||||||
|
<version>${log4-version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>javax.mail</groupId>
|
||||||
|
<artifactId>mail</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>javax.jms</groupId>
|
||||||
|
<artifactId>jms</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.sun.jdmk</groupId>
|
||||||
|
<artifactId>jmxtools</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.sun.jmx</groupId>
|
||||||
|
<artifactId>jmxri</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- @Inject -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.inject</groupId>
|
||||||
|
<artifactId>javax.inject</artifactId>
|
||||||
|
<version>1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Servlet -->
|
||||||
|
|
||||||
|
<!-- Servlet -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
|
<version>${servlet.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet.jsp</groupId>
|
||||||
|
<artifactId>javax.servlet.jsp-api</artifactId>
|
||||||
|
<version>${jsp.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet.jsp.jstl</groupId>
|
||||||
|
<artifactId>javax.servlet.jsp.jstl-api</artifactId>
|
||||||
|
<version>${jstl.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.web</groupId>
|
||||||
|
<artifactId>javax.servlet.jsp.jstl</artifactId>
|
||||||
|
<version>${jstl.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<!-- jstl-api was adding selvlet-api 2.5 and jsp-api-->
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>jstl-api</artifactId>
|
||||||
|
<groupId>javax.servlet.jsp.jstl</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet.jsp</groupId>
|
||||||
|
<artifactId>jsp-api</artifactId>
|
||||||
|
<version>2.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>jstl</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Test -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.11</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- tiles -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tiles</groupId>
|
||||||
|
<artifactId>tiles-jsp</artifactId>
|
||||||
|
<version>${org.apache.tiles.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tiles</groupId>
|
||||||
|
<artifactId>tiles-core</artifactId>
|
||||||
|
<version>${org.apache.tiles.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- H2 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
<version>${dbh2.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mariadb -->
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mariadb.jdbc</groupId>
|
||||||
|
<artifactId>mariadb-java-client</artifactId>
|
||||||
|
<version>${mariadb.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- DBCP -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-dbcp</groupId>
|
||||||
|
<artifactId>commons-dbcp</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.apache.maven/maven-plugin-api -->
|
||||||
|
<!--
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven</groupId>
|
||||||
|
<artifactId>maven-plugin-api</artifactId>
|
||||||
|
<version>3.0</version>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.elasticsearch.client</groupId>
|
||||||
|
<artifactId>elasticsearch-rest-high-level-client</artifactId>
|
||||||
|
<version>6.3.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.elasticsearch.client</groupId>
|
||||||
|
<artifactId>elasticsearch-rest-client</artifactId>
|
||||||
|
<version>6.3.0</version>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>acc-webapp-mvn</finalName>
|
||||||
|
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.1.0</version>
|
||||||
|
</plugin>
|
||||||
|
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>3.2.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
|
<version>2.5.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
||||||
158
src/main/java/kr/co/mantech/common/DBManager.java
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
package kr.co.mantech.common;
|
||||||
|
|
||||||
|
import java.sql.*;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import javax.naming.Context;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.NamingException;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
public class DBManager {
|
||||||
|
|
||||||
|
private static final Logger logger = Logger.getLogger(DBManager.class.getName());
|
||||||
|
private Context ctx;
|
||||||
|
private static DBManager instance;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public DBManager()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static DBManager getInstance()
|
||||||
|
{
|
||||||
|
if (instance==null)
|
||||||
|
{
|
||||||
|
instance=new DBManager();
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Connection getConnection(String dataSource)
|
||||||
|
{
|
||||||
|
DataSource ds = null;
|
||||||
|
Connection con = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ctx = new InitialContext();
|
||||||
|
// get each datasource
|
||||||
|
ds=(javax.sql.DataSource)ctx.lookup(dataSource);
|
||||||
|
// get each connection
|
||||||
|
con = ds.getConnection();
|
||||||
|
|
||||||
|
}catch (NamingException e)
|
||||||
|
{
|
||||||
|
logger.log(Level.SEVERE,e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (SQLException e) {
|
||||||
|
logger.log(Level.SEVERE,e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
logger.log(Level.INFO, "# getConnection ");
|
||||||
|
logger.log(Level.INFO, "#########################");
|
||||||
|
|
||||||
|
return con;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateSQL(PreparedStatement ps) throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
ps.executeUpdate();
|
||||||
|
logger.log(Level.INFO, "# updateSQL ");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResultSet selectSQL(PreparedStatement ps)
|
||||||
|
{
|
||||||
|
ResultSet rs = null;
|
||||||
|
try {
|
||||||
|
rs = ps.executeQuery();
|
||||||
|
|
||||||
|
} catch (SQLException e) {
|
||||||
|
logger.log(Level.SEVERE,e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
logger.log(Level.INFO, "# selectSQL ");
|
||||||
|
logger.log(Level.INFO, "# resultSet: " + rs);
|
||||||
|
|
||||||
|
return rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void insertSQL(PreparedStatement ps) throws Exception
|
||||||
|
{
|
||||||
|
ps.executeUpdate();
|
||||||
|
logger.log(Level.INFO, "# insertSQL ");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close(Connection dataSource)
|
||||||
|
{
|
||||||
|
if(dataSource != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dataSource.close();
|
||||||
|
}catch(SQLException e)
|
||||||
|
{e.printStackTrace();}
|
||||||
|
}
|
||||||
|
logger.log(Level.INFO, "# close DataSource ");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close(Connection dataSource, ResultSet rs, PreparedStatement ps)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if(dataSource != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dataSource.close();
|
||||||
|
}catch(SQLException e)
|
||||||
|
{e.printStackTrace();}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ps != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ps.close();
|
||||||
|
}catch(SQLException e)
|
||||||
|
{e.printStackTrace();}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(rs != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
rs.close();
|
||||||
|
}catch(SQLException e)
|
||||||
|
{e.printStackTrace();}
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.log(Level.INFO, "# close DataSource, ResultSet , ps ");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close(PreparedStatement ps)
|
||||||
|
{
|
||||||
|
if(ps != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ps.close();
|
||||||
|
}catch(SQLException e)
|
||||||
|
{e.printStackTrace();}
|
||||||
|
}
|
||||||
|
logger.log(Level.INFO, "# close PreparedStatement ");
|
||||||
|
}
|
||||||
|
}
|
||||||
161
src/main/java/kr/co/mantech/common/HeapLeakManager.java
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
package kr.co.mantech.common;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javassist.*;
|
||||||
|
|
||||||
|
public class HeapLeakManager {
|
||||||
|
|
||||||
|
private boolean infinite;
|
||||||
|
private int count;
|
||||||
|
private int classCount=0;
|
||||||
|
public enum CheckType {Heap, Perm};
|
||||||
|
ArrayList<StringBuilder> myArrayList = new ArrayList<StringBuilder>();
|
||||||
|
String temp="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
||||||
|
String className="kr.or.tta.bmt.F12.TEMP";
|
||||||
|
|
||||||
|
private CheckType type;
|
||||||
|
|
||||||
|
|
||||||
|
public HeapLeakManager()
|
||||||
|
{
|
||||||
|
this.infinite = false;
|
||||||
|
this.count = 1000;
|
||||||
|
this.type= CheckType.Heap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HeapLeakManager(boolean infinite, int count, CheckType type )
|
||||||
|
{
|
||||||
|
this.infinite = infinite;
|
||||||
|
this.count = count;
|
||||||
|
this.type=type;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Class generate(String name)
|
||||||
|
throws Exception
|
||||||
|
{
|
||||||
|
ClassPool pool = ClassPool.getDefault();
|
||||||
|
|
||||||
|
return pool.makeClass(name).toClass();
|
||||||
|
}
|
||||||
|
public HashMap makeHeapLeak() throws Exception
|
||||||
|
{
|
||||||
|
HashMap hm;
|
||||||
|
if (this.infinite)
|
||||||
|
{
|
||||||
|
while(true){
|
||||||
|
Thread.sleep(500);
|
||||||
|
for(int i=0;i<2000 ; i++)
|
||||||
|
{
|
||||||
|
myArrayList.add(new StringBuilder(temp));
|
||||||
|
}
|
||||||
|
printHeapInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(int i=0;i<this.count ; i++)
|
||||||
|
{
|
||||||
|
myArrayList.add(new StringBuilder(temp));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return printHeapInfo();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap makePermLeak() throws Exception
|
||||||
|
{
|
||||||
|
HashMap hm;
|
||||||
|
if (this.infinite)
|
||||||
|
{
|
||||||
|
while(true){
|
||||||
|
Thread.sleep(500);
|
||||||
|
for (int i = 0; i < 2000; i++)
|
||||||
|
{
|
||||||
|
generate(className + this.classCount);
|
||||||
|
this.classCount += 1L;
|
||||||
|
|
||||||
|
}
|
||||||
|
printHeapInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (int i = 0; i < this.count; i++)
|
||||||
|
{
|
||||||
|
generate(className + this.classCount);
|
||||||
|
this.classCount += 1L;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return printHeapInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap printHeapInfo() throws Exception, SecurityException
|
||||||
|
{
|
||||||
|
HashMap hm = new HashMap<String,Object>();
|
||||||
|
long heapSize = Runtime.getRuntime().totalMemory()/1024/1024;
|
||||||
|
long freeHeapSize = Runtime.getRuntime().freeMemory()/1024/1024;
|
||||||
|
ClassLoader myCL = Thread.currentThread().getContextClassLoader();
|
||||||
|
if (myCL != null) {
|
||||||
|
System.out.println("ClassLoader: " + myCL);
|
||||||
|
|
||||||
|
Class CL_class = myCL.getClass();
|
||||||
|
while (CL_class != java.lang.ClassLoader.class) {
|
||||||
|
CL_class = CL_class.getSuperclass();
|
||||||
|
}
|
||||||
|
java.lang.reflect.Field ClassLoader_classes_field = CL_class.getDeclaredField("classes");
|
||||||
|
ClassLoader_classes_field.setAccessible(true);
|
||||||
|
Vector classes = (Vector) ClassLoader_classes_field.get(myCL);
|
||||||
|
|
||||||
|
System.out.println(classes.size());
|
||||||
|
System.out.printf("Number of Loaded Class is %d \n", classes.size());
|
||||||
|
/*
|
||||||
|
for (Iterator iter = list(myCL); iter.hasNext();) {
|
||||||
|
System.out.println("\t" + iter.next());
|
||||||
|
}*/
|
||||||
|
//myCL = myCL.getParent();
|
||||||
|
|
||||||
|
hm.put("classesSize", classes.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
hm.put("heapSize", heapSize);
|
||||||
|
hm.put("freeHeapSize", freeHeapSize);
|
||||||
|
hm.put("ArraySize", myArrayList.size());
|
||||||
|
|
||||||
|
System.out.printf("HeapSize = %d MB\n", heapSize);
|
||||||
|
System.out.printf("FreeHeapSize = %d MB \n", freeHeapSize);
|
||||||
|
System.out.printf("ArraySize = %d <20><> \n", myArrayList.size());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return hm;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap doLeak() throws Exception
|
||||||
|
{
|
||||||
|
HashMap hm = null;
|
||||||
|
switch (this.type) {
|
||||||
|
case Perm:
|
||||||
|
hm = makePermLeak();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
hm = makeHeapLeak();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return hm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String args[]) throws Exception
|
||||||
|
{
|
||||||
|
HeapLeakManager hlm = new HeapLeakManager(true, 1000, CheckType.Heap);
|
||||||
|
hlm.doLeak();
|
||||||
|
hlm.printHeapInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
139
src/main/java/kr/co/mantech/jungwon/BindQuery.java
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
package kr.co.mantech.jungwon;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles requests for the application home page.
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class BindQuery extends Query
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Logger for this class
|
||||||
|
*/
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(BindQuery.class);
|
||||||
|
|
||||||
|
public static final String queryName="BindQuery";
|
||||||
|
public BindQuery()
|
||||||
|
{
|
||||||
|
// 쿼리 이름 셋팅 //
|
||||||
|
super(queryName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//init 호출
|
||||||
|
@RequestMapping(value = "/query/"+queryName+"/init", method = {RequestMethod.GET, RequestMethod.POST})
|
||||||
|
public String init(
|
||||||
|
Locale locale, Model model)
|
||||||
|
{
|
||||||
|
|
||||||
|
initQuery(fileName,orgFileName);
|
||||||
|
model.addAttribute("query", fileQueryString);
|
||||||
|
model.addAttribute("queryName", queryName);
|
||||||
|
model.addAttribute("bindCount",0);
|
||||||
|
return "/query/"+queryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
//save 호출
|
||||||
|
@RequestMapping(value = "/query/"+queryName+"/save", method = {RequestMethod.GET, RequestMethod.POST})
|
||||||
|
public String save(
|
||||||
|
Locale locale, Model model,
|
||||||
|
@RequestParam(value="querytextarea", required=false) String querytextarea,
|
||||||
|
@RequestParam(value="save", required=false) String save)
|
||||||
|
{
|
||||||
|
saveQuery(querytextarea);
|
||||||
|
model.addAttribute("query", fileQueryString);
|
||||||
|
model.addAttribute("queryName", queryName);
|
||||||
|
return "/query/"+queryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
//기본화면 호출
|
||||||
|
@RequestMapping(value = "/query/"+queryName, method = {RequestMethod.GET, RequestMethod.POST})
|
||||||
|
public String gibon(Locale locale, Model model, HttpServletResponse response,
|
||||||
|
@RequestParam(value="init", required=false) String init,
|
||||||
|
@RequestParam(value="save", required=false) String save,
|
||||||
|
@RequestParam(value="excute", required=false) String excute,
|
||||||
|
@RequestParam(value="v_name", required=false) List<String> v_name, // 바인드 변수 처리
|
||||||
|
@RequestParam(value="v_value", required=false) List<String> v_value, // 바인드 변수 처리
|
||||||
|
@RequestParam(value="v_type", required=false) List<String> v_type, // 바인드 변수 처리
|
||||||
|
@RequestParam(value="dataSource", required=false) String dataSource)
|
||||||
|
{
|
||||||
|
|
||||||
|
LinkedHashMap<String, String> results=null;
|
||||||
|
|
||||||
|
// Read Query
|
||||||
|
if(init==null & save==null & excute==null)
|
||||||
|
{
|
||||||
|
this.readQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(excute!=null && excute.equals("excute"))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
results = excuteQuery(this.queryString, dataSource,v_name, v_value,v_type);
|
||||||
|
model.addAttribute("queryResult", results.get("queryResult"));
|
||||||
|
model.addAttribute("resultCode", results.get("resultCode"));
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
//에러 발생시 500으로 응답
|
||||||
|
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||||
|
// 에러에 대한 result를 에러를 셋팅하여 보내줌
|
||||||
|
StringWriter sw= new StringWriter();
|
||||||
|
e.printStackTrace(new PrintWriter(sw));
|
||||||
|
model.addAttribute("queryResult",sw.toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(queryString.length()==0)
|
||||||
|
{
|
||||||
|
this.readQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled() && results !=null) {
|
||||||
|
logger.debug("gibon(Locale, Model, String, String, String, String) - queryString={}, columnsName={}", queryString, columnsName); //$NON-NLS-1$
|
||||||
|
|
||||||
|
model.addAttribute("columnsName",columnsName);
|
||||||
|
model.addAttribute("etime", results.get("etime"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
model.addAttribute("query", fileQueryString);
|
||||||
|
model.addAttribute("queryName", queryName);
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
logger.debug("gibon(Locale, Model, String, String, String, List<String>, String) - values=" + v_value); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
|
if (v_name!=null && !v_name.isEmpty())
|
||||||
|
{
|
||||||
|
model.addAttribute("bindCount",v_name.size());
|
||||||
|
model.addAttribute("v_name",v_name);
|
||||||
|
model.addAttribute("v_type",v_type);
|
||||||
|
model.addAttribute("v_value",v_value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
model.addAttribute("bindCount",0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "/query/"+queryName;
|
||||||
|
}
|
||||||
|
}
|
||||||
94
src/main/java/kr/co/mantech/jungwon/DBManager.java
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
package kr.co.mantech.jungwon;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import javax.naming.Context;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
import javax.naming.NamingException;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
public class DBManager {
|
||||||
|
/**
|
||||||
|
* Logger for this class
|
||||||
|
*/
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(DBManager.class);
|
||||||
|
|
||||||
|
public static Connection getConnection() throws Exception
|
||||||
|
{
|
||||||
|
logger.debug("getConnection");
|
||||||
|
return getConnection("datasource");
|
||||||
|
|
||||||
|
}
|
||||||
|
public static Connection getConnection(String dsName) throws Exception
|
||||||
|
{
|
||||||
|
Context initCtx = null;
|
||||||
|
Context envCtx = null;
|
||||||
|
Connection conn = null;
|
||||||
|
DataSource ds = null;
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("getConnection(String) - {}", "========START GET CONNECTION ============="); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
|
|
||||||
|
try { initCtx = new InitialContext();
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("getConnection(String) - {}", dsName); //$NON-NLS-1$
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String was_type=System.getProperty("WAS_TYPE");
|
||||||
|
logger.debug("getConnection(String) - WAS_TYPE{}", was_type);
|
||||||
|
if (was_type != null && was_type.equals("JEUS"))
|
||||||
|
{
|
||||||
|
//<2F>냼<EFBFBD>뒪 <20>닔<EFBFBD>젙 (<28>젣<EFBFBD>슦<EFBFBD>뒪<EFBFBD>씪<EFBFBD>븣)
|
||||||
|
logger.debug("getConnection(String) - WAS_TYPE{} JEUS", was_type);
|
||||||
|
ds = (DataSource)initCtx.lookup(dsName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger.debug("getConnection(String) - WAS_TYPE{} OTHERS", was_type);
|
||||||
|
ds = (DataSource)initCtx.lookup("java:/comp/env/"+dsName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
conn = ds.getConnection();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logger.error("getConnection(String)", ex); //$NON-NLS-1$
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (envCtx != null) {
|
||||||
|
envCtx.close();
|
||||||
|
}
|
||||||
|
if (initCtx != null)
|
||||||
|
initCtx.close();
|
||||||
|
}
|
||||||
|
catch (NamingException ex) {
|
||||||
|
logger.error("getConnection(String)", ex); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("getConnection(String) - {}", "========END GET CONNECTION ============="); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
|
return conn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void close(Connection con) throws Exception
|
||||||
|
{
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("close(Connection) - {}", "========START CLOSE CONNECTION ============="); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("close(Connection) - {}", "con" + con); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
|
if ( con != null ) try { con.close(); } catch(Exception e) {}
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("close(Connection) - {}", "========END CLOSE CONNECTION ============="); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
25
src/main/java/kr/co/mantech/jungwon/F12/APMBMT2Class.java
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package kr.co.mantech.jungwon.F12;
|
||||||
|
|
||||||
|
|
||||||
|
public class APMBMT2Class {
|
||||||
|
|
||||||
|
public APMBMT2Class ()
|
||||||
|
{
|
||||||
|
System.out.println("Contruction Init");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void printInfo(int second) throws Exception
|
||||||
|
{
|
||||||
|
System.out.println("===========================");
|
||||||
|
System.out.println("Start");
|
||||||
|
System.out.println("kr.or.tta.jungwon.F12.APMBMT2Class-printInfo");
|
||||||
|
Thread.sleep(second*1000);
|
||||||
|
System.out.println("kr.or.tta.jungwon.F12.APMBMT2Class-printInfo: "+ second + " sec");
|
||||||
|
System.out.println("End");
|
||||||
|
System.out.println("===========================");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
62
src/main/java/kr/co/mantech/jungwon/F12/APMBMTClass.java
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
package kr.co.mantech.jungwon.F12;
|
||||||
|
|
||||||
|
|
||||||
|
public class APMBMTClass {
|
||||||
|
|
||||||
|
public APMBMTClass ()
|
||||||
|
{
|
||||||
|
System.out.println("Contruction Init");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void printInfo(int second) throws Exception
|
||||||
|
{
|
||||||
|
System.out.println("===========================");
|
||||||
|
System.out.println("Start");
|
||||||
|
System.out.println("printInfo");
|
||||||
|
Thread.sleep(second*1000);
|
||||||
|
System.out.println("printInfo: "+ second + " sec");
|
||||||
|
System.out.println("End");
|
||||||
|
System.out.println("===========================");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printInfo1(int second) throws Exception
|
||||||
|
{
|
||||||
|
System.out.println("===========================");
|
||||||
|
System.out.println("Start");
|
||||||
|
System.out.println("printInfo-1");
|
||||||
|
Thread.sleep(second*1000);
|
||||||
|
System.out.println("printInfo-1: "+ second + " sec");
|
||||||
|
|
||||||
|
printInfo2(second);
|
||||||
|
|
||||||
|
System.out.println("End");
|
||||||
|
System.out.println("===========================");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void printInfo2(int second) throws Exception
|
||||||
|
{
|
||||||
|
System.out.println("===========================");
|
||||||
|
System.out.println("printInfo-2");
|
||||||
|
Thread.sleep(second*1000);
|
||||||
|
System.out.println("printInfo-2: "+ second + " sec");
|
||||||
|
System.out.println("===========================");
|
||||||
|
}
|
||||||
|
public void printInfo3(int second) throws Exception
|
||||||
|
{
|
||||||
|
System.out.println("===========================");
|
||||||
|
System.out.println("printInfo-3(check method cap time!!!)");
|
||||||
|
Thread.sleep(second*1000);
|
||||||
|
|
||||||
|
APMBMT2Class apm2 = new APMBMT2Class();
|
||||||
|
apm2.printInfo(5);
|
||||||
|
|
||||||
|
System.out.println("printInfo-3: "+ second + " sec");
|
||||||
|
System.out.println("===========================");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
324
src/main/java/kr/co/mantech/jungwon/Query.java
Normal file
@@ -0,0 +1,324 @@
|
|||||||
|
package kr.co.mantech.jungwon;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.Date;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.ResultSetMetaData;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import javax.net.ssl.HandshakeCompletedListener;
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
public abstract class Query {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(Query.class);
|
||||||
|
|
||||||
|
public static final String queryRepository = "/" + "resources"+File.separator+"query";
|
||||||
|
|
||||||
|
public StringBuffer fileQueryString = new StringBuffer();
|
||||||
|
public StringBuffer queryString = new StringBuffer();
|
||||||
|
|
||||||
|
public String columnsName;
|
||||||
|
public String fileName ;
|
||||||
|
public String orgFileName;
|
||||||
|
public String orgFileName2;
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<String> arrayOfBindName = new ArrayList();
|
||||||
|
|
||||||
|
@Autowired ServletContext servletContext; //servletConext <20>쓽議댁꽦 二쇱엯
|
||||||
|
|
||||||
|
// query<72>뙆<EFBFBD>씪<EFBFBD>쓣 <20>떎<EFBFBD>떆 <20>씫怨<EC94AB> 珥덇린<EB8D87>솕 <20>븳<EFBFBD>떎.
|
||||||
|
public Query(String queryName)
|
||||||
|
{
|
||||||
|
fileName = queryRepository+File.separator+queryName+".sql";
|
||||||
|
orgFileName= queryRepository+File.separator+queryName+".org.sql";
|
||||||
|
|
||||||
|
logger.info("fileName={}", fileName);
|
||||||
|
logger.info("orgFileName={}", orgFileName);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
public void initQuery(String fileName,String orgFileName)
|
||||||
|
{
|
||||||
|
|
||||||
|
File ifile = new File(servletContext.getRealPath("/")+orgFileName);
|
||||||
|
File ofile = new File(servletContext.getRealPath("/")+fileName);
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("init() - {}", ofile); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
FileOutputStream fo = new FileOutputStream(ofile);
|
||||||
|
FileInputStream fi = new FileInputStream(ifile);
|
||||||
|
|
||||||
|
int data = 0;
|
||||||
|
while ((data = fi.read()) != -1) {
|
||||||
|
fo.write(data);
|
||||||
|
}
|
||||||
|
fo.close();
|
||||||
|
fi.close();
|
||||||
|
|
||||||
|
this.readQuery();
|
||||||
|
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
logger.error("init()", e);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error("init()", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized void readQuery() // queryString <20>룞湲고솕
|
||||||
|
{
|
||||||
|
fileQueryString.setLength(0);
|
||||||
|
queryString.setLength(0);
|
||||||
|
InputStream is = servletContext.getResourceAsStream(fileName);
|
||||||
|
InputStreamReader isr = new InputStreamReader(is);
|
||||||
|
BufferedReader br = new BufferedReader(isr);
|
||||||
|
String s;
|
||||||
|
try {
|
||||||
|
while ((s=br.readLine())!=null)
|
||||||
|
{
|
||||||
|
fileQueryString.append(s);
|
||||||
|
//fileQueryString.append(System.lineSeparator());
|
||||||
|
fileQueryString.append(System.getProperty("line.separator"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.info("readQuery() - String fileQueryString={}", queryString); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
// <20>뙆<EFBFBD>씪<EFBFBD>쓣 <20>씪怨<EC94AA> <20>뙣<EFBFBD>꽩<EFBFBD>쑝濡<EC919D> <20>뙆<EFBFBD>씪誘명꽣瑜<EABDA3> 鍮쇱삤怨<EC82A4>, ? <20>쑝濡<EC919D> 臾몄옄瑜<EC9884> 援먯껜<EBA8AF>븳<EFBFBD>떎.
|
||||||
|
this.parseQuery();
|
||||||
|
}
|
||||||
|
public synchronized void parseQuery() // queryString <20>룞湲고솕
|
||||||
|
{
|
||||||
|
//Pattern pattern = Pattern.compile("#[a-zA-Z_0-9]*#");
|
||||||
|
String s_pattern=":[a-zA-Z_0-9]*";
|
||||||
|
Pattern pattern = Pattern.compile(s_pattern);
|
||||||
|
Matcher matcher = pattern.matcher(fileQueryString.toString());
|
||||||
|
|
||||||
|
//arrayOfString 珥덇린<EB8D87>솕
|
||||||
|
arrayOfBindName.clear();
|
||||||
|
|
||||||
|
//諛붿씤<EBB6BF>뱶 蹂<><E8B982>닔 <20>꽔湲<EABD94>//
|
||||||
|
while (matcher.find())
|
||||||
|
{
|
||||||
|
arrayOfBindName.add(matcher.group());
|
||||||
|
}
|
||||||
|
//諛붿씤<EBB6BF>뱶 蹂<><E8B982>닔<EFBFBD>뿉 ? <20>쑝濡<EC919D> 援먯껜
|
||||||
|
queryString.append(matcher.replaceAll("?"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStringAsName(String name, String value, String type, PreparedStatement ps) throws SQLException
|
||||||
|
{
|
||||||
|
String [] arrayString= arrayOfBindName.toArray(new String[]{});
|
||||||
|
|
||||||
|
logger.debug("setStringAsName(String, String, String, PreparedStatement) - String[] arrayString=" + arrayOfBindName); //$NON-NLS-1$
|
||||||
|
for(int i=0; i<arrayString.length;i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
logger.debug("setStringAsName(String, String, String, PreparedStatement) - arrayString[{}] = {} ,name = {} , value = {} , type = {}",
|
||||||
|
arrayString[i],i,name,value,type);
|
||||||
|
|
||||||
|
//<2F>뙣<EFBFBD>꽩<EFBFBD>뿉 留욌떎硫<EB968E> 諛붿씤<EBB6BF>뱶 蹂<><E8B982>닔 <20>뀑<EFBFBD>똿<EFBFBD>븿.
|
||||||
|
//if (((String) arrayString[i]).equals("#"+name+"#"))
|
||||||
|
if (((String) arrayString[i]).equals(":"+name))
|
||||||
|
{
|
||||||
|
if (type.equals("String"))
|
||||||
|
{
|
||||||
|
logger.debug("setStringAsName(String, String, String, PreparedStatement) - setString: i = {} name= {}, value= {}, type= {}",i,name,value,type);
|
||||||
|
ps.setString(i+1, value);
|
||||||
|
}
|
||||||
|
else if (type.equals("int"))
|
||||||
|
{
|
||||||
|
logger.debug("setStringAsName(String, String, String, PreparedStatement) - setInt: i = {} name= {}, value= {}, type= {}",i,name,value,type);
|
||||||
|
ps.setInt(i+1,Integer.parseInt(value));
|
||||||
|
}
|
||||||
|
else if (type.equals("Date"))
|
||||||
|
{
|
||||||
|
logger.debug("setStringAsName(String, String, String, PreparedStatement) - setDate: i = {} name= {}, value= {}, type= {}",i,name,value,type);
|
||||||
|
ps.setDate(i+1, Date.valueOf(value));
|
||||||
|
}
|
||||||
|
else if (type.equals("double"))
|
||||||
|
{
|
||||||
|
logger.debug("setStringAsName(String, String, String, PreparedStatement) - setDouble: i = {} name= {}, value= {}, type= {}",i,name,value,type);
|
||||||
|
ps.setDouble(i+1, Double.parseDouble(value));
|
||||||
|
}
|
||||||
|
else if (type.equals("BigDecimal"))
|
||||||
|
{
|
||||||
|
logger.debug("setStringAsName(String, String, String, PreparedStatement) - setBigDecimal: i = {} name= {}, value= {}, type= {}",i,name,value,type);
|
||||||
|
ps.setBigDecimal(i+1, BigDecimal.valueOf(Double.parseDouble(value)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// textarea<65>뿉 <20>엳<EFBFBD>뒗 <20>궡<EFBFBD>슜<EFBFBD>쓽 荑쇰━瑜<E29481> <20>뙆<EFBFBD>씪<EFBFBD>뿉 <20><><EFBFBD>젙<EFBFBD>븳<EFBFBD>떎.
|
||||||
|
public void saveQuery(String queryString)
|
||||||
|
{
|
||||||
|
File ofile = new File(servletContext.getRealPath("/")+fileName);
|
||||||
|
FileWriter fw = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
fw = new FileWriter(ofile, false) ;
|
||||||
|
fw.write(queryString);
|
||||||
|
|
||||||
|
//write Flush
|
||||||
|
fw.flush();
|
||||||
|
this.readQuery();
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
if(fw != null) try{fw.close();}catch(IOException e){}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public LinkedHashMap<String,String> excuteQuery(StringBuffer sql,String dataSource,List<String> names , List<String> values, List<String> type ) throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
ResultSet rs=null;
|
||||||
|
Connection con=null;
|
||||||
|
PreparedStatement ps=null;
|
||||||
|
// ArrayList results = new ArrayList();
|
||||||
|
LinkedHashMap<String,String> results = new LinkedHashMap<String,String>();
|
||||||
|
|
||||||
|
long begin=0;
|
||||||
|
long end=0;
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
logger.debug("excuteQuery(DataSource) - {}", dataSource); //$NON-NLS-1$
|
||||||
|
logger.debug("excuteQuery(sql) - {}", sql); //$NON-NLS-1$
|
||||||
|
logger.debug("excuteQuery(values) - {}", values); //$NON-NLS-1$
|
||||||
|
logger.debug("excuteQuery(type) - {}", type); //$NON-NLS-1$
|
||||||
|
|
||||||
|
con=DBManager.getConnection(dataSource);
|
||||||
|
ps = con.prepareStatement(sql.toString());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (values!=null && !values.isEmpty())
|
||||||
|
{
|
||||||
|
for (int i=0;i<values.size();i++)
|
||||||
|
{
|
||||||
|
logger.debug("excuteQuery(String, name,value) - name= {} type= {} " + "type="+type.get(i), names.get(i),values.get(i));
|
||||||
|
setStringAsName(names.get(i),values.get(i),type.get(i),ps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (logger.isDebugEnabled())
|
||||||
|
|
||||||
|
{
|
||||||
|
begin=System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
rs=ps.executeQuery();
|
||||||
|
|
||||||
|
StringBuffer stb_rsmd=new StringBuffer();
|
||||||
|
ResultSetMetaData rsmd = rs.getMetaData();
|
||||||
|
int columnCnt = rsmd.getColumnCount() ;
|
||||||
|
|
||||||
|
for(int i=1;i<=columnCnt;i++)
|
||||||
|
{
|
||||||
|
stb_rsmd.append(rsmd.getColumnName(i)+"\t");
|
||||||
|
}
|
||||||
|
columnsName=stb_rsmd.toString();
|
||||||
|
|
||||||
|
|
||||||
|
//<2F>뵒踰꾧렇 紐⑤뱶<E291A4>씪<EFBFBD>븣留<EBB8A3> resultSet<65>쓣 泥섎━<EC848E>븳<EFBFBD>떎.
|
||||||
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
StringBuffer stb=new StringBuffer();
|
||||||
|
while(rs.next())
|
||||||
|
{
|
||||||
|
// Row
|
||||||
|
|
||||||
|
for(int i=1;i<=columnCnt;i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled()) {
|
||||||
|
logger.debug("excuteQuery(StringBuffer, String) - {}", rs.getString(i)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
|
stb.append(rs.getString(i));
|
||||||
|
stb.append("\t");
|
||||||
|
|
||||||
|
}
|
||||||
|
// <20>뵒踰꾧렇 紐⑤뱶<E291A4>씪<EFBFBD>븣<EFBFBD>뒗 寃곌낵媛믪쓣 李띻퀬, <20>쟾<EFBFBD>넚<EFBFBD>븯吏<EBB8AF>留<EFBFBD>, <20>븘<EFBFBD>땺<EFBFBD>븣<EFBFBD>뒗 李띿<EFA7A1> <20>븡怨<EBB8A1> Success留<73> 李띿쓬
|
||||||
|
|
||||||
|
stb.append("\n");
|
||||||
|
}
|
||||||
|
logger.debug("excuteQuery(StringBuffer, String) - {}", stb); //$NON-NLS-1$
|
||||||
|
results.put("queryResult", stb.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
end=System.currentTimeMillis();
|
||||||
|
long etime=end-begin;
|
||||||
|
logger.debug("excuteQuery(StringBuffer, String) - >>>>>>>>> QUERY TIME - {} ms <<<<<<<<<<<" , etime);
|
||||||
|
results.put("etime", etime +"(ms)");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logger.isInfoEnabled()) {
|
||||||
|
logger.info("excuteQuery(StringBuffer, String) - Success"); //$NON-NLS-1$
|
||||||
|
results.put("resultCode", "Success");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch ( Exception e )
|
||||||
|
{
|
||||||
|
logger.error("excuteQuery(StringBuffer, String)", e);
|
||||||
|
// <20>뿉<EFBFBD>윭<EFBFBD>뿉 <20><><EFBFBD>븳 result瑜<74> <20>뿉<EFBFBD>윭瑜<EC9CAD> <20>뀑<EFBFBD>똿<EFBFBD>븯<EFBFBD>뿬 蹂대궡以<EAB6A1>
|
||||||
|
throw new Exception(e);
|
||||||
|
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if ( rs != null ) try { rs.close();} catch(Exception e){}
|
||||||
|
if ( ps != null ) try { ps.close(); } catch(Exception e) {}
|
||||||
|
if ( con != null ) try { con.close(); } catch(Exception e) {}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
139
src/main/java/kr/co/mantech/jungwon/Query1.java
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
package kr.co.mantech.jungwon;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles requests for the application home page.
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class Query1 extends Query
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Logger for this class
|
||||||
|
*/
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(Query1.class);
|
||||||
|
|
||||||
|
public static final String queryName="Query1";
|
||||||
|
public Query1()
|
||||||
|
{
|
||||||
|
// 荑쇰━ <20>씠由<EC94A0> <20>뀑<EFBFBD>똿 //
|
||||||
|
super(queryName);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//init <20>샇異<EC8387>
|
||||||
|
@RequestMapping(value = "/query/"+queryName+"/init", method = {RequestMethod.GET, RequestMethod.POST})
|
||||||
|
public String init(
|
||||||
|
Locale locale, Model model)
|
||||||
|
{
|
||||||
|
|
||||||
|
initQuery(fileName,orgFileName);
|
||||||
|
model.addAttribute("query", fileQueryString);
|
||||||
|
model.addAttribute("queryName", queryName);
|
||||||
|
model.addAttribute("bindCount",0);
|
||||||
|
return "/query/"+queryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
//save <20>샇異<EC8387>
|
||||||
|
@RequestMapping(value = "/query/"+queryName+"/save", method = {RequestMethod.GET, RequestMethod.POST})
|
||||||
|
public String save(
|
||||||
|
Locale locale, Model model,
|
||||||
|
@RequestParam(value="querytextarea", required=false) String querytextarea,
|
||||||
|
@RequestParam(value="save", required=false) String save)
|
||||||
|
{
|
||||||
|
saveQuery(querytextarea);
|
||||||
|
model.addAttribute("query", fileQueryString);
|
||||||
|
model.addAttribute("queryName", queryName);
|
||||||
|
return "/query/"+queryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
//湲곕낯<EAB395>솕硫<EC8695> <20>샇異<EC8387>
|
||||||
|
@RequestMapping(value = "/query/"+queryName, method = {RequestMethod.GET, RequestMethod.POST})
|
||||||
|
public String gibon(Locale locale, Model model, HttpServletResponse response,
|
||||||
|
@RequestParam(value="init", required=false) String init,
|
||||||
|
@RequestParam(value="save", required=false) String save,
|
||||||
|
@RequestParam(value="excute", required=false) String excute,
|
||||||
|
@RequestParam(value="v_name", required=false) List<String> v_name, // 諛붿씤<EBB6BF>뱶 蹂<><E8B982>닔 泥섎━
|
||||||
|
@RequestParam(value="v_value", required=false) List<String> v_value, // 諛붿씤<EBB6BF>뱶 蹂<><E8B982>닔 泥섎━
|
||||||
|
@RequestParam(value="v_type", required=false) List<String> v_type, // 諛붿씤<EBB6BF>뱶 蹂<><E8B982>닔 泥섎━
|
||||||
|
@RequestParam(value="dataSource", required=false) String dataSource)
|
||||||
|
{
|
||||||
|
|
||||||
|
LinkedHashMap<String, String> results=null;
|
||||||
|
|
||||||
|
// Read Query
|
||||||
|
if(init==null & save==null & excute==null)
|
||||||
|
{
|
||||||
|
this.readQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(excute!=null && excute.equals("excute"))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
results = excuteQuery(this.queryString, dataSource,v_name, v_value,v_type);
|
||||||
|
model.addAttribute("queryResult", results.get("queryResult"));
|
||||||
|
model.addAttribute("resultCode", results.get("resultCode"));
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
//<2F>뿉<EFBFBD>윭 諛쒖깮<EC9296>떆 500<30>쑝濡<EC919D> <20>쓳<EFBFBD>떟
|
||||||
|
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||||
|
// <20>뿉<EFBFBD>윭<EFBFBD>뿉 <20><><EFBFBD>븳 result瑜<74> <20>뿉<EFBFBD>윭瑜<EC9CAD> <20>뀑<EFBFBD>똿<EFBFBD>븯<EFBFBD>뿬 蹂대궡以<EAB6A1>
|
||||||
|
StringWriter sw= new StringWriter();
|
||||||
|
e.printStackTrace(new PrintWriter(sw));
|
||||||
|
model.addAttribute("queryResult",sw.toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(queryString.length()==0)
|
||||||
|
{
|
||||||
|
this.readQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled() && results !=null) {
|
||||||
|
logger.debug("gibon(Locale, Model, String, String, String, String) - queryString={}, columnsName={}", queryString, columnsName); //$NON-NLS-1$
|
||||||
|
|
||||||
|
model.addAttribute("columnsName",columnsName);
|
||||||
|
model.addAttribute("etime", results.get("etime"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
model.addAttribute("query", fileQueryString);
|
||||||
|
model.addAttribute("queryName", queryName);
|
||||||
|
|
||||||
|
if (logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
logger.debug("gibon(Locale, Model, String, String, String, List<String>, String) - values=" + v_value); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
|
if (v_name!=null && !v_name.isEmpty())
|
||||||
|
{
|
||||||
|
model.addAttribute("bindCount",v_name.size());
|
||||||
|
model.addAttribute("v_name",v_name);
|
||||||
|
model.addAttribute("v_type",v_type);
|
||||||
|
model.addAttribute("v_value",v_value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
model.addAttribute("bindCount",0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "/query/"+queryName;
|
||||||
|
}
|
||||||
|
}
|
||||||
106
src/main/java/kr/co/mantech/jungwon/Root.java
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
package kr.co.mantech.jungwon;
|
||||||
|
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
import java.io.*;
|
||||||
|
import javax.naming.*;
|
||||||
|
import java.sql.*;
|
||||||
|
import javax.sql.*;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.servlet.ServletContext;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles requests for the application home page.
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class Root {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(Root.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simply selects the home view to render by returning its name.
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/", method = RequestMethod.GET)
|
||||||
|
public String home(Locale locale, Model model) {
|
||||||
|
|
||||||
|
Date date = new Date();
|
||||||
|
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
|
||||||
|
|
||||||
|
String formattedDate = dateFormat.format(date);
|
||||||
|
//String stringFormat = "Start";
|
||||||
|
|
||||||
|
model.addAttribute("serverTime", formattedDate );
|
||||||
|
|
||||||
|
return "root";
|
||||||
|
}
|
||||||
|
@RequestMapping(value = "/jsp/session-info", method = RequestMethod.GET)
|
||||||
|
public String sessioninfo(Locale locale, Model model) {
|
||||||
|
|
||||||
|
|
||||||
|
return "/jsp/session-info";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/jsp/sleep", method = RequestMethod.GET)
|
||||||
|
public String sleep(Locale locale, Model model,
|
||||||
|
@RequestParam(value="second", required=false) String second)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (second == null )
|
||||||
|
{
|
||||||
|
second="1";
|
||||||
|
}
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
try {
|
||||||
|
Thread.sleep(Integer.parseInt(second)*1000);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
int cnt=0;
|
||||||
|
int count=5;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
|
||||||
|
// double a=Math.random();
|
||||||
|
// double b=Math.random();
|
||||||
|
double a=ThreadLocalRandom.current().nextDouble();
|
||||||
|
double b=ThreadLocalRandom.current().nextDouble();
|
||||||
|
|
||||||
|
System.out.println(a);
|
||||||
|
System.out.println(b);
|
||||||
|
double c=a*b*a;
|
||||||
|
|
||||||
|
if (cnt==count)
|
||||||
|
break;
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
long gap = (end-start);
|
||||||
|
|
||||||
|
model.addAttribute("second", second );
|
||||||
|
model.addAttribute("gap", gap );
|
||||||
|
|
||||||
|
return "/jsp/sleep";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
41
src/main/resources/log4j.xml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
|
||||||
|
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||||
|
|
||||||
|
<!-- Appenders -->
|
||||||
|
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||||
|
<param name="Target" value="System.out" />
|
||||||
|
<layout class="org.apache.log4j.PatternLayout">
|
||||||
|
<param name="ConversionPattern" value="%d{HH:mm:ss.SSS} [%t] %-5p - %m%n" />
|
||||||
|
</layout>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- Application Loggers -->
|
||||||
|
<logger name="kr.co.mantech.jungwon">
|
||||||
|
<level value="debug"/>
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<!-- 3rdparty Loggers -->
|
||||||
|
<logger name="org.springframework.core">
|
||||||
|
<level value="info" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<logger name="org.springframework.beans">
|
||||||
|
<level value="info" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<logger name="org.springframework.context">
|
||||||
|
<level value="info" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<logger name="org.springframework.web">
|
||||||
|
<level value="info" />
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<!-- Root Logger -->
|
||||||
|
<root>
|
||||||
|
<priority value="info" />
|
||||||
|
<appender-ref ref="console" />
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</log4j:configuration>
|
||||||
2
src/main/webapp/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
|
||||||
6
src/main/webapp/WEB-INF/jboss-web.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<jboss-web>
|
||||||
|
<replication-config>
|
||||||
|
<replication-trigger>SET</replication-trigger>
|
||||||
|
<replication-granularity>SESSION</replication-granularity>
|
||||||
|
</replication-config>
|
||||||
|
</jboss-web>
|
||||||
BIN
src/main/webapp/WEB-INF/lib/javassist-3.0.jar
Normal file
BIN
src/main/webapp/WEB-INF/lib/mysql-connector-java-5.1.31.jar
Normal file
BIN
src/main/webapp/WEB-INF/lib/ojdbc6.jar
Normal file
BIN
src/main/webapp/WEB-INF/lib/taglibs-standard-impl-1.2.3.jar
Normal file
13
src/main/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
|
||||||
|
<display-name>WEBAPP</display-name>
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>index.html</welcome-file>
|
||||||
|
<welcome-file>index.htm</welcome-file>
|
||||||
|
<welcome-file>index.jsp</welcome-file>
|
||||||
|
<welcome-file>default.html</welcome-file>
|
||||||
|
<welcome-file>default.htm</welcome-file>
|
||||||
|
<welcome-file>default.jsp</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
<distributable/>
|
||||||
|
</web-app>
|
||||||
39
src/main/webapp/css/template.css
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
html
|
||||||
|
{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
body
|
||||||
|
{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
h1,h2,h3,h4
|
||||||
|
{
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
#left
|
||||||
|
{
|
||||||
|
float: left;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
#contents
|
||||||
|
{
|
||||||
|
border-left:3px solid gray;
|
||||||
|
float: left;
|
||||||
|
padding: 20px;
|
||||||
|
height: 100%;
|
||||||
|
width: 60%;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
#middle
|
||||||
|
{
|
||||||
|
height: 70%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#footer
|
||||||
|
{
|
||||||
|
clear: both;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
25
src/main/webapp/html/error.html
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="EUC-KR">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan=2 style="background-color:#7a7a84;"><img src="../images/tta_logo.png" alt="TTA logo" /> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td ><img src="../images/bmt_logo.gif" alt="BMT logo" /></td>
|
||||||
|
<td style=" padding:10px;" width=100%/>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</hr>
|
||||||
|
<h1 style=" padding:10px;" width=100%> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD>Դϴ<D4B4>. !!</h1>
|
||||||
|
</hr>
|
||||||
|
<class="copyright">Copyright 2017 TTA All Rights Reserved (TTA <20>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD><C5B1><EFBFBD><EFBFBD><EFBFBD>ȸ)</p>
|
||||||
|
</html>
|
||||||
1
src/main/webapp/html/re.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<script>window.onload = function() {location.href = "http://localhost:8080/F00/html/error.html";}</script>
|
||||||
9
src/main/webapp/index.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/readme.jsp"/>
|
||||||
|
<jsp:param name="title" value="F01 Test Page"/>
|
||||||
|
</jsp:include>
|
||||||
39
src/main/webapp/jsp/F01-image.jsp
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<ul>
|
||||||
|
<c:set var="contextPath" value="<%= request.getContextPath()%>"></c:set>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 style=" padding:10px;" width=100%> APM BMT !!</h1>
|
||||||
|
<p>
|
||||||
|
샘플 1<br>
|
||||||
|
<img src="${contextPath}/images/dummy-100x100-1.jpg">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
샘플 2<br>
|
||||||
|
<img src="${contextPath}/images/dummy-100x100-2.jpg" width="245">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
샘플 3<br>
|
||||||
|
<img src="${contextPath}/images/dummy-100x100-3.jpg" width="245">
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
46
src/main/webapp/jsp/OOMTest.jsp
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import = "java.util.*" %>
|
||||||
|
<%@ page import = "kr.co.mantech.common.*" %>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<ul>
|
||||||
|
<c:set var="contextPath" value="<%= request.getContextPath()%>"></c:set>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 style=" padding:10px;" width=100%> OOM BMT !!</h1>
|
||||||
|
|
||||||
|
<%!
|
||||||
|
HeapLeakManager hlm = new HeapLeakManager(false,50000, HeapLeakManager.CheckType.Heap);
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
HashMap hm= hlm.doLeak();
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
<BR>
|
||||||
|
HeapSize =<%= hm.get("heapSize") %> MB
|
||||||
|
<BR>
|
||||||
|
freeHeapSize =<%= hm.get("freeHeapSize") %> MB
|
||||||
|
<BR>
|
||||||
|
ArraySize =<%= hm.get("ArraySize") %> 개
|
||||||
|
<BR>
|
||||||
|
Number of Loaded Class =<%= hm.get("classesSize") %> 개
|
||||||
|
<BR>
|
||||||
|
|
||||||
|
</h2></p>
|
||||||
|
|
||||||
|
</br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
48
src/main/webapp/jsp/PermOOM.jsp
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import = "java.util.*" %>
|
||||||
|
<%@ page import = "kr.co.mantech.common.*" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<ul>
|
||||||
|
<c:set var="contextPath" value="<%= request.getContextPath()%>"></c:set>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 style=" padding:10px;" width=100%> Perm OOM BMT !!</h1>
|
||||||
|
|
||||||
|
<%!
|
||||||
|
HeapLeakManager hlm = new HeapLeakManager(true,10000, HeapLeakManager.CheckType.Perm);
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
HashMap hm= hlm.doLeak();
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
<BR>
|
||||||
|
HeapSize =<%= hm.get("heapSize") %> MB
|
||||||
|
<BR>
|
||||||
|
freeHeapSize =<%= hm.get("freeHeapSize") %> MB
|
||||||
|
<BR>
|
||||||
|
ArraySize =<%= hm.get("ArraySize") %> 개
|
||||||
|
<BR>
|
||||||
|
Number of Loaded Class =<%= hm.get("classesSize") %> 개
|
||||||
|
<BR>
|
||||||
|
|
||||||
|
|
||||||
|
</h2></p>
|
||||||
|
|
||||||
|
</br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
40
src/main/webapp/jsp/classMethod.jsp
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<%@page import="java.util.Calendar"%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="kr.co.mantech.jungwon.F12.*" %>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
APMBMTClass apm = new APMBMTClass();
|
||||||
|
out.println("APMBMTClass + printInfo + 1 second");
|
||||||
|
out.println("</BR>");
|
||||||
|
apm.printInfo(1);
|
||||||
|
|
||||||
|
out.println("APMBMTClass + printInfo + 5 second");
|
||||||
|
apm.printInfo(5);
|
||||||
|
out.println("</BR>");
|
||||||
|
|
||||||
|
out.println("APMBMTClass + printInfo + 10 second");
|
||||||
|
apm.printInfo(10);
|
||||||
|
out.println("</BR>");
|
||||||
|
|
||||||
|
|
||||||
|
out.println("APMBMTClass + printInfo-nested");
|
||||||
|
apm.printInfo1(1);
|
||||||
|
out.println("</BR>");
|
||||||
|
|
||||||
|
out.println("APMBMTClass + printInfo + Check Method Cap Time ");
|
||||||
|
apm.printInfo3(1);
|
||||||
|
out.println("</BR>");
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
</html>
|
||||||
5
src/main/webapp/jsp/common/footer.jsp
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<hr/>
|
||||||
|
<class="copyright">Copyright 2020 (주)맨텍 All Rights Reserved</p>
|
||||||
18
src/main/webapp/jsp/common/header.jsp
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<c:set var="contextPath" value="<%= request.getContextPath()%>"></c:set>
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan=2 style="background-color:#white;"><img src="${contextPath}/resources/images/mantech.png" alt="Mantech logo" /> </td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td ><img src="${contextPath}/resources/images/accordion_img.png" alt="accordion logo" /></td>
|
||||||
|
<td style=" padding:10px;" width=100%><h1 >샘플 테스트 WEBAPP Version 1</h1>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<hr/>
|
||||||
56
src/main/webapp/jsp/common/menu.jsp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<ul>
|
||||||
|
<c:set var="contextPath" value="<%= request.getContextPath()%>"></c:set>
|
||||||
|
<li><a href="${contextPath}/pages/1.jsp">기본페이지 호출</a></li >
|
||||||
|
|
||||||
|
<li> F01 : 클라이언트 분리 호출(이미지/JSP) </li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/F01-image.jsp">F01 이미지 분리 화면 호출</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<li>샘플 세션 정보</li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/session-info.jsp">Session : 샘플 세션 정보 </a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<li>OOM 테스트</li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/OOMTest.jsp">OOM 테스트 : heapdump, 메모리 추이등 확인 </a></li>
|
||||||
|
<li><a href="${contextPath}/pages/PermOOM.jsp">Perm영역 OOM 테스트 : OutOfMemory 확인</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<li>cpu 사용률 증가</li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/cpu.jsp">CPU사용률 테스트 : CPU 사용률 증가 확인 </a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<li>임의 클래스 매소드 추적</li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/classMethod.jsp">임의 클래스/ 메소드 호출</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<li>DB 커넥션 정보</li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/db-connection-info.jsp">DB : ConnectionPool </a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<li>DB 커넥션 leak</li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/db-connection-leak.jsp"> DB : Connection Leak </a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<li>Thread Sleep</li>
|
||||||
|
<ul>
|
||||||
|
<li><a href="${contextPath}/pages/thread-sleep.jsp"> Thread : Thread 무한 대기 </a></li>
|
||||||
|
<li><a href="${contextPath}/pages/thread-sleep-3.jsp"> Thread : Thread 3초 대기 </a></li>
|
||||||
|
<li><a href="${contextPath}/pages/thread-sleep-1.jsp"> Thread : Thread 1초 대기 </a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
52
src/main/webapp/jsp/common/sleep.jsp
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<%@page import="java.util.Calendar"%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<%
|
||||||
|
|
||||||
|
String second = request.getParameter("second");
|
||||||
|
if (second == null )
|
||||||
|
{
|
||||||
|
second="1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
<body>
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan=2 style="background-color:#7a7a84;"><img src="../images/tta_logo.png" alt="TTA logo" /> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td ><img src="../images/bmt_logo.gif" alt="BMT logo" /></td>
|
||||||
|
<td style=" padding:10px;" width=100%> <h1>Sleep for ${second} second </h1>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
Thread.sleep(Integer.parseInt(second)*1000);
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
long gap = (end-start);
|
||||||
|
%>
|
||||||
|
|
||||||
|
<h1 style=" padding:10px;" >Call Success !!!!! </h1> <br>
|
||||||
|
<h2>elapsed time = <%= gap %> ms </h2> <br>
|
||||||
|
<hr/>
|
||||||
|
<class="copyright">Copyright 2017 TTA All Rights Reserved (TTA 한국정보통신기술협회)</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
38
src/main/webapp/jsp/common/template.jsp
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
|
||||||
|
<c:set var="title" value="TTA_F01" />
|
||||||
|
<c:set var="content" value="content" />
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>${param.title}</title>
|
||||||
|
<link rel="stylesheet" type="text/css"
|
||||||
|
href="${pageContext.request.contextPath}/css/template.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="header">
|
||||||
|
<jsp:include page="/jsp/common/header.jsp" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="middle">
|
||||||
|
<div id="left"> <h4>TEST CASE</h4>
|
||||||
|
<jsp:include page="/jsp/common/menu.jsp" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="contents" >
|
||||||
|
<jsp:include page="/${param.content}" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
<jsp:include page="/jsp/common/footer.jsp" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
38
src/main/webapp/jsp/cpu.jsp
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<%@page import="java.util.Calendar"%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<%
|
||||||
|
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
int time=0;
|
||||||
|
|
||||||
|
for (int i=1; i<100000;i++)
|
||||||
|
{
|
||||||
|
double temp = Math.random()* Math.random() * 100;
|
||||||
|
String str = "aaa";
|
||||||
|
str = str+str;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.sleep(100);
|
||||||
|
|
||||||
|
time++;
|
||||||
|
if (time==200)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
||||||
|
</html>
|
||||||
89
src/main/webapp/jsp/db-connection-info.jsp
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
<%@ page language="java" contentType="text/html;charset=EUC-KR"%>
|
||||||
|
<%@ page import="kr.co.mantech.common.DBManager" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>XA_DataSource Test</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%
|
||||||
|
String sql = request.getParameter("sql");
|
||||||
|
if (sql==null)
|
||||||
|
sql="select * from emp";
|
||||||
|
String dsName = request.getParameter("dsName");
|
||||||
|
%>
|
||||||
|
<Table align=left border="1" width=100%>
|
||||||
|
<tr><td align="left">JNDI NAME</td> <td align="left"><%=dsName%></td></tr>
|
||||||
|
<tr><td align="left">selectSQL</td> <td align="left"><%=sql%></td></tr>
|
||||||
|
<tr><td align="left">DESC</td> <td align="left">Select from <%=dsName%> </td>
|
||||||
|
<%
|
||||||
|
ResultSet rs=null;
|
||||||
|
Connection con=null;
|
||||||
|
PreparedStatement ps = null;
|
||||||
|
DBManager db;
|
||||||
|
db = new DBManager();
|
||||||
|
%>
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
<Form method = "get" action="${pageContext.request.contextPath}/pages/db-connection-info.jsp">
|
||||||
|
|
||||||
|
<Table align=left border="1" width=100%>
|
||||||
|
<tr>
|
||||||
|
<td align=right width=30% >DataSource JNDI</td>
|
||||||
|
<td><input type="text" name="dsName" value="${param.dsName}"/> </td>
|
||||||
|
<tr>
|
||||||
|
<tr>
|
||||||
|
<td align=right width=30% >SQL</td>
|
||||||
|
<td ><input type="text" name="sql" value="${param.sql}" /> </td>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align=center width=100%><input type="submit" name="input" value="<22>Է<EFBFBD>"></td>
|
||||||
|
</tr>
|
||||||
|
</Table>
|
||||||
|
</Form>
|
||||||
|
</h3>
|
||||||
|
<%
|
||||||
|
if (dsName !=null )
|
||||||
|
{
|
||||||
|
con = db.getConnection(dsName);
|
||||||
|
ps = con.prepareStatement(sql);
|
||||||
|
rs = db.selectSQL(ps);
|
||||||
|
ResultSetMetaData rsmd = rs.getMetaData();
|
||||||
|
int columnCnt = rsmd.getColumnCount() ;
|
||||||
|
out.print("<br>");
|
||||||
|
out.print("<h2> Sql Query = " + sql + "</h2>");
|
||||||
|
out.print("<table border=1 bordercolor=\"gray\" cellspacing=1 cellpadding=0 width=\"100%\">");
|
||||||
|
for(int i=1;i<=columnCnt;i++)
|
||||||
|
{
|
||||||
|
out.print("<td>");
|
||||||
|
out.print(rsmd.getColumnName(i));
|
||||||
|
out.print("</td>");
|
||||||
|
}
|
||||||
|
out.print("</tr>");
|
||||||
|
|
||||||
|
while(rs.next())
|
||||||
|
{
|
||||||
|
out.print("<tr>");
|
||||||
|
for(int i=1;i<=columnCnt;i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
out.print("<td>");
|
||||||
|
out.print(rs.getString(i));
|
||||||
|
out.print("</td>");
|
||||||
|
}
|
||||||
|
out.print("</tr>");
|
||||||
|
}
|
||||||
|
out.print("</table>");
|
||||||
|
|
||||||
|
db.close(con, rs, ps);
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
89
src/main/webapp/jsp/db-connection-leak.jsp
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
<%@ page language="java" contentType="text/html;charset=EUC-KR"%>
|
||||||
|
<%@ page import="kr.co.mantech.common.DBManager" %>
|
||||||
|
<%@ page import="java.sql.*" %>
|
||||||
|
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||||
|
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Conncecion Leak</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<%
|
||||||
|
String sql = request.getParameter("sql");
|
||||||
|
if (sql==null)
|
||||||
|
sql="select * from emp";
|
||||||
|
String dsName = request.getParameter("dsName");
|
||||||
|
%>
|
||||||
|
<Table align=left border="1" width=100%>
|
||||||
|
<tr><td align="left">JNDI NAME</td> <td align="left"><%=dsName%></td></tr>
|
||||||
|
<tr><td align="left">selectSQL</td> <td align="left"><%=sql%></td></tr>
|
||||||
|
<tr><td align="left">DESC</td> <td align="left">Select from <%=dsName%> </td>
|
||||||
|
<%
|
||||||
|
ResultSet rs=null;
|
||||||
|
Connection con=null;
|
||||||
|
PreparedStatement ps = null;
|
||||||
|
DBManager db;
|
||||||
|
db = new DBManager();
|
||||||
|
%>
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
<Form method = "get" action="${pageContext.request.contextPath}/pages/db-connection-leak.jsp">
|
||||||
|
|
||||||
|
<Table align=left border="1" width=100%>
|
||||||
|
<tr>
|
||||||
|
<td align=right width=30% >DataSource JNDI</td>
|
||||||
|
<td><input type="text" name="dsName" value="${param.dsName}"/> </td>
|
||||||
|
<tr>
|
||||||
|
<tr>
|
||||||
|
<td align=right width=30% >SQL</td>
|
||||||
|
<td ><input type="text" name="sql" value="${param.sql}" /> </td>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" align=center width=100%><input type="submit" name="input" value="<22>Է<EFBFBD>"></td>
|
||||||
|
</tr>
|
||||||
|
</Table>
|
||||||
|
</Form>
|
||||||
|
</h3>
|
||||||
|
<%
|
||||||
|
if (dsName !=null )
|
||||||
|
{
|
||||||
|
con = db.getConnection(dsName);
|
||||||
|
ps = con.prepareStatement(sql);
|
||||||
|
rs = db.selectSQL(ps);
|
||||||
|
ResultSetMetaData rsmd = rs.getMetaData();
|
||||||
|
int columnCnt = rsmd.getColumnCount() ;
|
||||||
|
out.print("<br>");
|
||||||
|
out.print("<h2> Sql Query = " + sql + "</h2>");
|
||||||
|
out.print("<table border=1 bordercolor=\"gray\" cellspacing=1 cellpadding=0 width=\"100%\">");
|
||||||
|
for(int i=1;i<=columnCnt;i++)
|
||||||
|
{
|
||||||
|
out.print("<td>");
|
||||||
|
out.print(rsmd.getColumnName(i));
|
||||||
|
out.print("</td>");
|
||||||
|
}
|
||||||
|
out.print("</tr>");
|
||||||
|
|
||||||
|
while(rs.next())
|
||||||
|
{
|
||||||
|
out.print("<tr>");
|
||||||
|
for(int i=1;i<=columnCnt;i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
out.print("<td>");
|
||||||
|
out.print(rs.getString(i));
|
||||||
|
out.print("</td>");
|
||||||
|
}
|
||||||
|
out.print("</tr>");
|
||||||
|
}
|
||||||
|
out.print("</table>");
|
||||||
|
|
||||||
|
//db.close(con, rs, ps);
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
16
src/main/webapp/jsp/normal.jsp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 style=" padding:10px;" width=100%> APM BMT !!</h1>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
28
src/main/webapp/jsp/readme.jsp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<H2>
|
||||||
|
APM BMT 테스트
|
||||||
|
</H2>
|
||||||
|
|
||||||
|
1) 기본 페이지 <br>
|
||||||
|
http://IP/NIA-APM-BMT/jsp/common/normal.jsp <br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2) F01 : 클라이언트 분리 호출(이미지/JSP)<br>
|
||||||
|
|
||||||
|
3) F02, F03 등 : HeapDump 생성 : 메모리 관련 모니터링(OutOfMemory) <br>
|
||||||
|
|
||||||
|
4) F06 : DB Connection 관련 <br>
|
||||||
|
|
||||||
|
5) 응답지연 관련 : sleep.jsp <br>
|
||||||
|
|
||||||
|
6) cpu 관련 : cpu.jsp <br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
28
src/main/webapp/jsp/sample.jsp
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan=2 style="background-color:#7a7a84;"><img src="../images/tta_logo.png" alt="TTA logo" /> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td ><img src="../images/bmt_logo.gif" alt="BMT logo" /></td>
|
||||||
|
<td style=" padding:10px;" width=100%/>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</hr>
|
||||||
|
<h1 style=" padding:10px;" width=100%> Sample WAS BMT !!</h1>
|
||||||
|
</hr>
|
||||||
|
<class="copyright">Copyright 2017 TTA All Rights Reserved (TTA 한국정보통신기술협회)</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
69
src/main/webapp/jsp/session-info.jsp
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
|
||||||
|
<%@page import="java.util.*" %>
|
||||||
|
<%@page import="java.text.*" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<%
|
||||||
|
HttpSession sess = request.getSession();
|
||||||
|
boolean isNew = session.isNew();
|
||||||
|
String sessionId = session.getId();
|
||||||
|
long creationTime = session.getCreationTime();
|
||||||
|
long lastAccessedTime = session.getLastAccessedTime();
|
||||||
|
int maxInactiveInterval = session.getMaxInactiveInterval();
|
||||||
|
int rand_M=(int)(Math.random()*10000);
|
||||||
|
int rand_MS=(int)(Math.random()*10000);
|
||||||
|
|
||||||
|
|
||||||
|
if (sess.getAttribute("SessionAttr") ==null) {
|
||||||
|
out.println("<h2> session out </h2>");
|
||||||
|
sess.setAttribute("SessionAttr", rand_M+"");
|
||||||
|
sess.setAttribute("SessionAttr2", rand_MS+"");
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
|
out.println("<h2> session exist </h2>");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
java.util.Enumeration e = sess.getAttributeNames();
|
||||||
|
%>
|
||||||
|
<table border=1 bordercolor="gray" cellspacing=1 cellpadding=0 width="100%">
|
||||||
|
<tr bgcolor="gray"><td colspan=2 align="center"><font color="white"><b>Session Info</b></font></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td width="25%">Session ID</td><td width="75%"><%=sessionId%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>isNewe</td><td><%=isNew%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Creation Time</td><td><%=new Date(creationTime)%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Last Accessed Time</td><td><%=new Date(lastAccessedTime)%></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Max Inactive Interval</td><td><%=maxInactiveInterval%></td>
|
||||||
|
</tr>
|
||||||
|
<tr bgcolor="cyan"><td colspan=2 align="center"><b>Session Vaule List<b></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">NAME</td>
|
||||||
|
<td align="center">VAULE</td>
|
||||||
|
</tr>
|
||||||
|
<%
|
||||||
|
String name = null;
|
||||||
|
while ( e.hasMoreElements() ) {
|
||||||
|
name = (String) e.nextElement();
|
||||||
|
%>
|
||||||
|
<tr><BR><td align="left">sessnion name <%=name%></td><BR> <td align="left"><%=sess.getAttribute(name)%></td></tr>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
</table>
|
||||||
75
src/main/webapp/jsp/sleep.jsp
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<%@page import="java.util.Calendar"%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="java.util.concurrent.*" %>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<%
|
||||||
|
|
||||||
|
String second = request.getParameter("second");
|
||||||
|
if (second == null )
|
||||||
|
{
|
||||||
|
second="1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
<body>
|
||||||
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan=2 style="background-color:#7a7a84;"><img src="../images/tta_logo.png" alt="TTA logo" /> </td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td ><img src="../images/bmt_logo.gif" alt="BMT logo" /></td>
|
||||||
|
<td style=" padding:10px;" width=100%> <h1>Sleep for ${second} second </h1>
|
||||||
|
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
Thread.sleep(Integer.parseInt(second)*1000);
|
||||||
|
|
||||||
|
int cnt=0;
|
||||||
|
int count=5;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
|
||||||
|
// double a=Math.random();
|
||||||
|
// double b=Math.random();
|
||||||
|
double a=ThreadLocalRandom.current().nextDouble();
|
||||||
|
double b=ThreadLocalRandom.current().nextDouble();
|
||||||
|
|
||||||
|
System.out.println(a);
|
||||||
|
System.out.println(b);
|
||||||
|
double c=a*b*a;
|
||||||
|
|
||||||
|
if (cnt==count)
|
||||||
|
break;
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
long gap = (end-start);
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<h1 style=" padding:10px;" >Call Success !!!!! </h1> <br>
|
||||||
|
<h2>elapsed time = <%= gap %> ms </h2> <br>
|
||||||
|
<hr/>
|
||||||
|
<class="copyright">Copyright 2017 TTA All Rights Reserved (TTA 한국정보통신기술협회)</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
55
src/main/webapp/jsp/sleep2.jsp
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<%@page import="java.util.Calendar"%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<%@ page import="java.util.concurrent.*" %>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<%
|
||||||
|
|
||||||
|
String second = request.getParameter("second");
|
||||||
|
if (second == null )
|
||||||
|
{
|
||||||
|
second="1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<%
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
Thread.sleep(Integer.parseInt(second)*1000);
|
||||||
|
|
||||||
|
int cnt=0;
|
||||||
|
int count=5;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
|
||||||
|
// double a=Math.random();
|
||||||
|
// double b=Math.random();
|
||||||
|
double a=ThreadLocalRandom.current().nextDouble();
|
||||||
|
double b=ThreadLocalRandom.current().nextDouble();
|
||||||
|
|
||||||
|
System.out.println(a);
|
||||||
|
System.out.println(b);
|
||||||
|
double c=a*b*a;
|
||||||
|
|
||||||
|
if (cnt==count)
|
||||||
|
break;
|
||||||
|
cnt++;
|
||||||
|
}
|
||||||
|
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
long gap = (end-start);
|
||||||
|
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<h1 style=" padding:10px;" >Call Success !!!!! </h1> <br>
|
||||||
|
<h2>elapsed time = <%= gap %> ms </h2> <br>
|
||||||
|
|
||||||
|
</html>
|
||||||
16
src/main/webapp/jsp/thread-sleep.jsp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<%@page import="java.util.Calendar"%>
|
||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ page import="java.util.Date" %>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<jsp:forward page="sleep.jsp">
|
||||||
|
<jsp:param name="second" value="10000"/>
|
||||||
|
</jsp:forward>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
9
src/main/webapp/pages/F01-image.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/F01-image.jsp"/>
|
||||||
|
<jsp:param name="title" value="F01-image"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/OOMTest.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/OOMTest.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/PermOOM.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/PermOOM.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/classMethod.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/classMethod.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/cpu.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/cpu.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/db-connection-info.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/db-connection-info.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/db-connection-leak.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/db-connection-leak.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/session-info.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/session-info.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/thread-sleep-1.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/sleep2.jsp?second=1"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/thread-sleep-3.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/sleep2.jsp?second=3"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
9
src/main/webapp/pages/thread-sleep.jsp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||||
|
pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
|
||||||
|
<jsp:include page="/jsp/common/template.jsp">
|
||||||
|
<jsp:param name="content" value="/jsp/thread-sleep.jsp"/>
|
||||||
|
<jsp:param name="title" value="1-1"/>
|
||||||
|
</jsp:include>
|
||||||
BIN
src/main/webapp/resources/images/accordion_img.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/main/webapp/resources/images/bmt_logo.gif
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/main/webapp/resources/images/dummy-100x100-1.jpg
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
src/main/webapp/resources/images/dummy-100x100-2.jpg
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/main/webapp/resources/images/dummy-100x100-3.jpg
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
src/main/webapp/resources/images/dummy-100x100-4.jpg
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
src/main/webapp/resources/images/mantech.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/main/webapp/resources/images/tta_logo.png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |