Skip to main content

The great alternative to JRebel

I'm an old user and addict of JRebel. I started to use it on open source projects and in professional contexts. From the beginning, I've been convinced that the licensing mode was wrong because of its lifetime. Asking for license renewal each year is boring. So, I decided to look for FREE alternative solutions and finally I recently found one.

This solution is efficient for maven projects developed with Eclipse. It is base on :


I tested it with Java 7 & Java 8. I work on web applications that run on Tomcat. I developed wih Spring (IoC), sometimes Hibernate and Vaadin




Hotswap Agent installation consists on the deployment of a patch for your JVM. You just have to download the corresponding patch here : https://github.com/dcevm/dcevm/releases
Then, download the hotswap-agent.jar from here : https://github.com/HotswapProjects/HotswapAgent/releases

Once it is done, it supposes that you run your project with Maven. For example, I use to start my webapp projects with mvn tomcat7:run or mvn jetty:run.  It could be done from Eclipse directly from the context menu. Thus, you will not need Eclipse WTP anymore

The only thing you will have to do is to declare the following parameters to you JVM arguments like this : 

-XXaltjvm=dcevm -javaagent:/home/depellegrin/Applications/hotswap-agent.jar=autoHotswap=true



Now, in your Java console, you will see extra logs like this :


These extra logs show your HotSwap Agent activity. This is helpfull because in some cases, hot reloading doesn't work. It also happens with JRebel, but honestly (and fortunately) in less cases than this free agent.


Dynamic Source Lookup


Next step : the debugger. If you want to hotswap code changes, you also need to debug it. But, then projects are started with Maven in debug mode (Debug As... instead of Run As... ), Eclipse doesn't link the source code with the code which is executed. To fix this problem, just install the Eclipse plugin from the menu Help > Install new software as it is explained in the project's page here : https://github.com/ifedorenko/com.ifedorenko.m2e.sourcelookup.



That's all. I hope you will enjoy your new life with dynamic reloading of code changes and enjoy the benefits of a strongly compiled programming language like Java associated with the flexibility of an interpreted language. 




Comments

Miguel Salinas said…
Grate post, but one question, I just installer the path DCEVM for java 8 u66 and the hotswapagent 0.3 in my mac. Using eclipse mars with tomcat 8.0.9. Using a Vaadin app. When I change something in my app, and reload my app from my browser the change is appered, but in my eclipse console I don't see any log indicating this change. I don't create any properties file so I use the default one. Regards
Machman said…
Thanks for the info, really appreciate it.
simashree said…
Thanks for the great information in your blog Selenium Training in Chennai
lisa wu said…
Silahkan di kunjungi ya kawan-kawan 100% Memuaskan
> Hoki anda ada di sini <
Allsbobet 1 DOMPET DEPOSITO Untuk Semua Permainan !!
WELCOME BONUS 100%
SPORTSBOOK CASINO TOGEL POKER E E-GAMES SLOT MACHINE NUMBER GAME SABUNG AYAM TEMBAK IKAN DAN SEBAGAINYA

Tentunya dengan berbagai BONUS-BONUS:
- Minimal Deposit Rp 50.000 & Withdraw Rp 50.000
- BONUS NEW MEMBER SPORTBOOK 100%
- BONUS ALL GAME 10%
- BONUS ROLLINGAN LIVE CASINO 0.8%
- BONUS REFFERAL 2.5%

Gabung yuk bersama dengan kami di ALLSBOBET.COM
Terpercaya Sejak 2015 - MENANG BERAPAPUN KAMI BAYAR
Proses Deposit / Withdraw gak pake ribet, proses CEPAT !!

UNTUK INFORMASI SELANJUTNYA BISA HUB KAMI DI :
LIVECHAT ALLSBOBET.COM 24 JAM ONLINE : https://lc.chat/now/8533171/
Pin BBM : D60E1BF8
LINE : ALLSBOBET
WECHAT : ALLSBOBET
WHATSAPP : +855 974 832 357

Agen Togel
Agen Bola
Agen Kasino
Togel SGP
Togel Hongkong
Togel Sydney
Judi Online
Agen Judi
Agen Judi QQ
Forum Judi Online
hubungi kami di :
Line : ALLSBOBET
Bbm : D60E1BF8
Wa : +855974832357

Popular posts from this blog

DCcduino usb drivers (CH340 / CH341 chipset)

I've just received my first arduino platform. It's a DCcduino board (a clone of Arduino Uno). As I had some difficulties to have it recognised by my MacBook, I decided to share its drivers. This card has a CH340 USB-to-serial chip. You can find drivers for this chip on the web site of the chinese manufacturer, here :

http://www.wch.cn/downloads.php?name=pro&proid=5

Or download it directly from my Google Drive. The archive contains drivers for Mac, Linux and Windows platforms.

https://drive.google.com/file/d/0B5okZr5AW4gaX2pZaWt6dVNaSFU/edit?usp=sharing

I hope this will help somebody.

UPDATE for Mac users with Yosemite :

Please, follow this extra instructions :
Install the CH340 driverRun the command in Terminal: sudo nvram boot-args="kext-dev-mode=1"Reboot

How to secure REST services exposed with Jersey (JAX-RS) using Spring Security

This is the challenge I had to perform. I have to open services to business partners and I want to secure them. I use a Java based application with Jersey API (JAX-RS).

The first thing to consider is : what kind of solution offers the best compromise between security and the effort I'll have to provide to maintain this solution?
After some discussions with developers and experts, the conclusion is : expose your services over https and use Basic authentication (Digest authentication and certificate based authentication are too complex for partners)

So, how to implement that? I delegate "https" to my Apache http servers. But I still need to handle authentication (and authorization of course). After long hours on Google, I understood that it is possible to manage security with Jersey by many many ways. Here is a short list :

Delegate simple authentication and authorization to your container (Tomcat) or to your frontend (Apache)Delegate authentication to your container or fro…