반응형 FullStack159 [Tomcat] WAS JDBC를 사용한 오라클 이중화 설정 일반적으로 DB 이중화에 따른 설정을 WAS에는 하지 않았는데, 그 이중화 설정을 WAS에서 처리할 일이 생겼다. 일반적인 JDBC 설정 (CommonDBCP2에서는 maxActive -> maxTotal, maxWait -> maxWaitMillis로 변경) 이중화에 따른 JDBC 설정 아래 설정 부분을 URL 부분에 한줄로 작성 jdbc:oracle:thin @( DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=dbserv1)(PORT=1521) ) (ADDRESS=(PROTOCOL=TCP)(HOST=dbserv2)(PORT=1521) ) (LOAD_BALANCE=yes) (FAILOVER=yes) (CONNECT_DATA= (SERVER=DEDI.. 2020. 10. 14. [JAVA] Thread Dump 만들기 Java Thread Dump 애플리케이션이 갑자기 먹통이 되거나, 속도가 느려질 때 Java Thread Dump 확인하기. 프로세스 pid를 찾은 후 pid로 확인이 가능 $ ps -ef | grep tomcat $ jstack PID "main" #1 prio=5 os_prio=0 tid=0x00007f27f400f000 nid=0x9 runnable [0x00007f27fd741000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409) at java.ne.. 2020. 8. 20. MyBatis에서 Connection 가져오기 MyBatis에서 Connection 가져오기 별도 Connection이 아닌 Mybatis와 함께 트랜잭션이 가능한 방법을 고려하기 위해서 Mybatis에서 Connection 추출 특정 Transaction에서 가져오기 public TransactionStatus begin(){ TransactionStatus txStatus = transactionManager.getTransaction(new DefaultTransactionDefinition()); return txStatus; } public void commit(TransactionStatus txStatus) { transactionManager.commit(txStatus); } public void rollback(Transaction.. 2020. 7. 27. [MAVEN] was cached in the local repository, resolution will not be reattempted until the update interval of Central has elapsed or updates are forced xbean_xpath 2.2.0, xmlpublic 2.2.0 이전에 설정할 때는 문제가 없다가 갑자기 Jenkins에서 빌드 Fail이 발생했다. 해당 POM을 대상으로 compile를 실행하였을 때 다음과 같은 오류가 발생하였다. Failure to find xmlbeans:xbean_xpath:pom:2.2.0 in https://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of Central has elapsed or updates are forced 인터넷에 보니 Repository를 삭제해야 한다는 의견도 있어서, 해당 라이.. 2020. 6. 18. 이전 1 ··· 27 28 29 30 31 32 33 ··· 40 다음 반응형