For stuff like data dictionary lists, or other random stuff I don't need to
reload I will initialize on startup and store in the servletContext. I will
use EhCache for handling cache of model objects when I have a lot of reads
and want to improve performance when there are lots of "things".
I
Hi...
It depends on what the objects mean on your system... exist
ApplicationAware, SessionAware and RequestAware interfaces...
You decide what to use in your design.
HTH
2009/7/8 Mitch Claborn
> What is the preferred method of caching arbitrary Java objects locally
> in a Struts application?
Are you talking about reset in a Struts form? Make sure the bean is scoped
to request.
On 4/6/07, Laurie Harper <[EMAIL PROTECTED]> wrote:
Chris Pat wrote:
> Hello
> Is/how it possible to clear the cache on an action?
> My action works perfectly, however when the user hits reload
> the previou
do you have this?
On 4/7/07, Laurie Harper <[EMAIL PROTECTED]> wrote:
Chris Pat wrote:
> Hello
> Is/how it possible to clear the cache on an action?
> My action works perfectly, however when the user hits reload
> the previous values are repeated.
I'm not sure what cache you're talking abou
Chris Pat wrote:
Hello
Is/how it possible to clear the cache on an action?
> My action works perfectly, however when the user hits reload
> the previous values are repeated.
I'm not sure what cache you're talking about, but isn't this behaviour
as you would expect? If I refresh a page, I exp
use OScache
With Best Regards,
I.Hari krishna.
Franklin Templeton Investments
+91- 44 - 24407000 Extn:17123
--
-Original Message-
From: Puneet Lakhina [mailto:[EMAIL P
In fact, when you look at the code of the bean:message tag, it calls
TagUtils.message(). In the message() method of TagUtils, args is never null,
because of this piece of code in MessageResources : Object args[] = new Object
[] { arg0, arg1, arg2, arg3, arg4 };
Thus resources.getMessage(userLoca
Yes, they are cached by default. You can always provide your own
implementation or extension. I did.
--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM: jmitchtx
Yahoo: jmitchtx
MSN
I have got same problem as Günther. Are you sure the messages are cached in
formats HashMap? Because when you look at the source code of MessageResources,
only the method getMessage with args uses the cache. How are the messages cached
when you use getMessage(Locale,String)?
-
Found the answer to my own question. Just need to give the browser some
hints that it should cache the page. Something like:
- staticJavascript.jsp:
<%@ page language="java" contentType="application/x-javascript" %>
<%@ taglib uri = "http://struts.apache.org/tags-html-el"; prefix =
"html"%>
<% res
Also, check these out:
https://whirlycache.dev.java.net/
http://www.opensymphony.com/oscache/
Erik
temp temp wrote:
Is it similar to sessions ie each user will have his own cached
Object or all the users share the same
Cached object .
I have a jsp with multiple submit buttons .Each submit
butto
temp temp,
If you are going to cache:
Use request scope for objects that should be cached for the duration of
a single request servicing.
Use session scope for objects that should be cached for the duration of
a user's session (more than one request) and that represent data unique
to the user,
Yes, I have also written a database implementation or three ;)
http://sourceforge.net/project/showfiles.php?group_id=49385&package_id=76369
In addition to this one, I have also written several impls for
commons-resources (which Struts will be moving to very soon). There were
license issues so I
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 u
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
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
On Tue, 15 Feb 2005 15:53:15 -0500, Manuchehar Khan
<[EMAIL PROTECTED]> wrote:
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
This is the problem ... the element was added in Servlet
2.3, so you need to use the 2.3 version of the DTD:
http://java.sun.com/dtd/web-app_2_3.dtd";
Listener
OLDCSessionAttributeListener
Any help will be appreciated.
Thanks
-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 Le
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 se
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 applicati
>> 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 ver
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 ad
>
> * 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
>
> * 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
InvalidateLovInterceptor.java
- Original Message -
From: "Soaring Eagle" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
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
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 de
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 y
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 th
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 of
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 Applic
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
r
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 t
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( AppConf
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 worki
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
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 PROTECTED
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 poin
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 i
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 Plu
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 countr
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 th
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 opti
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 ac
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 som
Well, if the data is read only, then you can just cache the data in a
Hashtable and make it accessible through out the application.
If your data is volatile, then you may consider writing a simple time
based caching service -
http://www.javaworld.com/javaworld/jw-07-2001/jw-0720-cache_p.html
Hibe
Hi
The data which i want to cache has about 1 rows
and i want to cache it in may be servlet context, what
is the best way to cache it, do i just create a java
bean and cache it or some kind of mechanism already
exist like Hibernation (i am not sure what is does)
Ashish
--- "Frank W. Zammetti"
What kind of data is it? Is it a read-only set of data? How often is
it updated? Who or what can update it?
There's any number of ways to do things like this, which is the best
option depends on the particulars of your use case.
You might be able to cache the data in Javascript arrays in the
Whatever code updates the database will have to somewhere and somehow
notify the code that updates the cache. It is that simple.
Jack
On Sun, 28 Nov 2004 15:25:56 -0800 (PST), Ashish Kulkarni
<[EMAIL PROTECTED]> wrote:
> Hi
> what is the best way to cache data in web application,
> I have a t
Ravi,
Take a look at the logon example again,
org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn.java.
Regards,
Sridhar
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 6:54 AM
To: [EMAIL PROTECTED]
Subject: RE: Caching
Thanks a ton Erik.
Regds
Ravi
-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 7:41 PM
To: Struts Users Mailing List
Subject: Re: Caching Framework
// your PlugIn implementation
public class SimpleCache implements
getter and setter methods to access the
parameter.
Hope this helps.
Richard
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 13 August 2004 15:29
To: [EMAIL PROTECTED]
Subject: RE: Caching Framework
As I am very new to struts, it would be very helpful if you can
In Struts, a layered framework, caching data should happen in the data
layer. iBatis, Hibrenate, and other DAO's all do caching automaticaly
and configureable of data, such as drop down selects, etc.
Caching data in View layer is not Strut-y.
.V
[EMAIL PROTECTED] wrote:
Hi,
Is there any Caching
ubject: RE: Caching Framework
Ravi,
We've just implemented a master data load using the same technique as Eric. Appears to
be working very well.
Richard
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 13 August 2004 14:54
To: [EMAIL PROTECTED]
Subje
Use OSCache
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
wrote:
That's really a great idea Erik.
Can you please point me to some example.
Thanks Erik,
Regds
Ravi
-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 7:21 PM
To: Struts Users Mailing List
Subject: Re: Caching Framework
Ravi,
You could use Providers (http://providers.sourceforge.net) to handle collections
of objects, cache them and in addition use these collection to populate
select tags, create dependant drop down lists and display labels (descriptions)
according to an ID (i.e using tag similar to Struts )
With prov
--- Begin Message ---
One option is to use the singleton pattern. It also depends upon what functionality
are you looking for e.g. frequency of cache update.. and many more..
-Original Message-
From: Ravi Vedala (WT01 - FINANCE BANKING & SERVICES)
Sent: Fri 8/13/
Ravi,
We've just implemented a master data load using the same technique as Eric.
Appears to be working very well.
Richard
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 13 August 2004 14:54
To: [EMAIL PROTECTED]
Subject: RE: Caching Framework
T
That's really a great idea Erik.
Can you please point me to some example.
Thanks Erik,
Regds
Ravi
-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Friday, August 13, 2004 7:21 PM
To: Struts Users Mailing List
Subject: Re: Caching Framework
Ravi, without ge
Ravi, without getting real complicated, I use PlugIns to do this!
Implement org.apache.struts.action.PlugIn. You only need to write two
methods -- init and destroy. In your init method, gather some data store
it as application scope attributes (you get a reference to the
controller Servlet in th
Should we need to store the X and Y values in session?
-Original Message-
From: Pilgrim, Peter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 16, 2004 3:21 PM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset
> -Original Message-
> Fr
Hi,
Yes, indeed. Postgres has something similar.
Regards,
Freddy.
-Mensaje original-
De: Pilgrim, Peter [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 16 de junio de 2004 11:51
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset
> -Ori
> -Original Message-
> From: Kies, Daniel [mailto:[EMAIL PROTECTED]
> Sent: 14 June 2004 17:52
> To: 'Struts Users Mailing List'
> Subject: RE: Caching data from resultset
>
>
> I recently implemented pagination for resultsets using Oracle
> 9i
and 20
If you still have problems getting your query running, send it to me
directly and I'll see if can't get it going.
Dan
-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 11:00 AM
To: 'Struts Users Mailing List'
Subject: RE:
and 20
If you still have problems getting your query running, send it to me
directly and I'll see if can't get it going.
Dan
-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 11:00 AM
To: 'Struts Users Mailing List'
Subject: RE:
7;
Subject: RE: Caching data from resultset
I recently implemented pagination for resultsets using Oracle 9i. Instead
of loading up the entire resultset into memory, I just queried based on the
records that the user requested.
1) Before getting the records, I first counted the records that w
al Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 10:39 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset
Not sure how much this is going to help because we're averaging about 15
seconds to transform a resultset of 1200 reco
igned.
-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 12:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset
Not sure how much this is going to help because we're averaging about 15
seconds to transform
for a project due tomorrow afternoon :-)
Thanks
Chris
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 12:02 PM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset
Hmmm...maybe a RowSetDynaClass is what y
OTECTED]>
To
'Struts Users Mailing List'
<[EMAIL PROTECTED]>
cc
Subject
RE: Caching data from resultset
Not a problem because I do have an OTN account. But
I guess the question is
whether it will work with Oracle 8i or only 9?
In the past what I have done is
lity available using CachedResultSet (ocrs12.zip
from oracle) via 8i database and jdk1.2?
Chris
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 11:07 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset
http://otn.orac
;Struts Users Mailing
List" <[EMAIL PROTECTED]>
cc
Subject
RE: Caching data from resultset
http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
ocrs12.zip appears to be a library containing Oracles imlementation of
CachedResultSet and there is a JDK 1
t;
<[EMAIL PROTECTED]>
06/14/2004 09:54 AM
Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>
To
'Struts Users Mailing List'
<[EMAIL PROTECTED]>
cc
Subject
RE: Caching data from resultset
But CachedRowSet isn't available in
, June 14, 2004 9:55 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Caching data from resultset
>
> But CachedRowSet isn't available in JDK 1.2.2_014 right?
> I'm limited to this JDK because IBM AIX version our OS runs doesn't
> support
&g
, 2004 9:55 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset
But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.
-Original
o: Struts Users Mailing List
Subject: RE: Caching data from resultset
Hi Leon,
I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.
This s
I'm sorry, my reply should have been directed to Chris, not Leon. My apologies, Leon.
Regards,
Freddy.
-Mensaje original-
De: Freddy Villalba Arias
Enviado el: lunes, 14 de junio de 2004 14:22
Para: Struts Users Mailing List
Asunto: RE: Caching data from resultset
Hi Leon,
I su
unes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset
This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls
This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.
-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 6:21 AM
To: Struts
10:12 AM
To: 'Struts Users Mailing List'
Subject: RE: caching data in application server and EJB usage
And why don´t you cache it in Oracle?
Isn´t it enough?
> -Mensaje original-
> De: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED]
> Enviado el: lunes, 07 de junio de 2004 1
And why don´t you cache it in Oracle?
Isn´t it enough?
> -Mensaje original-
> De: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED]
> Enviado el: lunes, 07 de junio de 2004 15:54
> Para: Struts Users Mailing List
> Asunto: caching data in application server and EJB usage
>
>
> I have a Oracle ta
81 matches
Mail list logo