Wednesday, 4 November 2015

Setting up JRebel for XPages OSGi Plugin Development

When developing plugins for Domino in Eclipse, one of the drawbacks is the constant
'restart task http' to pick up any new changes in your class files.

It may only take 30 seconds but it is slow enough that every time it happens, maybe you check your email, news, social media, maybe you distract one of your colleagues.

Previously, the In-built eclipse remote debugging previously to allow hot-code replace for small changes, however I have found that since a few domino versions ago, it will now crash the server! not ideal!

JRebel looks very promising, it is designed to watch your class folders and automatically update the JVM with no restart.

I had seen JRebel a couple of years back and had one failed attempt at getting it to work with domino and then gave up. I have heard others mention a few times 'maybe it would work with Domino?'

Anyway, thanks to David Leedy's video on setting up YourKit profiler, it gave me a clue into how to set up JRebel in a similar fashion using the JavaOptionsFile

Today I managed to get JRebel and Domino working, I have only used it for a day but so far it is going pretty good. I thought I would share how I got it set up so that others might give it a try and let me know if it is working for them.

Here is the video demonstrating the set up and use of JRebel

If you have any trouble setting it up let me know and I will see if I can help


6 comments:

  1. Replies
    1. yeah I really hope it turns out to be a viable solution, going to put it under a bit more heavy use today and hopefully it stands up to the test!

      Delete
  2. Thanks for this! I tried JRebel a few weeks ago without any luck. Does this also work while you are debugging, I mean it doesn't crash the server?

    ReplyDelete
    Replies
    1. I have only been using a couple of days, but so far, when I need to run the debugger, I connect remote debugging, step through code and check things out, and then disconnect the debugger. I have not tried updating class files whilst the debugger is connected.
      I haven't had a crash yet whilst using this method. When I am feeling adventurous, I might try out updating a class file whilst the debugger is connected and see what happens!

      Delete
    2. I did and it didn't crash my server but it didn't update the classes when I changed something. Got some errors while trying it. JRebel team is helping me out.

      Before JRebel we where always able to 'hot-swap' code in debugging sessions but it crashes the Domino server sometimes ;-)

      Delete

  3. Thanks for the marvelous posting! I genuinely enjoyed reading it, you happen to be a great author.I will be sure to bookmark your blog and may come back down the road. I want to encourage you to definitely continue your great writing, have a nice evening! myvanguardplan login

    ReplyDelete