Since you seem to be using classic deployments and WebAppContext, then you are using ClassLoaders (2 of them in fact). It will be exceedingly difficult to not use classloaders, as that's a core / fundamental part of the various specs that Jetty implements.
Then you also have the various class pinning issues that prevent clean and dynamic unload/reload of classes. See also https://github.com/eclipse/jetty.project/tree/master/jetty-util/src/main/java/org/eclipse/jetty/util/preventers Those prevent leaks in the WebApp class reloading by forcing the class pinning at the server level. Using something like dcevm will do you no good, as the reloading is for the webapp, not the server. And dcevm is focused on the system/server classes, which is too fundamental. -- Joakim Erdfelt <[email protected]> webtide.com <http://www.webtide.com/> - intalio.com/jetty Expert advice, services and support from from the Jetty & CometD experts eclipse.org/jetty - cometd.org On Tue, Dec 16, 2014 at 7:38 AM, Edgar Espina <[email protected]> wrote: > Hi, > > I want to implement a "dynamic reloading of classes" for my > micro-webframework, but I want to get out of class loaders (if possible). > > I will recommend users to install and use http://dcevm.github.io/, which > alredy does the hard part (class reloading at the JVM level) and avoid a > custom class loader. > > In my mind, all I have to do is listening for changes and restart the > framework (when need it). Today, > I can't to do it because calling server.stop, exit the JVM (of course). > > I've been reviewing the deployment plugin > <https://www.eclipse.org/jetty/documentation/current/deployment-architecture.html> > from > Jetty. But not sure if the deployment plugin required a custom classloader > or not. Also, want this ONLY for development (not prod). That's why I think > current deployment plugin is too much for my use case. > > You can see how I do build a my server here: > https://github.com/jooby-project/jooby/blob/master/jooby/src/main/java/org/jooby/internal/jetty/JettyServerBuilder.java > > I will love to hear what do you think is possible or not, alternative > solutions or any other comment. > > Thanks in advance > > -- > edgar > > _______________________________________________ > jetty-users mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users >
_______________________________________________ jetty-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
