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

instagram online viewer

Good article. Its very amazing thanks for sharing this cool article !!! instagram online viewer

instagram online

thanks for ones marvelous posting! I genuinely enjoyed reading it, you are a great author. I will be sure to bookmark your blog and may come back very soon. instagram online

Instagram uploader

This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. Instagram uploader

Your website is really cool

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

eliza

Mmm. Great to be within article or your report, whatsoever, I believe I should work for my website like I notice some updated and good employed in your website. youtube to mp3

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

I haven’t any word to

I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.
SEO Utah Salt Lake City

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..
SEO Chauncey Riddle

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.
barbers salt lake city ut

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..
Motor Yacht Charter Turkey

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..
Gulet Charter Croatia

Great job for publishing such

Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing
Dsquared Jeans

Thanks so much for this

Thanks so much for this information. I have to let you know I concur on several of the points you make here and others may require some further review, but I can see your viewpoint.
voyance pas cher

Excellent .. Amazing .. I’ll

Excellent .. Amazing .. I’ll bookmark your blog and take the feeds also…I’m happy to find so many useful info here in the post, we need work out more techniques in this regard, thanks for sharing.
Maine

I am very enjoyed for this

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.
Armani Jeans

I am very enjoyed for this

I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy.
giant stuffed elephant toycoast

Awesome and interesting

Awesome and interesting article. Great things you've always shared with us. Thanks. Just continue composing this kind of post.
voyance par telephone gratuit

Thanks for taking the time to

Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us.
Mark Stewe

I just want to let you know

I just want to let you know that I just check out your site and I find it very interesting and informative..
best laptop for producing music

Interesting post. I Have Been

Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks
buy medical marijuana online

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.

Post new comment

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