0

We develop a huge set of OSGi bundles based on Equinox and start it within Eclipse with a "OSGi Framework" launch configuration. The start of the framework with all necessary bundles and data takes 1-2 minutes which is the reason why we used DCEVM and JRebel to hot-deploy changed classes.

Now with Java 8 these methods do not work properly any more (DCEVM is available for Java 7 only, and JRebel has too many limitations - freezing debug sessions, no support for added instance fields etc). Since our application is quite modular, I imagine an Eclipse function (via plugin?) that monitors the workspace for class changes and restarts the affected bundles after the incremental build is finished.

Are you aware of some tooling that might help for this task?

sreg
  • 369
  • 2
  • 12
  • Actually, JRebel 6 just added the support for adding new instance fields. But indeed, you might want to take a look into bndtools – Anton Arhipov Nov 05 '14 at 13:57
  • 1
    Yes, we worked with the JRebel 6 beta recently and updated the eclipse plugin today, but we still experience frequent classloader deadlocks and unreliable code reload (sometimes the changes are just not applied, which also prevents useful debugging) – sreg Nov 05 '14 at 22:19
  • Could you please report this issue to JRebel support. – Anton Arhipov Nov 05 '14 at 23:09

2 Answers2

3

Bndtools provides such an environment. It is also superior to the eclipse plugin perspective in a lot of other ways. For example it has great support for declarative services.

Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
  • 1
    And it will redeploy a bundle into the running test framework upon save. – BJ Hargrave Nov 05 '14 at 13:57
  • What would be the best way to migrate 100+ bundles from PDE to bndtools? I saw https://github.com/duckAsteroid/bndtools-pde-migration but it does not seem up-to-date. – sreg Nov 10 '14 at 17:25
  • I do not think there is a standard way right now but I would be very interested to adopt it if there is one. Can you provide PRs on bnd(tools) or fund someone to do it? – Peter Kriens Nov 10 '15 at 18:55
1

DCEVM supports java8 now. Lets look at https://github.com/dcevm/dcevm If you need hotswap support Eclipse RCP/OSGI you can use https://github.com/HotswapProjects/HotswapAgent It has module for Eclipse OSGI.

skybber
  • 409
  • 4
  • 13