2 Replies Latest reply on Oct 15, 2012 9:01 AM by Rene Gritsch

    Classloading question

    Rene Gritsch Newbie



      we are using JBoss AS7 as a standalone server to run our webapplication.

      We have dynamically created java/class code which I do need to deploy while runtime of our application.


      In the past I used tomcat, and by default everything in WEB-INF\classes was rescanned by tomcat and I was able to copy .class files to this directory and

      the tomcat classloader was able to find them without restarting our webapplication.


      Now with Jboss it´s not working anymore, I managed to reload our XHTML files but the class files are still not loaded and I get a ClassNotFoundException and I need

      to redeply the webapp which takes a lot of time.


      We put the files here --> jboss\standalone\deployments\iss.war\WEB-INF\classes


      I played around with the deployment-scanner, but it´s only helpfully to restart the full application.


      Is there any possibility with an own Classloader, idk ... to get the classes loaded without restarting the app? I know that there are some frameworks who can handle this,

      but I only need this feature for non production use so it would be okay for me to do some hack too ;-)


      Please help!



        • 1. Re: Classloading question
          jaikiran pai Master

          The content of your deployment will be copied over to an internal (to AS) location by the deployment process. Copying over the class files to the original deployment won't take any effect until you redeploy it (like you already found out). I'm curious as to what kind of an application is this?

          • 2. Re: Classloading question
            Rene Gritsch Newbie

            I will try include JRebel, really annoying that in 2012 it´s still no common feature .. I guess every one would like to change code while runtime without restarting/redeploy ;-)


            We have a tool which will produce/generate our business classes and gui and that for we have a preview feature. Every label change ends with jboss in a redeploy now and our enterprise app needs at least 30sec to come up on a fast SSD , so it is not really a benefit to have

            such a preview function...


            Never mind, I will try JRebel or something similar for the development.