JRebel and Some General Sharing...

40 views
Skip to first unread message

Mark van Wyk

unread,
Oct 20, 2011, 3:47:34 PM10/20/11
to ctjug...@googlegroups.com
Hi guys,

I had to share this. I found this thing called JRebel.


It's the same as that Jetty:Run thing, just 1000 times better. It tells the JVM that your classes have been updated in the application container space. So, basically, neither the container, nor the app realize that the code has changed. This means that it takes a split second to update the class in the JVM on save, and you keep the sessions, etc. It's really great, and I'm totally loving it. Been running Tomcat for hours now without a restart.

Funny, I dropped Spring, Spring Security and JPA from my application - and added this tool. I've produced more productive code in the last 3 days than in the last 4 weeks.

Special Thanks, too to Jason Morris - Using Jason Morris' EoDSQL - Jeez, had ORM going in about 8 minutes. The tutorial is 2x A4 pages long. Really looking good.

Lastly I want to add that import javax.servlet.ServletContextListener is really awesome. On startup, I set up my JDBC pools and fire up my own home made Singleton Dependency Framework. On shutdown, I close my pools, and unregister my JDBC driver so that Tomcat doesn't have to do it for me.

That's what I wanted to share. Probably a bit stupid for semi-amateur developer to share this with all you experts, but what the hell - I like being the noisy one!

;)

--
Mark van Wyk


Mobile: 082 831 9227
Landline: 021 789 1427

"Before printing this email, please consider the animals and eat less of them"

Fritz Meissner

unread,
Oct 20, 2011, 4:10:18 PM10/20/11
to ctjug...@googlegroups.com
Is this a new application, or the one that gets 200 000 requests / min? If the latter, that's pretty ballsy to change so much code in one go :).

Fritz

--
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Forum...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
For jobs see http://jobs.gamatam.com/

Dr Heinz M. Kabutz

unread,
Oct 20, 2011, 4:38:47 PM10/20/11
to ctjug...@googlegroups.com
Cool company, cool guys, cool product.  They visited me in Crete in August.  Entire company went on holiday together.  How cool is that?
Regards

Heinz
-- 
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun Java Champion
IEEE Certified Software Development Professional
http://www.javaspecialists.eu
Tel: +30 69 72 850 460
Skype: kabutz 

Mark van Wyk

unread,
Oct 20, 2011, 6:36:36 PM10/20/11
to ctjug...@googlegroups.com
No no :) It's a new one!

Mark van Wyk

unread,
Oct 20, 2011, 6:37:20 PM10/20/11
to ctjug...@googlegroups.com
Wow, that's really cool! From the photo after the installation, they seem like a pretty funked out bunch!

Dr Heinz M. Kabutz

unread,
Oct 20, 2011, 6:47:08 PM10/20/11
to ctjug...@googlegroups.com
Can you send me a link to the photo?

On 21/10/2011, Mark van Wyk <ma...@foxbomb.com> wrote:
> Wow, that's really cool! From the photo after the installation, they seem
> like a pretty funked out bunch!
>
> On 20 October 2011 22:38, Dr Heinz M. Kabutz
> <he...@javaspecialists.eu>wrote:
>

>> **


>> Cool company, cool guys, cool product. They visited me in Crete in
>> August. Entire company went on holiday together. How cool is that?
>>
>> Regards
>>
>> Heinz
>> --
>> Dr Heinz M. Kabutz (PhD CompSci)
>> Author of "The Java(tm) Specialists' Newsletter"
>> Sun Java Champion
>> IEEE Certified Software Development

>> Professionalhttp://www.javaspecialists.eu


>> Tel: +30 69 72 850 460
>> Skype: kabutz
>>
>>
>>
>> On 10/20/11 9:47 PM, Mark van Wyk wrote:
>>
>> Hi guys,
>>
>> I had to share this. I found this thing called JRebel.
>>
>> http://zeroturnaround.com/jrebel/
>>
>> It's the same as that Jetty:Run thing, just 1000 times better. It tells
>> the JVM that your classes have been updated in the application container
>> space. So, basically, neither the container, nor the app realize that the
>> code has changed. This means that it takes a split second to update the
>> class in the JVM on save, and you keep the sessions, etc. It's really
>> great,
>> and I'm totally loving it. Been running Tomcat for hours now without a
>> restart.
>>
>> Funny, I dropped Spring, Spring Security and JPA from my application -
>> and added this tool. I've produced more productive code in the last 3 days
>> than in the last 4 weeks.
>>
>> Special Thanks, too to Jason Morris - Using Jason Morris' EoDSQL - Jeez,
>> had ORM going in about 8 minutes. The tutorial is 2x A4 pages long. Really
>> looking good.
>>

>> Lastly I want to add that import *javax.servlet.ServletContextListener*


>> is
>> really awesome. On startup, I set up my JDBC pools and fire up my own home
>> made Singleton Dependency Framework. On shutdown, I close my pools, and
>> unregister my JDBC driver so that Tomcat doesn't have to do it for me.
>>
>> That's what I wanted to share. Probably a bit stupid for semi-amateur
>> developer to share this with all you experts, but what the hell - I like
>> being the noisy one!
>>
>> ;)
>>
>> --
>> Mark van Wyk
>>
>>

>> *Email: *ma...@foxbomb.com
>> *Mobile:* 082 831 9227
>> *Landline:* 021 789 1427


--

Mark van Wyk

unread,
Oct 21, 2011, 1:58:47 AM10/21/11
to ctjug...@googlegroups.com
It's on the last page of the installation jar
Mark van Wyk


Mobile: 082 831 9227
Landline: 021 789 1427

Dr Heinz M. Kabutz

unread,
Oct 21, 2011, 2:58:43 AM10/21/11
to ctjug...@googlegroups.com, Liisi Toom, Jevgeni Kabanov
Yip, I took that photo in Crete at one of our favourite restaurants :-)  I must add that they were all very very drunk.  Who would have thought that a couple of liters of wine and some tsikoudia would do that to hardened alcoholics from Estonia ;-) 

If any of you CT JUG guys ever come to Europe, make sure you visit me in Crete - you won't regret it :-)

Regards

Heinz
-- 
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java(tm) Specialists' Newsletter"
Sun Java Champion
IEEE Certified Software Development Professional
http://www.javaspecialists.eu
Tel: +30 69 72 850 460
Skype: kabutz 


Frederico Campos

unread,
Oct 21, 2011, 3:50:18 AM10/21/11
to CTJUG Forum
What about http://www.playframework.org/ ?

It's pretty neat. And it's free. :)

Fritz Meissner

unread,
Oct 21, 2011, 4:45:20 AM10/21/11
to ctjug...@googlegroups.com
The website makes it seems like JRebel isn't tied to any particular
framework... that would make it applicable to many existing projects
for which a Play rewrite isn't an option.

... unless I was reading wrong :/

Fritz

Soren Aalto

unread,
Oct 21, 2011, 4:50:06 AM10/21/11
to ctjug...@googlegroups.com
On Fri, Oct 21, 2011 at 8:58 AM, Dr Heinz M. Kabutz <he...@javaspecialists.eu> wrote:
Yip, I took that photo in Crete at one of our favourite restaurants :-)  I must add that they were all very very drunk.  Who would have thought that a couple of liters of wine and some tsikoudia would do that to hardened alcoholics from Estonia ;-) 

Especially greek white wine / retsina -- I was so impressed at how much I
could drink without getting a hangover when we were in the Cyclades.



--
Soren Aalto
Director: ICT
University of Zululand

Johan Steyn

unread,
Oct 21, 2011, 5:18:12 AM10/21/11
to ctjug...@googlegroups.com
On Fri, Oct 21, 2011 at 8:50 AM, Frederico Campos <frederico...@gmail.com> wrote:
What about http://www.playframework.org/ ?

It's pretty neat. And it's free. :)


The Play! framework is awesome. I haven't looked at JRebel, but from my (limited) experience with the Play! framework I really appreciate the ability to make changes to Java source code and have the changes detected, automatically re-compiled and the classes re-loaded in a running JVM so that all you need to do is hit the refresh button on your browser. I believe Play makes use of the Eclipse JDT to achieve that.

Other things I like about Play:

- Very good error reporting, ie. you don't see hundreds of lines of (mostly useless) stacktrace. Just a snippet of the offending code with the line number highlighted right there in your browser.
- True to the underlying HTTP, which is *stateless*. Unlike JSF there is no (bloated) server-side component state. It even does away with servlets so you don't have session attributes and stuff like that which try to impose some state upon a stateless protocol. This makes it cleaner and simpler to do RESTful development, which also scales better.
- User-friendly URL's that are: readable, shareable, bookmarkable

Plus much more. Unfortunately I haven't had enough time to explore it more - I need to do so in my own time as I find it tiresome trying to convince management to ditch JSF for Play. Reminds me of the early Java and Linux days when you had to do stuff behind your manager's back because they weren't convinced of the merits of Java over Delphi (or whatever) or of Linux over Windows.

So, for those of you who do get to delve into Play - I wish you all the best and ask that you share your experiences so that others may be inspired to try it as well. I really believe that automatic detection source code changes with of dynamic compiling and class re-loading is the future for Java to compete against dynamic languages like Python and Ruby. Whether it be the Play! Framework using Eclipse JDT or some other framework(s) using JRebel or whatever - I'm convinced that the future of web development in Java will incorporate these dynamic features and developers will never look back once they get used to it.

Johan.

Barry

unread,
Oct 21, 2011, 6:47:29 AM10/21/11
to CTJUG Forum
I've been using JRebel for a while, and have found it really useful,
along with Maven & Jetty, which is also a pleasure to use. I was
initially skeptical about the productivity gains from JRebel, because
life with jetty:run was pretty good. But JRebel has saved me loads of
time already. Its great for quick code/test cycles.

I have begun to notice that performance losses while running with
JRebel compared to without, so I'm starting to use it more
judiciously.

JRebel uses a java -agent to transparently modify/reload classes as
they are loaded, so its framework agnostic, making it applicable to a
wide variety of applications. One limitation is that it can't reload
classes where you've made a change to the inheritance hierachy.


On Oct 21, 11:18 am, Johan Steyn <johan.st...@gmail.com> wrote:
> On Fri, Oct 21, 2011 at 8:50 AM, Frederico Campos <
>
> frederico.campo...@gmail.com> wrote:
> > What abouthttp://www.playframework.org/?
Reply all
Reply to author
Forward
0 new messages