Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Avoiding context reload

 
Wagner Danda Da Silva Filho
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Eclipse and Tomcat to develop my app. Every time I update (and build) a single class the tomcat reload's it's application context. This is so boring because I have to wait almost 90 seconds for the reload, is there a way to avoid such thing?

PS: I dunno if I'm in the correct forum.

Thanks!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
90 seconds sounds like a long time.
How long does it take if you reload the application from the tomcat manager?
 
Wagner Danda Da Silva Filho
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same time... Our application uses Struts (with Tiles), Spring (for IoC) and Hibernate... We have *only* 73 hibernate entities. Once I saw somebody changing a class in the GUI editor (it was Eclipse) and after build it the changes were reflected automatically in the servlet container (the tomcat) without any context reload.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure it was a class running in Tomcat?
I don't know of anyway to reload individual classes without reloading the app.
 
Wagner Danda Da Silva Filho
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, I just found it!

I've acidentally changed the property "reloadable" to false in my tomcat context file and voil´┐Ż, every time I build the changes the tomcat JVM is automatically updated!

I'm using MyEclipse and I really don't know how it does that, but its awesome! Maybe this is working only because I have started tomcat inside the IDE, and the might be sharing the same ClassLoader... Whooo, that a great feature!

I'll try at home the same feature using my free environment: Eclipse + Sysdeo.

I let you know if that works too.

Cheers!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic