Hi,
 
To whom may know what is going on,
 
I am still having trouble getting the auto-code reload feature working. I posted before that the HtmlBean was giving a class cast exception, and Karl wrote back showing me some things that may be why. I implemented them and I am still having the problem. Karl mentioned that my bean is application scope so when Orion reloads the app, it can't cast the "old" version of HtmlBean to the new version reloaded. I put in the "implements Serializable" and added a private static final long serialVersionUID = 94989087234L (some number), and that still didn't fix it.  The odd thing is, I am not working on the HtmlBean, I work on the AvailBean, which is a session scope bean. So, let me see if I got this straight. After testing something on the site, I can go to the code, change the source, and all I have to do is save it. Orion will recompile it and reload the whole code-base again. In the process Orion "saves" any http session objects (assuming they are all serializable objects) to disk, then reloads those objects into each session when reloading the web-app. This is to preserve the state of the HttpSesion across web app restarts, right? Is there anything I am missing here?
 
Next, what exactly does this serialVersionUID do? Do I need to change it each time I change that class so upon reloading the changed bean, it knows its not the same one? Or do I just place the private static final long serialVersionUID = .... in each and every bean and/or object that can be put in the session, and thats it..leave it alone for good? How is it used by Orion (for that matter, any JVM/Servlet engine). I was told that it was not necessary in our code, but Karl mentioned it yesterday to me in the reply email, so I am a little confused about its use now.
 
Lastly, is there any problem with application scoped beans and restarting web apps?
 
Thanks again.
 

Reply via email to