7

Using Wildfly 8.2.0.Final, Windows 7, JBoss Developer Studio 8.0.2.GA.

We're trying to split our war into modules. Seems like the most natural way to do this is by relying on web fragments + JSF/Facelet ability to find resources in war/WEB-INF/lib jars.
The problem is that changes to xhtml facelet templates and static resources don't apply on the fly, as it happens if the same things are located in the war itself.

As I understand it's because:

  • fragment jars are getting deployed by IDE packaged, not exploded;
  • VFS creates a copies of jars in the tmp dir, which it then unpacks;
    VFS3 User Guide says "Whenever possible the JavaZipFileSystem attempts to use the JarEntry to support file system operations. When this is not possible it will write a copy of the JarEntry to the temporary directory". I don't understand what this "when not possible" means, and stepping through org.wildfly.extension.undertow.deployment.WarStructureDeploymentProcessor code it seems that a jar copy is always made.
  • org.jboss.vfs.spi.JavaZipFileSystem seems to try to watch the jar's last modified time, but it looks at the copy, not the original; JBoss Developer Studio doesn't change the original jar's last modified time anyway, e.g. when updating a xhtml.

The questions.

  1. Are there bugs somewhere? VFS? Undertow? I'm not sure if the described behavior is intended.
  2. Should hotdeploying resources in war libs even supposed to be supported by Wildfly? I.e. is it reasonable?
  3. How do I achieve this functionality with Wildfly 8.2.0.Final?
    1. Substitute Undertow's war deployment ResourceManager, modify getResource somehow?
    2. Do something to VFS.mounts? What?
    3. Ditch this approach. Instead make these war submodules into EJBs at the ear level, so they will be deployed exploded. Add these "EJBs" as war deployment resource roots like WarStructureDeploymentProcessor does it.
Vsevolod Golovanov
  • 4,068
  • 3
  • 31
  • 65
  • Also asked here: https://developer.jboss.org/message/917787 – Vsevolod Golovanov Feb 04 '15 at 16:32
  • Seems like in Wildfly 8.2 there is a way to use tag libraries from JARs, which are located in a EAR, next to WAR: https://issues.jboss.org/browse/WFLY-1172 – Vsevolod Golovanov Feb 25 '15 at 14:12
  • Not sure about JBoss Developer Studio, but this all works just fine for me with plain Eclipse + JRebel (and Maven, but it doesn't play a role here), also when deployed to WildFly. Perhaps you should try JRebel and see if it solves your problem. – BalusC May 25 '15 at 12:30
  • Just tried, this works even for me without JRebel if the fragment project is referenced via Deployment Assembly. – BalusC May 25 '15 at 19:59
  • @BalusC, do you have a structure EAR\WAR\JAR? JAR is referenced in WAR's Deployment Assembly? Changes to XHTML in the JAR get reflected in UI in runtime? – Vsevolod Golovanov May 26 '15 at 13:44
  • And then there is the fact that JSF facet in Eclipse requires Dynamic Web Module facet, which can't coexist with Web Fragment Module: https://bugs.eclipse.org/bugs/show_bug.cgi?id=363088. Not sure if it's that necessary with JBoss Tools though. – Vsevolod Golovanov Jun 02 '15 at 17:48

1 Answers1

0

Ended up fixing this in JBIDE-20071 Allow deploying exploded jars to war/WEB-INF/lib, so that JBoss Tools would deploy web fragments exploded. Web fragments were being deployed packaged, only because previously there was a bug in JBoss AS7 (AS7-4704).

Vsevolod Golovanov
  • 4,068
  • 3
  • 31
  • 65