Whiteship's Note

[JRebel] 개발시 서버 리부팅 시간을 줄이자. 아니 없애자!!

Good Tools : 2009. 10. 15. 11:26


http://www.zeroturnaround.com/jrebel/installation/

JSP에서 DB 쿼리, 자바코드, HTML 짬뽕으로 몇 천 줄짜리 코드를 만들고 힘들게 유지보수 하는 이유가... '서버 리부팅을 하지 않아도 되니까'라고 하던데... 정말 그 이유 때문인지 모르겠습니다.

암튼, 그렇게까지 서버 리부팅이 하기 싫으시다면, JRebel을 쓰시는걸 추천하고 싶습니다.
사용법도 매우 간단합니다.
상용제품이기는 한데, 라이센스 없이 30일간 무료로 사용해볼 수 있습니다.

예전에도 이 제품을 써보려고 살펴보긴 했는데, 애플리케이션을 실행할 때 마다
noverify -javaagent:/path/to/jrebel.jar
이런 옵션을 줘야 한다는게 너무 귀찮아서 해보지도 않았습니다.

그런데 오늘은 방명록에 올라온 글 때문에 다시 살펴봤더니 이름도 JavaRebel에서 JRebel로 짧게 바꾸고 이클립스 플러긴도 제공해서 저런 옵션을 수동으로 주지 않아도 되게 해놨더군요. 대박이닷!! 해보자!!

그래서 해봤더니.. 정말 잘 돌아가고 너무 간단합니다.
개발 시간을 상당히 많이 단축 시킬 수 있을 것으로 보입니다.

톰캣 로그가 다음과 같은 모습이 됩니다.                                                     
#############################################################

 JRebel 2.1a (200910071200)
 (c) Copyright ZeroTurnaround, Ltd, 2007-2009. All rights reserved.

 A rough estimate: Over the last 1 days JRebel
 prevented the need for at least 0 redeploys/restarts.
 Using industry standard build and redeploy times,
 JRebel saved you between 0 and 0 hours.

 You are running JRebel evaluation license.
 You have 30 days until the license expires.

 You will see this notification until you obtain a
 full license for your installation.
                                                         
 Visit www.jrebel.com for instructions on obtaining   
 a full license. If you wish to continue your evaluation 
 please e-mail to support@zeroturnaround.com.            
                                                         
 If you think you should not see this message contact    
 support@zeroturnaround.com or check that you have your  
 license file in the same directory as the JAR file.      #############################################################

2009. 10. 15 오전 10:56:59 org.apache.tomcat.util.digester.SetPropertiesRule begin
경고: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:springsprout2' did not find a matching property.
2009. 10. 15 오전 10:56:59 org.apache.catalina.core.AprLifecycleListener init
정보: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_10\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\oracle\product\10.2.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem;c:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\Program Files\VanDyke Software\SecureCRT;C:\Program Files\SecureCRT;C:\Program Files\QuickTime\QTSystem;c:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Subversion\bin;C:\Program Files\ESTsoft\ALZip;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Java\jdk1.6.0_10\bin;C:\apps\apache-maven-2.0.10\bin;"C:\Program Files\PostgreSQL\8.3\bin";C:\apps\apache-ant-1.7.1\bin;C:\Program Files\Git\bin;C:\Program Files\ESTsoft\ALZip;C:\apps\spring-roo-1.0.0.M1\bin
2009. 10. 15 오전 10:56:59 org.apache.coyote.http11.Http11Protocol init
정보: Initializing Coyote HTTP/1.1 on http-8080
2009. 10. 15 오전 10:56:59 org.apache.catalina.startup.Catalina load
정보: Initialization processed in 323 ms
2009. 10. 15 오전 10:56:59 org.apache.catalina.core.StandardService start
정보: Starting service Catalina
2009. 10. 15 오전 10:56:59 org.apache.catalina.core.StandardEngine start
정보: Starting Servlet Engine: Apache Tomcat/6.0.18
JRebel: Directory 'C:\workspace-sts\springsprout2\web\WEB-INF\classes' will be monitored for changes.
JRebel: Directory 'C:\workspace-sts\springsprout2\target\test-classes' will be monitored for changes.
JRebel: Directory 'C:\workspace-sts\springsprout2\web' will be monitored for changes.
2009. 10. 15 오전 10:56:59 org.apache.catalina.loader.WebappClassLoader validateJarFile
정보: validateJarFile(C:\workspace-sts\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\springsprout2\WEB-INF\lib\com.springsource.javax.servlet-2.5.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

=============================== [JRebel Spring Framework Plugin] ===============================
Plugins are contributed by third party and can cause compatibility problems.
If you have any troubles set -Drebel.spring_plugin=false to disable it.
------------------------------------------------------------------------------------------
Description: Supports adding new beans and adding new bean dependencies using
annotations or XML. Singletons will be reconfigured after the change. It also
supports adding or changing Spring MVC controllers or handlers.
=============================== [/JRebel Spring Framework Plugin] ==============================


=============================== [JRebel AspectJ Plugin DISABLED] ==============================
You can enable AspectJ Plugin by setting -Drebel.aspectj_plugin=true.
------------------------------------------------------------------------------------------
Description: Allows the AspectJ load-time weaving (javaagent launched by aj5 or
-javaagent:aspectjweaver.jar) to be used with JavaRebel. Note that AspectJ
weaver will still show "java.lang.Exception: AspectJ5 does not weave hotswapped
class" in the beginning, but this can be safely ignored.
=============================== [/JRebel AspectJ Plugin DISABLED] =============================

2009. 10. 15 오전 10:57:00 org.apache.catalina.core.ApplicationContext log

...생략...

INFO - FrameworkServlet.initServletBean(322) | FrameworkServlet 'springsprout': initialization completed in 828 ms
Hibernate: select this_.id as id4_0_, this_.authCode as authCode4_0_, this_.avatar as avatar4_0_, this_.blog as blog4_0_, this_.email as email4_0_, this_.joined as joined4_0_, this_.name as name4_0_, this_.outDate as outDate4_0_, this_.outReason as outReason4_0_, this_.password as password4_0_, this_.status as status4_0_, this_.totalAttendanceRate as totalAt12_4_0_, this_.totalTrustRate as totalTr13_4_0_ from Member this_ where this_.status=?
Hibernate: select this_.id as id13_1_, this_.descr as descr13_1_, this_.endDay as endDay13_1_, this_.manager_id as manager10_13_1_, this_.maximum as maximum13_1_, this_.meetingCount as meetingC5_13_1_, this_.memberCount as memberCo6_13_1_, this_.startDay as startDay13_1_, this_.status as status13_1_, this_.studyName as studyName13_1_, member2_.id as id4_0_, member2_.authCode as authCode4_0_, member2_.avatar as avatar4_0_, member2_.blog as blog4_0_, member2_.email as email4_0_, member2_.joined as joined4_0_, member2_.name as name4_0_, member2_.outDate as outDate4_0_, member2_.outReason as outReason4_0_, member2_.password as password4_0_, member2_.status as status4_0_, member2_.totalAttendanceRate as totalAt12_4_0_, member2_.totalTrustRate as totalTr13_4_0_ from Study this_ left outer join Member member2_ on this_.manager_id=member2_.id where this_.status in (?, ?, ?)
JRebel: Reloading class 'springsprout.modules.study.StudyController'.
JRebel-Spring: Reconfiguring bean 'studyController' [springsprout.modules.study.StudyController]
WARN - DefaultHandlerExceptionResolver.handleNoSuchRequestHandlingMethod(142) | No matching handler method found for servlet request: path '/study/index.do', method 'GET', parameters map[[empty]]
JRebel: Reloading class 'springsprout.modules.study.StudyController'.
JRebel-Spring: Reconfiguring bean 'studyController' [springsprout.modules.study.StudyController]

OSAF를 이용해서 오픈 소스 라이선스를 신청해야겠습니다. 냐하하~

JRebel에 스프링 빈들의 의존성과 컨트롤러, 핸들러 등을 XML과 애노테이션 정보가 바뀔 때마다 클래스를 릴로딩 해주는 것을 플러긴화해서 내장하고 있나봅니다. 스프링 뿐 아니라, 구글쥬스, 스트럿츠 설정이 변경되는 것도 감지하도록 되어 있네요. 캬...

감동입니다!

ps: 오늘 할 일이 다 끝나고도 여유가 생기면 오랜만에 스크린캐스팅으로 찍어보겠습니다.
top

  1. Favicon of https://helols.tistory.com BlogIcon is윤군 2009.10.15 11:38 신고 PERM. MOD/DEL REPLY

    좋은건 공유 ..ㅋㅋ

    Favicon of https://whiteship.tistory.com BlogIcon 기선 2009.10.15 12:13 신고 PERM MOD/DEL

    ㅇㅇ집에가서 해야지
    일단은 SWF

  2. Favicon of http://bluepoetworld.tistory.com BlogIcon bluepoet 2009.10.15 13:45 PERM. MOD/DEL REPLY

    다른 이유도 있겠지만 클래스, xml 파일등이 수정되었을 때 WAS 재부팅 이슈가 있어서

    모델1방법으로 많이 하는것 같기는 해요 (ㅠ.ㅠ)


    다음 포스팅 글 기대할게요^^

    Favicon of https://whiteship.tistory.com BlogIcon 기선 2009.10.15 14:02 신고 PERM MOD/DEL

    넹.. 다음엔 JRebel 사용하는 방법을 올리겠습니당.

  3. Favicon of https://sehaeng.tistory.com BlogIcon 쌩~ 2009.10.15 15:44 신고 PERM. MOD/DEL REPLY

    WAS리부팅시간이 상당히 많이걸리는 솔루션을 가지고있어서
    사용해보고 감동먹은후 라이센스비용을 알아봤습니다만
    개발전체인력이사용하기에 많은비용이소모되어 포기했었는데 ^^;
    개인으로라도 구매하고싶은 제품이더라구요~

    Favicon of https://whiteship.tistory.com BlogIcon 기선 2009.10.15 16:10 신고 PERM MOD/DEL

    넵. 좋은 제품인것 같아요.

    회사의 경우 한화로 1년에 1인당 149달러이고, 개인은 59달러네요.

    캬~ 저 회사 돈 잘 벌겠네요.

Write a comment.




: 1 : ··· : 30 : 31 : 32 : 33 : 34 : 35 : 36 : 37 : 38 : ··· : 186 :