Re: Caching Appliction Level Data?

2005-02-17 Thread David Johnson
Hi again a related question. if I load up the data I need from within a plug in and store it in the application scope, is this an acceptable sepatation of view and Model as long as I am doing so from a service? Remember, this app architecture I'm using has a service factory (which was set up

Re: Caching Appliction Level Data?

2005-02-16 Thread Larry Meadors
I agree: caching should be transparent to your code. Using iBATIS, you can make your entire DAO layer behave that way - each SQL statement can be cached independently, or they can be grouped as appropriate. That is the approach I use. I make my action classes always go to my service layer to get

Re: Caching Appliction Level Data?

2005-02-15 Thread Bill Schneider
how do you manage cross container caches if you are clustered - when you are using static members on classes? How do guarantee sameness on different physical machines? We do have a few caches in our application and are facing issues due to this design or an improperly implemented version of

Re: Caching Appliction Level Data?

2005-02-15 Thread Soaring Eagle
Without contesting the good points. I would say memory is cheap. For an application i worked on, we had about 6 different applications sitting on two 4 by 16 machines. The -xmx arguments of all apps put together came up to about 10 gigs RAM and the rest was left open. i dont think serious

Re: Caching Appliction Level Data?

2005-02-15 Thread Craig McClanahan
Caching or not is also a decision that you sometimes want to change after you see your application used in anger for a while. I like to provide a getter method on some application scoped bean that returns things like this, so I can change my decision to implement caching (or not), for any given

RE: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email addresses

2005-02-15 Thread Manuchehar Khan
-Original Message- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 4:43 PM To: Leon Rosenberg Cc: Struts Users Mailing List Subject: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email

Re: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email addresses

2005-02-15 Thread Craig McClanahan
On Tue, 15 Feb 2005 15:53:15 -0500, Manuchehar Khan [EMAIL PROTECTED] wrote: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; This is the problem ... the listener element was added in Servlet 2.3, so you need to use

RE: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has different SMTP TO: and MIME TO: fields in the email addresses

2005-02-15 Thread Manuchehar Khan
Thanks it works now . We are using 2.3. -Original Message- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 3:58 PM To: Manuchehar Khan Cc: Struts Users Mailing List Subject: Re: [SPAM] - Re: Caching Appliction Level Data? (session listener) - Email has

Caching Appliction Level Data?

2005-02-14 Thread David Johnson
Hi All I have a need in an app I'm working on to cache data that is valid and shared across users, like standard country codes, region codes, industry codes... stuff like that. What's the best way to do that with my struts 1.2 application? Is there something built in that I'm not aware of that I

Re: Caching Appliction Level Data?

2005-02-14 Thread Wendy Smoak
From: David Johnson [EMAIL PROTECTED] I have a need in an app I'm working on to cache data that is valid and shared across users, like standard country codes, region codes, industry codes... stuff like that. What's the best way to do that with my struts 1.2 application? Is there something

Re: Caching Appliction Level Data?

2005-02-14 Thread Erik Weber
I use the same strategy often. Another option (besides a ServletContextListener) for loading your application scope attributes is a Struts PlugIn. Erik Wendy Smoak wrote: From: David Johnson [EMAIL PROTECTED] I have a need in an app I'm working on to cache data that is valid and shared

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
Ahhh a little more information on using a Struts plugin? I'm such a noobie I've never done this.. anywhere you can point me for examples? UGH! Sorry for the simpleton question On Mon, 14 Feb 2005 13:26:12 -0500, Erik Weber [EMAIL PROTECTED] wrote: I use the same strategy often. Another option

Re: Caching Appliction Level Data?

2005-02-14 Thread Erik Weber
http://struts.apache.org/userGuide/building_controller.html#plugin_classes Just set your application scope attributes in the init method. An example of a custom PlugIn that is often used by Struts developers is the Validator PlugIn, so you'll also learn a little about the mechanism if you read

Re: Caching Appliction Level Data?

2005-02-14 Thread Martin Wegner
A PlugIn works nicely as well. I am not sure which is the recommended Struts practice. --- Wendy Smoak [EMAIL PROTECTED] wrote: From: David Johnson [EMAIL PROTECTED] I have a need in an app I'm working on to cache data that is valid and shared across users, like standard country codes,

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
Ah! After reading up on the Struts Plugins, I have the following question Are struts plugins a perfectly acceptable way to handle Application level caching? How about best practices-wise? Thoughts? D On Mon, 14 Feb 2005 11:03:24 -0800 (PST), Martin Wegner [EMAIL PROTECTED] wrote: A PlugIn

Re: Caching Appliction Level Data?

2005-02-14 Thread Craig McClanahan
On Mon, 14 Feb 2005 11:03:24 -0800 (PST), Martin Wegner [EMAIL PROTECTED] wrote: A PlugIn works nicely as well. I am not sure which is the recommended Struts practice. If you're on a Servlet 2.3 or later container (which is when ServletContextListener was introduced), you should use it

Re: Caching Appliction Level Data?

2005-02-14 Thread Frank W. Zammetti
Using a plugin only tells you WHERE your going to read the information in, not where your going to STORE it. I think that's the question you really want to ask. Plugins are pretty standard practice when dealing with Struts, but if you have a concern that you might not be using Struts at some

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
I see your points. We arent sure yet what version of Weblogic we'll be deploying to, but I'm developing in Tomcat. Sounds like an open question to me. Where would you point me to learn how to do this the ContextListener way? On Mon, 14 Feb 2005 11:10:19 -0800, Craig McClanahan [EMAIL

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
Another question Currently, I'm modifying an alplication that HAS a struts plug-in for creating Application wide stuff... the thing I want to create will depend on that stuff already being there, so would it be safe to assume that it will exist if I simply implement a vanilla ContextListener

Re: Caching Appliction Level Data?

2005-02-14 Thread Vic
Caching DATA in a view (Servlet) is a bad practice. Best practice is to use DAO, A DAO does caching for you! It has fine grain control of how, when to flush, what size... all with no or minimal coding. Data caching ...in Data Layer. .V David Johnson wrote: Hi All I have a need in an app I'm

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
Frank I see what you mean. I was assuming I'd just store the data in a hashtable or something in the Application Context I have stupid question...where is your AppConfig actually getting stored? I'd think you'd need to do the above at some point and do a getServletContext().setAttribute(

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
Ugh, that of course also sounds logical. how would you do this, then? Imagine you have a list of state codes (to keep it simple) that you want to share across Sessions (imagine that's a really long list and you dont want each session having a copy) one more thing, I also have a service factory

Re: Caching Appliction Level Data?

2005-02-14 Thread Rick Reumann
David Johnson wrote the following on 2/14/2005 12:54 PM: I have a need in an app I'm working on to cache data that is valid and shared across users, like standard country codes, region codes, industry codes... stuff like that. Everyone has given you good suggestions, but I still think you should

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
Frank, I think I get it. Static classes I get, but I guess I didnt consider that any static member of a static class is always accessible. It still strains my brain a little, actually, but I guess it makes sense. so you'd recommend this above creating some hashtable and just plunking it in

Re: Caching Appliction Level Data?

2005-02-14 Thread David Johnson
I love the sound of that product, but given the time contstraints I'm not sure I can take on learning something new and get the thing in place on time. The other thing is that while I'm using the example of country codes, there are in fact some things that will be quite large for example a list

Re: Caching Appliction Level Data?

2005-02-14 Thread Frank W. Zammetti
On Mon, February 14, 2005 2:53 pm, David Johnson said: I think I get it. Static classes I get, but I guess I didnt consider that any static member of a static class is always accessible. It still strains my brain a little, actually, but I guess it makes sense. Yeah, static is one of those

Re: Caching Appliction Level Data?

2005-02-14 Thread Rick Reumann
David Johnson wrote the following on 2/14/2005 2:59 PM: I love the sound of that product, but given the time contstraints I'm not sure I can take on learning something new and get the thing in place on time. Oh I understand. I wasn't really suggesting to learn a new product. I just meant that if

Re: Caching Appliction Level Data?

2005-02-14 Thread Soaring Eagle
how do you manage cross container caches if you are clustered - when you are using static members on classes? How do guarantee sameness on different physical machines? We do have a few caches in our application and are facing issues due to this design or an improperly implemented version of this

Re: Caching Appliction Level Data?

2005-02-14 Thread Antony Joseph
and InvalidateLovInterceptor.java - Original Message - From: Soaring Eagle [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Subject: Re: Caching Appliction Level Data? Date: Mon, 14 Feb 2005 15:54:54 -0500 how do you manage cross container caches if you are clustered - when you

Re: Caching Appliction Level Data? (session listener)

2005-02-14 Thread Leon Rosenberg
* There are also other listeners that you should explore which are available in this version -- did you know, for example, that you can be notified whenever anyone else in your app adds, removes, or replaces an application or session scope attribute? (In Servlet 2.4 you can do

Re: Caching Appliction Level Data? (session listener)

2005-02-14 Thread Leon Rosenberg
* There are also other listeners that you should explore which are available in this version -- did you know, for example, that you can be notified whenever anyone else in your app adds, removes, or replaces an application or session scope attribute? (In Servlet 2.4 you can do

Re: Caching Appliction Level Data? (session listener)

2005-02-14 Thread Craig McClanahan
HttpSessionBindingListener only works on an attribute itself (so you can tell when you get added or removd) -- it's been around since Servlet 2.0. I was referring to HttpSessionListener (tells you about session creations and deletions) and HttpSessionAttributeListener (tells you about attribute