i m following the MVC and SessionFacade architecture,
Can we cache the Remote reference of Stateless Bean ?
will this make any overhead if application gets a huge amount of requests ..
What will be the best solution to do this ?
thanks in advance!!!!
-
Caching Remote Reference of Stateless Bean (4 messages)
- Posted by: Amit Gupta
- Posted on: April 17 2003 04:52 EDT
Threaded Messages (4)
- Re: Caching Remote Reference of Stateless Bean by Alan Choy on April 24 2003 10:19 EDT
- Re: Caching Remote Reference of Stateless Bean by dso dso on April 24 2003 10:58 EDT
-
Re: Caching Remote Reference of Stateless Bean by Alan Choy on April 24 2003 12:42 EDT
- Re: Caching Remote Reference of Stateless Bean by Amit Gupta on April 25 2003 12:55 EDT
-
Re: Caching Remote Reference of Stateless Bean by Alan Choy on April 24 2003 12:42 EDT
- Re: Caching Remote Reference of Stateless Bean by dso dso on April 24 2003 10:58 EDT
-
Re: Caching Remote Reference of Stateless Bean[ Go to top ]
- Posted by: Alan Choy
- Posted on: April 24 2003 10:19 EDT
- in response to Amit Gupta
I think the Service Locator Pattern would be the answer. Please visit the following URL:
http://java.sun.com/blueprints/corej2eepatterns/Patterns/ServiceLocator.html -
Re: Caching Remote Reference of Stateless Bean[ Go to top ]
- Posted by: dso dso
- Posted on: April 24 2003 10:58 EDT
- in response to Alan Choy
1) after reading the reference link, it seems to me that handle of remote reference should be cached instead of the remote reference. am l correct ?
2) if there are more than a client using the same cached remote / local home reference, will there be any synchronization problem ?
thx a lot for your answer -
Re: Caching Remote Reference of Stateless Bean[ Go to top ]
- Posted by: Alan Choy
- Posted on: April 24 2003 12:42 EDT
- in response to dso dso
1) Normally it is not much point to cache the remote reference of a Stateless SessionBean. SessionBean are generally tied to the lifetime of a given client session. They are relatively short-lived. If you really want, you can cache it in the ServiceLocator object.
2) Usually Stateless SessionBean would act as agents modeling workflow or provide access to special transient business services, so synchronization should not be an issue even you cache the remote/home reference. But if you're doing that, you have to be careful and you may want to synchonize the business service that the SessionBean access. -
Re: Caching Remote Reference of Stateless Bean[ Go to top ]
- Posted by: Amit Gupta
- Posted on: April 25 2003 00:55 EDT
- in response to Alan Choy
Ya !! it is perfectly alright that we can cache the Remote in the ServiceLocator .
My Question is at its place...
Will this Cache Remote Reference ,is used by the all application Clients ..
n if Yes then it will effect the performance .