TomcatExpert

How to solve cache issues when use zero down time deploy tomcat 7

I'm in a very interesting situation. I'm validating the migration tomcat 6 to tomcat 7, so we can use the zero donwtime deploy.
One of the problematic situations is our cache. As we'll have two wars running at the same address int tomcat 7... the cache will be doubled! Cache today is inside servlet context.
The first idea I had was to put the cache within the global JNDI. Thus, all. War can access the same cache in the global JNDI container.
I work, but the problem came .... When I retrieve an object inserted by another war, the JVM generates another internal identifier for the same class in both wars....and so all my cast crashed!!! Especially those inside equals .....That is, within the cache I have an object of class war within thecom.empresa.Cliente ....., I have the same class does not work just right ... but the cast!Any idea how to get around this?

asked by Fernando Franzini

question

That is correct, two different web applications (even the same application deployed twice) generates to different classes, as the same class is loaded by the same class loader.

If you want your cache to remain up, while you redeploy the application, you would also have to extract the classes stored in the cache, remove them from the WAR and deploy those classes into tomcat's lib directory instead. These classes wont be reloaded, nor will they change.

 

answer

answered by fhanik on March 9, 2012 08:07 AM

Filip Hanik is a Senior Software Engineer for the SpringSource Division of VMware, Inc. (NYSE: VMW) and a key participant in the company's Apache Tomcat initiatives. Filip brings 15 years of extensive experience in architecture, design and development of distributed application frameworks and containers and is recognized for his top-quality system development skills and continuous participation of Open Source development projects. Filip is an Apache Software Foundation member and a committer to the Apache Tomcat project where he is a leading authority on Tomcat clustering and a key contributor to the core of the platform. Filip has made contributions to software initiatives for Walmart.com, Sony Music, France Telecom and has held a variety of senior software engineering positions with technology companies in both the United States and Sweden. He received his education at Chalmers University of Technology in Gothenburg, Sweden where he majored in Computer Science and Computer Engineering.

Comments

Your website is really cool

Your website is really cool and this is a great inspiring article. Thank you so much.
wallpeiper

I have a hard time describing

I have a hard time describing my thoughts on content, but I really felt I should here. Your article is really great. I like the way you wrote this information.
http://livewellspendwell.webs.com/apps/blog/show/44594674-enhance-your-home-with-a-great-garden

Very useful post. This is my

Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up.
online real estate courses training institutions

this is really nice to

this is really nice to read..informative post is very good to read..thanks a lot! Dresses For Women

dani

Excellent information on your blog, thank you for taking the time to share with us. Amazing insight you have on this, it's nice to find a website that details so much information about different artists.
grimsby eagles

this is really nice to

this is really nice to read..informative post is very good to read..thanks a lot!
https://cuoreiberico.it

This article gives the light

This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article.
military diet plan

This article gives the light

This article gives the light in which we can observe the reality. This is very nice one and gives in depth information. Thanks for this nice article.
Game Killer APK

This is just the information

This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog..
http://topnailfungustreatment.com

You have a good point here!I

You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!!!
organic contest

This content is written very

This content is written very well. Your use of formatting when making your points makes your observations very clear and easy to understand. Thank you.
Madison WI SEO Company

This is just the information

This is just the information I am finding everywhere. Thanks for your blog, I just subscribe your blog. This is a nice blog..
term paper

This type of message always

This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post.
MexicanInsuranceStore.com

I would like to thank you for

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. Thanks...
Click here

Awesome blog. I enjoyed

Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
http://best-of-all.webstarts.com/

I can set up my new idea from

I can set up my new idea from this post. It gives in depth information. Thanks for this valuable information for all,..
jiofi.local.html/index.htm

Your blog provided us with

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging..
garcinia pure select

You have done a wonderful job

You have done a wonderful job by sharing the method to solve cache issues when use zero down time deploy Tomcat 7. The method seems to be very clear and I hope all people can understand the method easily. Keep sharing! Babylon City Tours

Check Cashing

Actually interesting content writing. I must say I want to examine this sort of excellent submit. Today simply click below Check Cashing Thanks pertaining to excellent details.

Thanks for your post. I’ve

Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks.
Car accident lawyer

Hello! This is good site to

Hello! This is good site to spent time; I just stumbled upon your informative blog and wanted to say that I have really enjoyed reading your very well written blog posts. www.cleanenergyco.com.au

Thanks a lot for sharing us

Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this.
Best RO water purifier with price under 10000 rupees

ver

This is really on top of that a truly decent advertisment you honestly professional exploring because of. It will be far away from regularly now we have hazard to look into something. help with research paper

Sometimes it is very

Sometimes it is very difficult to solve the cache issues. This blog is very informative and from this I got the idea to solve the cache issues when we are using zero downtime deploy tomcat 7. Thanks for sharing best cable deals

Your blogs and each of its

Your blogs and each of its stuff is so pleasurable and valuable it is making me come back soon you can look here.

I needed to thank you for

I needed to thank you for this incredible read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post blog here

Electrical power dissertation

Electrical power dissertation web-sites on-line when you likewise be given clearly advertised with your web page. dissertation help

To be able to find out what

To be able to find out what you need to do for an excellent SEO strategy, you must first know where you and your opponent's stand in the world of current SEO methods sources tell me.

I really loved reading your

I really loved reading your blog. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good.Thanks alot you can look here!

Obviously to find engine

Obviously to find engine optimization is that it is becoming progressively more complicated, time intensive and costly to become rated for well-known and successful keywords and phrases straight from the source.

Research also reveals that

Research also reveals that some SEO companies function on great volume basis. Such SEOs offer simple SEO solutions at very low monthly prices. As a result, such SEO companies end up having a great customer turn with a huge dedicated network of sales staff sources tell me.

I read a lot of stuff and i

I read a lot of stuff and i found that the way of writing to clearing that exactly want to say was very good so i am impressed and like to come again in future for beginners.

Hi, I find reading this

Hi, I find reading this article a joy. It is extremely helpful and interesting and very much looking forward to reading more of your work..
Städtereisen für Pärchen

I have been checking out a

I have been checking out a few of your stories and i can state pretty good stuff. I will definitely bookmark your blog
Canadian online pharmaceuticals

If more people that write

If more people that write articles really concerned themselves with writing great content like you, more readers would be interested in their writings. Thank you for caring about your content.
rear extension architect

You are a really convincing

You are a really convincing writer. I can easily see this in your article.You've got a way of writing compelling information that sparks much interest. forex sebenar review

Not at all like different

Not at all like different online journals I have perused which are truly not that good.Thanks a lot More Detail

Awesome article! I want

Awesome article! I want people to know just how good this information is in your article. It’s interesting, compelling content. Your views are much like my own concerning this subject.
surveyor rv dealer in missori

This is very educational

This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!
followerstoday

In fact your creative writing

In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
original site

This type of message always

This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post.
hotels near zona rosa kc

I am happy to find this post

I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharing.
hcg shots

Some truly wonderful work

Some truly wonderful work on behalf of the owner of this internet site , perfectly great articles .
goo.gl/hDorvL

This is a great inspiring

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information...
v tight gel

Thank you for taking the time

Thank you for taking the time to publish this information very useful!
rose bouquet delivery

wq

Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.
voyance serieuse

Pretty good post. I just

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info.
voyance par telephone gratuite

This is very interesting

This is very interesting content! I have thoroughly enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great.
Motivation

Thanks for the post and great

Thanks for the post and great tips..even I also think that hard work is the most important aspect of getting success..
How I became a Developer

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.