8 Replies Latest reply on Jul 26, 2010 7:55 PM by Stuart Douglas

    Hot deployment support for MetaWidget

    Dan Allen Master

      kennardconsulting asks:

      I'm interested in the hot deployment conversation that was raised during the JBoss Community Asylum podcast recorded at JUDCon. In particular, the conversation about how different frameworks will need to be able to support hot deployment.


      At the moment Metawidget uses a very simple cache of...


      Map<Class<?>, Map<String, Property>>


      ...to cache metadata against Classes. Hopefully this would 'just work' if the reloaded Class<?> doesn't .equal the old one? Class.equals uses == internally, so will that work with what you're planning?


      To which I replied:

      MetaWidget is a great candidate as a framework that fakereplace could support for hot deployment. Particularly because the UI is the one area that people expect the most complete hot deployment.


      Stuart clarified:

      The class is still equal to the old version, however a cache like that is trivial to clear if I wrote an integration module for it.


      I then gave an attempt to point Richard in the right direction:

      I'll attempt to point Richard at the integration module API and example impls. I'm sure he would be happy to make a patch attempt






      JSF 2 integration:




      Seam 2 integration:




      The only question I have is how does a framework know when it's time to drop its cache? Meaning, what's the best trigger point? (Obviously some frameworks are more complex than others, so consider the simpler cases of single caches).


      Fleshing out this integration on the forums would be a great way to encourage other framework developers to latch onto the project and contribute integrations


      Richard responded:

      Looking at the links Dan sent, it appears FakeReplace does its magic via a FakeReplace plugin, so I would just need to expose some kind of Metawidget API for clearing my cache that you can call?


      It looks, Dan, like it's FakeReplace's job to know when to drop the cache, not the framework's?