- This topic has 4 replies, 3 voices, and was last updated 18 years, 6 months ago by Riyad Kalla.
-
AuthorPosts
-
Jon NermutMemberJava 5 has a feature where the core class libraries are shared across JVM’s to reduce memory size and startup time. See:
http://java.sun.com/j2se/1.5.0/docs/guide/vm/class-data-sharing.htmlWhen I tried to add the -Xshare:on JVM option to the startup of Tomcat 5.5 under MyEclipse 4.1.1, I get an error dialog on startup with the text:
“A configuration error occured during startup. Please verify the preference field with the prompt: An error has occurred while processing the shared archive file. Tool agent requires sharing to be disabled”
Thats in debug mode. In non-debug mode I get this on the console:
Error occurred during initialization of VM
Unable to use shared archive.
An error has occured while processing the shared archive file.
A jar file is not the one used while building the shared archive file.Actually looking at the messages, it looks more like an Eclipse or Tomcat thing than a MyEclipse problem. But do you guys know of any workaround?
Startup time of tomcat or other app server is the biggest productivity drain when developing in Java, so any tricks to increase startup time are worth persuing.
Cheers,
Jon Nermut
Riyad KallaMemberJon,
Unfortunately I’ve never worked around this issue before. Although I would point out since we support hotsyncing with the VM an syncing of files on save with an exploded deployment, and lastly context reloading in Tomcat. I have to wonder why you are restarting your app server so much that it’s a pain… you know about these functionalities right?
Jon NermutMemberYes I am aware of hotcode and autodelpoy.
However hotcode only works in the relatively small subset of code changes that dont change the signature of the class.
Also any changes to configuration files such as spring, hibernate, jsf config require a restart.
So despite hotcode and autodeploy, you still end up restarting frequently, which when it takes longer than a minute to start up, is very unproductive.
Its a big problem in java development. We are trying to minimise startup time by all sorts of things – pre generating hibernate cglib proxies, setting all spring definitions to lazy etc. etc.
Haris PecoMemberJon,
I don’t believe that ‘shared archive’ can help you quicker start.Hibernate start slow and you can try increase hibernate start with caching configuration.
see this http://www.hibernate.org/194.html
Best regards
Riyad KallaMemberJon,
I strongly suggest in order to keep your sanity, download and install the Tomcat Manager application from TOmcat’s site, then keep a browser window open to the manager and just hit “Reload” to restart your context. If you keep restarting the app server over and over again after every change, you will go nuts (I almost did). -
AuthorPosts