Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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!
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic