Camel

It'd be great to be able to have a directory containing Camel routes as

  • spring.xml files
  • Java RouteBuilder classes (and related Java code in some /classes directory somewhere).

Then in your IDE you can edit the spring.xml or the Java code and without having to build a bundle; it could auto-reload on the fly the new routes inside the SMX container.

REST & JAX-WS

It'd be great in development of RESTful or JAX-WS services (and indeed Camel POJOs too as above) - to avoid having to use bundles in development mode.

Essentially an unpacked-bundle layout could be used so that you can just edit some Java code in your IDE - it'll be auto compiled on save/compile, then SMX could auto-reload the bundle after detecting the .class files have changed.

Summary

I guess we just need an expanded OSGi bundle layout - rather like servlet engines can do. e.g. a foo.war file versus a foo directory containing what the war would look like unpacked.

Then we can define an 'unpacked bundle' as a directory tree - add as many Java classes or Spring XML files as we like - and add a MANIFEST to define the dependencies?

e.g.

hotdeploy/
  mybundle/
    META-INF/
      MANIFEST.MF
      spring/
        a.xml
        b.xml
    com/
      foo/
        Cheese.class

then a user could edit the spring XML files a.xml or b.xml; or edit the Cheese.java class and have the bundle auto-reloaded.

Even cooler could be to support 'source layout' mode - where code could be taken from a source of a Maven project. e.g.

pom.xml
  src/
    main/
      resources/
        META-INF/
          spring/
            a.xml
            b.xml
      java/
        com/
          foo/
            Cheese.java
target/
  classes/
    com/
      foo/
        Cheese.class

And it auto-detected changes in the XML files too. Though I guess your IDE should be generating the target/classes directory I guess

  • No labels