mvn의 assembly 와 비슷한 기능을 가진 플러그인이 있다.
Spring Batch를 하면서 알게 된 건데..
maven-shade-plugin이다. mvn assembly는 파일명이 예쁘지가 않는다..
그러나 maven shade plugin을 활용하면 파일명도 예쁘게 나온다. 더 정확하게 말하면, 파일을 overwrite하기 때문이다.
maven-shade-plugin은 아래와 같이 버전명과 예쁘게 나옵니다.

[INFO] Replacing original artifact with shaded artifact.
[INFO] Replacing E:\sts\springbatch-mssql\target\springbatch-mssql-0.2.jar with
E:\sts\springbatch-mssql\target\springbatch-mssql-0.2-shaded.jar


하지만 제일 중요한 것은 스프링 프로젝트의 경우에는 스프링 설정파일인 applicationContext.xml의 namespace를 찾지 못해서 에러가 발생되는 경우가 종종 발생되기도 한다. 즉 spring lib 안의 dependecy 파일이 동일한 위치에 있다 그래서 META-INF안에 있는 spring.handlers와 spring.schemas 파일을 덮어버리는 일이 있다. 그래서, assembly 을 사용하면 문제가 되어서, 스프링 프로젝트에서는 maven-shade-plugin을 사용하고 있다.

 pom.xml 파일의 내용입니다.






<plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-shade-plugin</artifactId>
     <version>1.4</version>
     <executions>
       <execution>
       <phase>package</phase>
         <goals>
           <goal>shade</goal>
           </goals>
           <configuration>
             <transformers>
               <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                 <resource>META-INF/spring.handlers</resource>
              </transformer>
             <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
               <resource>META-INF/spring.schemas</resource>
             </transformer>
           </transformers>
         </configuration>
       </execution>
     </executions>
   </plugin>

Spring Batch는 transformer를 추가하고 AppendingTransformer를 사용하는데. 이 이유는 spring 관련 jar를 합치면서 overwrite되지 않고 계속 더해질 수 있도록 한 것이다.
xml에서 선언하는 namespace를 못찾는 것을 방지할 수 있도록 하기 위한 것이다..

* 주석 : Spring Batch Sample 소스에 좋은 것이 많다~


'Web service' 카테고리의 다른 글

Facebook 기술  (0) 2011.03.16
FTP command 사용하기  (0) 2011.03.03
tomcat 6.0.31 패치 눈에 띄는것  (0) 2011.03.02
tomcat 6.0.32 중요 패치 내용  (0) 2011.03.02
tomcat 6.0.30 중요 패치 내용  (0) 2011.03.02
Posted by '김용환'
,

 

Remove a huge memory leak in the NIO connector introduced by the fix for 49884. (markt)

Posted by '김용환'
,

1. InternalNioInputBuffer should honor maxHttpHeadSize. (kkolinko)
2. TLS/SSL 공격으로 인해서 인증되는 부분 버그 패치




http://www.oracle.com/technetwork/java/javase/documentation/tlsreadme2-176330.html


Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50325
Use JVM provided solutions to CVE-2009-3555 if available (i.e. RFC 5746 support)



of /tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java	2011/02/07 13:56:20	1067948
+++ tomcat/tc5.5.x/trunk/connectors/util/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java	2011/02/07 14:16:42	1067949
@@ -26,9 +26,13 @@ import java.net.InetAddress;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketException;
+import java.security.KeyManagementException;
 import java.security.KeyStore;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
 import java.util.Vector;
 
+import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLException;
 import javax.net.ssl.SSLServerSocket;
 import javax.net.ssl.SSLServerSocketFactory;
@@ -77,6 +81,29 @@ public abstract class JSSESocketFactory
     protected String[] enabledCiphers;
     protected boolean allowUnsafeLegacyRenegotiation = false;
 
+    protected static final boolean RFC_5746_SUPPORTED;
+
+    static {
+        boolean result = false;
+        SSLContext context;
+        try {
+            context = SSLContext.getInstance("TLS");
+            context.init(null, null, new SecureRandom());
+            SSLServerSocketFactory ssf = context.getServerSocketFactory();
+            String ciphers[] = ssf.getSupportedCipherSuites();
+            for (String cipher : ciphers) {
+                if ("TLS_EMPTY_RENEGOTIATION_INFO_SCSV".equals(cipher)) {
+                    result = true;
+                    break;
+                }
+            }
+        } catch (NoSuchAlgorithmException e) {
+            // Assume no RFC 5746 support
+        } catch (KeyManagementException e) {
+            // Assume no RFC 5746 support
+        }
+        RFC_5746_SUPPORTED = result;
+    }
 
     public JSSESocketFactory () {
     }
@@ -127,7 +154,7 @@ public abstract class JSSESocketFactory
     public void handshake(Socket sock) throws IOException {
         ((SSLSocket)sock).startHandshake();
         
-        if (!allowUnsafeLegacyRenegotiation) {
+        if (!allowUnsafeLegacyRenegotiation && !RFC_5746_SUPPORTED) {
             // Prevent futher handshakes by removing all cipher suites
             ((SSLSocket) sock).setEnabledCipherSuites(new String[0]);
         }



Posted by '김용환'
,




- 49728, 50084: Improve PID file handling when another process is managing the PID file and Tomcat does not have write access. (markt)

- 49909, 50201: Provide a mechanism to log requests rejected before they reach the AccessLogValve to appear in the access log. (markt/kkolinko)

- Return a copy of the current URLs for the WebappClassLoader to prevent modification. This facilitated, although it wasn't the root cause, CVE-2010-1622. (markt)

- Provide better web application state information via JMX. (markt)

- Add a new filter, org.apache.catalina.filters.CsrfPreventionFilter, to provide generic cross-site request forgery (CSRF) protection for web applications. (markt)

- 50222: Modify memory leak prevention code so it pins the system class loader in memory rather than than the common class loader, which is better for embedded systems. (schultz)

- 50413: Ensure 304s are not returned when using static files as error pages. (markt)

- 50459: Fix thread/classloader binding issues in StandardContext. (slaurent)

- 50642: Move the sun.net.www.http.HttpClient keep-alive thread memory leak protection from the JreMemoryLeakPreventionListener to the WebappClassLoader since the thread that triggers the memory leak is created on demand. (markt)

- Avoid a NPE for APR connector unlockAccept with default soTimeout. (mturk)

- 47913: Return the IP address rather than null for getRemoteHost() with the APR connector if the IP address does not resolve. (markt)

- 48925: request.getLocalAddr() returns null when using the default Jk AJP/1.3 connector. (rjung)

- 49497: Stop accepting new requests (inc keep-alive) once the BIO connector is paused and the current request has finished processing. (markt)

- 49521: Disable scanning for a free port in Jk AJP/1.3 connector by default. Do not change maxPort field value of ChannelSocket in its setPort() and init() methods. Add support for maxPort attribute on a Connector element as a synonym for channelSocket.maxPort. (kkolinko)

- Improve recycling of processors in Http11NioProtocol. (kkolinko)

- 50072: NIO connector can mis-read request line if not sent in a single packet. (markt/kkolinko)

- 49972: Fix potential thread safe issue when formatting dates for use in HTTP headers. (markt)

- 49986: Fix thread safety issue in JSP reloading. (timw))

- 49985: Fix thread safety issue in EL parser. (markt)

- Configure the Manager web application to use the new CSRF protection. To take advantage of this protection, the manager role must be removed from all users and the new manager-gui and manager-script roles used instead. (markt)

- CVE-2010-4172: Multiple XSS in Manager application. (markt/kkolinko)

 

'Web service' 카테고리의 다른 글

tomcat 6.0.31 패치 눈에 띄는것  (0) 2011.03.02
tomcat 6.0.32 중요 패치 내용  (0) 2011.03.02
해외, 국내 IP 판별하기  (0) 2011.02.25
Oracle Application Testing Suite  (0) 2011.02.18
Oracle Application Test Suite  (0) 2011.02.18
Posted by '김용환'
,

maxmind의 geoip 구매
http://www.maxmind.com/app/support

또는

한국인터넷진흥원 꺼 이용

'Web service' 카테고리의 다른 글

tomcat 6.0.32 중요 패치 내용  (0) 2011.03.02
tomcat 6.0.30 중요 패치 내용  (0) 2011.03.02
Oracle Application Testing Suite  (0) 2011.02.18
Oracle Application Test Suite  (0) 2011.02.18
점검을 영어로??  (0) 2011.02.11
Posted by '김용환'
,

http://www.oracle.com/technetwork/oem/app-test/index.html
오라클의 성능 테스트 툴을 포함한 Oracle Application Testing Suite은 공짜다. free!!

http://kr.forums.oracle.com/forums/thread.jspa?threadID=889335

'Web service' 카테고리의 다른 글

tomcat 6.0.30 중요 패치 내용  (0) 2011.03.02
해외, 국내 IP 판별하기  (0) 2011.02.25
Oracle Application Test Suite  (0) 2011.02.18
점검을 영어로??  (0) 2011.02.11
오늘 IE9 RC (Release Candidate) 나왔습니다  (0) 2011.02.11
Posted by '김용환'
,

 load runner와  grinder 보다 괜찮은 솔루션을 오라클에서 공짜로 제공한다.
 Oracle Application Test Suite. 이라는 툴인데..
브라우져 에서 http로 연결하는 connection을 recording하고, playback하는 것이 있다. 헐..
엄청 좋다.

자료는 여기에~
http://www.oracle.com/technetwork/oem/app-quality-mgmt/s317285-ebs-testing-with-ats-181636.pdf





Posted by '김용환'
,

점검을 영어로??

Web service 2011. 2. 11. 14:34

정기점검 또는 임시점검에 관련된 업무를 하시는 분들에게..

전에 관련 코딩을 할 때, 이 점검이라는 단어를 몰라서, Check, Under를 단어를 이용해서 클래스 이름을 지었다. 많이 부끄럽다.. 

정확하게 maintainance 이ㅏ다.

 

네이버 영어 사전에 따르면.. 다음과 같다.
http://endic.naver.com/enkrEntry.nhn?entryId=8b6fba87de1f4aac8bcffea637f87afc

1. ~ (of sth) (건물・기계 등을 정기적으로 점검・보수하는) 유지  

 maintainance로 naming하시면 될 것 같아요.

 참고로 오라클의 점검 페이지는 다음과 같습니다.

Posted by '김용환'
,
Posted by '김용환'
,



1. jsession id를 가지고 서버 요청을 하게 되면, jsession id를 기반으로 하는 데이터(영속성 데이터)를 각 jvm에서 알아야 하니 session 데이터가 클 경우에 대해서는 각 jvm 에서 session copy해야하는 overhead가 존재한다.

1) 만약 쿠키 용량이 5Kb이면, 자바 웹 서버인경우 String으로 변환하면서 약 120kb가 될 것이다. 사용자가 많은 경우, 몰리는 경우에 session copy overhead가 서버에서 감수해야 한다. Session Clustering 하다가 OOME가 날 가능성이 많다.
2) 서버가 많으면 많을수록 Session Clustering하는 비용은 커진다. 반복작업임..
 

2. L4에서도 jsession id를 이용한 L4 sticky bit로 활용해야 하니, L4에 부담이 된다.


3. 장애시 또는 동시 restart가 되는 경우에는 다시 session을 만들어야 할 상황이 생긴다.
 -> 로그인을 다시 해야 하는 상황이 발생한다..


4. multicast (udp)방식이기 때문에 방화벽을 신경써야 한다.


5. multicast 을 지원하는 네트워크 카드가 필요하다.


대용량 서비스의 경우에는 세션관리비용보다는 cookie기반이 훨씬 서버에 영향을 덜 주게 되며, 고민은 적게 할 수 있다.

Persistent한 사용자 정보는 DB나 캐쉬서버를 이용하면 된다.

 

Posted by '김용환'
,