Next question(s), if I may: Is there any documentation explaining exactly what the rules are for whether a class will be reloaded/ recompiled on the fly by RIFE's engine classloader, and for that matter a description of all the stuff the classloader does? Is the reloading just for element implementation classes? Those seem to recompile reliably for me, but helper classes, data objects and the like usually require hotswap and/or server restarts.

RIFE only recompiles element implementation on the fly, never any other file. You'll have to rely on (the limitations) of hotswap for that.

Why does the Jumpstart archive put "lib" in the -Drife.webapp.path variable? Is that just for doing metadata merging on classes in library jarfiles?

That's for the classpath to be consistent. If the classes are not in rife.webapp.path, they're not loaded by the EngineClassLoader. This means that if they refer to classes that were loaded by it, you'll get linker exceptions. The basic rule of thumb is that you have to put everything in rife.webapp.path that would normally be inside the WEB-INF hierarchy. When your application is running as a traditional webapp (with WEB-INF), you don't need rife.webapp.path.

Maybe a more concrete example.

1. Unpack the Jumpstart zipfile
2. Run "ant run" from a shell prompt
3. Load the start page up in a browser
4. Make a change to src/java/com/uwyn/rife/jumpstart/ ApplicationVersion.java so it, say, prints a line to System.out in its getVersion() or getVersionString() methods 5. Make a similar change to src/implementations/com/uwyn/rife/ jumpstart/elements/Version.java
6. Reload the start page

When I do that, the change I made to ApplicationVersion.java does not take effect, but the change to Version.java does. I have not found any

Exactly, since Version.java is an element implementation.

The reason for this is that recompiling elements is very easy since you don't have to recompile a bunch of possible dependencies. Elements are pretty much standing alone. While they might import other classes, they don't rely on other classes to exist. This is not the case for much of the rest of rest of an application.

documentation on exactly what the RIFE classloader is *supposed* to be doing in various contexts, so I am not sure if this is normal expected behavior or a sign that something is screwy about my setup. Hopefully it's all documented somewhere I haven't seen yet -- if so I will of course stick something on the Wiki to help out the next person who has the same questions.

Best regards,

Geert

--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to