• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Avoiding context reload

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic