The Artima Developer Community
Sponsored Link

Web Services Forum
Caching in web service (axis/tomcat) ?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Balage Nagy

Posts: 2
Nickname: nagybaly
Registered: Feb, 2007

Caching in web service (axis/tomcat) ? Posted: Feb 6, 2007 1:39 AM
Reply to this message Reply
Advertisement
Hello,
Please help me in the following issue: I’m writing a web service in java with Tomcat + Axis which provides only just one method for sending a mail. Based on the given parameters it retrieves the email addresses from an ldap server and then sends the mails. I need to create a server side caching :the main purpose of caching the addresses from the ldap is to reduce the connections to ldap as much as possible. The working of it would be the following: if a sendMail() web service call is established the service checks the memory first if the addresses have been previously cached into it. If so, then checks if it isn't beyond time out. If no, then reads out the addresses from the cache, if yes creates a new cache or refreshes it.

But the main question which I don't really understand:

If I create caching (eg. with singleton) then it's sure that the addresses will be in the cache during the web service call. But if from the remote side the client closes the connection, what will happen with the cache on the server side ? Won't all resources be free up after a connection closes?
So if a next call is established is it possible for the client to get that cache which was created in a previous call?
(I'm using netscape ldap for java)
Thanks in advance,
nagybaly

Topic: Axis and email sendig Previous Topic   Next Topic Topic: Java type extensions in WSDL

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use