RE: how to cache lists?

2001-04-17 Thread Menno M Jansz


This is ok, but doesnt work if you have no control over the data changes. 

Some of our data in the database gets changed by other legacy apps, so we've 
implemented a CacheManager through 
which we obtain cached data. If the data item is not currently cached we retrieve it 
from the EJB tier, store it in the session or 
servlet context depending on the data, and if required use a Timer to schedule for the 
data attribute to be cleared from the 
session/context.

Regards,
Menno

17/04/2001 06:58:50, "Nanduri, Amarnath" <[EMAIL PROTECTED]> wrote:

>I would say implement a pattern like the Observer which watches for any
>changes to the data list. If any changes occur it immediatly updates the
>internal list. So you will always have an updated list (no matter what) and
>it is done automatically behind the scenes...
>
>cheers,
>Amar..
>
>-Original Message-
>From: Greg Reddin [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 17, 2001 9:46 AM
>To: [EMAIL PROTECTED]
>Subject: RE: how to cache lists?
>
>
>You could store the data in Application context as you've stated, but
>provide a
>mechanism for that data to be refreshed (either automatically or manually)
>without restarting the server.  I haven't implemented this at all, but it
>seems
>possible.  I've considered using some sort of date/time stamp, a boolean
>flag,
>or some other means to make the data automatically refresh.  Otherwise you'd
>have to create some admin actions that would manually be invoked to refresh
>the
>data.
>
>-Original Message-
>From: [EMAIL PROTECTED] 
>Sent: Tuesday, April 17, 2001 8:34 AM
>To: [EMAIL PROTECTED]
>Subject: RE: how to cache lists?
>
>
>Alex, It is a good idea from a developers point of view. But when U say this
>to an IT manager and also tell him that U have to restart the webserver when
>ever new data is added, he/she will not allow U to do that. I faced the same
>situation but gave up on the idea of caching the data at application level.
>
>Thanks,
>Uday.
>
>-Original Message-
>From: Alex Colic [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 17, 2001 8:15 AM
>To: Struts
>Subject: how to cache lists?
>
>
>Hi,
>
>Lets say you have a web app that runs over a number of web pages in a wizard
>fashion. On each one of these pages you need to present the user with a
>select box holding lists. e.g. locations, cities, etc. This data is read
>from a database and rarely changes.
>
>How would you cache these lists so that as each user access this site they
>do not need to have this info downloaded again?
>
>I was thinking in the init() of my ActionServlet to access the database and
>get these lists then place them in the session with Application scope. I
>think this would allow each user to access the data without reaccessing the
>database.
>
>Any comments or suggestions are appreciated.
>
>Regards
>
>Alex
>






Re: Bean-applet support?

2001-04-10 Thread Menno M Jansz

09/04/2001 13:39:53, "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:

>
>There's no current support for something like this, but it would be
>interesting to consider.  Are you thinking that there would be an applet
>for each field, or one for the entire form?
>

We are about to start on this, and currently plan to do an applet per field, using 
infobus for 
communication between them when required. This allows the most flexibility for the 
client to 
rearrange things. However at the moment our use of Struts is on hold due to company 
policy on 
open-source, which we are still trying to overcome. So unfortunately we have to 
progress without 
Struts for the moment.

Regards,
Menno








Re: Resources.properties -> trick?

2001-04-09 Thread Menno M Jansz

09/04/2001 17:44:58, Darryl <[EMAIL PROTECTED]> wrote:

>Mark,
>
>One scenario would be when I'm doing some prototyping and I don't want to necessarily 
>setup an ActionServlet to do some 
quick form designs etc. I might however, want to quickly play around with the page 
parameters using a properties file.

It's actually pretty quick to setup an Action servlet, I just did it for a prototype 
here, up and running in 2 days. Unfortunately now 
the use of open source code is a problem for our company, so looks like we'll have to 
re-invent the wheel :(

Cheers,
Menno




This maillist, reply-to problem

2001-04-06 Thread Menno M Jansz


Hi,

I just noticed that all my mails sent to this list have two reply-to fields, one with 
my email, and one with the group. As mine is last it 
seems to get picked up. Is there something I need to set to avoid this? I did not 
notice this in othere people's posts.

Thanks,
Menno




Re: how to get reference of a session bean in Action

2001-04-06 Thread Menno M Jansz

Ah in the examples I of course meant 

eg request.getSession().getAttribute("userinfo");
and eg request.getSession().setAttribute("userinfo", userinfo); 

Sorry I need more caffeine,
or more sleep, Menno

06/04/2001 17:13:12, Menno M Jansz <[EMAIL PROTECTED]> wrote:

>To access EJBs in your Action do a GetAttribute on the HttpSession ( eg 
>request.getSession().getAttribute("userinfo"); ). 
>
>1. If the return is null then this indicates it is the first time for this 
>HttpSession, so do a lookup for the relevant ejb. When you 
>have a reference to it do a SetAttribute on the HttpSession (eg 
>request.getSession().setAttribute("servers", servers); )
>2. If the return is not null you have the reference to the ejb.
>
>Note the key here is that every client/user has has a unique HttpSession associated 
>with it, via a unique session id. I think 
>that's what you are getting confused about. So you can use to this HttpSession to 
>store information for this user  which you 
can 
>access across more than one page request.
>
>Hope that helps,
>
>Menno
>
>
>05/04/2001 13:26:03, "G.L. Grobe" <[EMAIL PROTECTED]> wrote:
>
>
>>If the life-span of an Action is only when that Action is being exec'd, and
>>I've created my session bean in this Action, and since this Action's
>>ActionForm class spans multiple pages, how do I grab the reference to that
>>session bean the next time that Action is exec'd? It seems a little odd to
>>have to give unique names to a setAttribute method (as any number of users
>>could jump on) and was wondering how else this might be done.
>>
>>Any help much appreciated.
>>
>
>
>






Re: how to get reference of a session bean in Action

2001-04-06 Thread Menno M Jansz


To access EJBs in your Action do a GetAttribute on the HttpSession ( eg 
request.getSession().getAttribute("userinfo"); ). 

1. If the return is null then this indicates it is the first time for this 
HttpSession, so do a lookup for the relevant ejb. When you 
have a reference to it do a SetAttribute on the HttpSession (eg 
request.getSession().setAttribute("servers", servers); )
2. If the return is not null you have the reference to the ejb.

Note the key here is that every client/user has has a unique HttpSession associated 
with it, via a unique session id. I think 
that's what you are getting confused about. So you can use to this HttpSession to 
store information for this user  which you can 
access across more than one page request.

Hope that helps,

Menno


05/04/2001 13:26:03, "G.L. Grobe" <[EMAIL PROTECTED]> wrote:


>If the life-span of an Action is only when that Action is being exec'd, and
>I've created my session bean in this Action, and since this Action's
>ActionForm class spans multiple pages, how do I grab the reference to that
>session bean the next time that Action is exec'd? It seems a little odd to
>have to give unique names to a setAttribute method (as any number of users
>could jump on) and was wondering how else this might be done.
>
>Any help much appreciated.
>






Bean-applet support?

2001-04-04 Thread Menno M Jansz


Is there any support in Struts for bean-applets?

We are looking to use Struts but need extensive use of bean-applets in our jsp to 
provide a rich UI, passing the bean-applets 
serialised objects via the web tier.

Regards,
Menno




Re: 3 'Intro' questions on struts and list

2001-04-04 Thread Menno M Jansz



There is an archive at http://archive.covalent.net/ but it only goes back from 
December last year. Are there any archives of 
recent months?

I would also like to know when 1.0 final is expected, as I am in a similar position. 
It will be easier to convince management to 
go Stuts if it is not beta.

Regards,
Menno.


04/04/2001 00:44:11, Peter Smith <[EMAIL PROTECTED]> wrote:

>Hello all,
>
>1. Is there an estimated/expected date for final
>release 1.0 of Struts?  Don't know if my boss will be
>ok with beta software in production.
>
>2. Can I find archives for this list somewhere?
>
>3. I'm especially interested in anyone who's compared
>Struts / JSP with other options such as Turbine /
>Velocity.  I've read one document doing a comparison
>on the Velocity site, but want more points of view.  I
>get to decide our company's web-building
>infrastructure.
>
>Cheers.
>
>--Peter--
>
>
>
>
>__
>Do You Yahoo!?
>Get email at your own domain with Yahoo! Mail. 
>http://personal.mail.yahoo.com/
>