Brian,
The XDoclet utilobject pattern caches Remote and (Local Homes the latter is of course only valid w/in one JVM), I've seen this mentioned on theserverside.com and elsewhere as a best practice, and after digging through the spec to be sure, apparently both Remote Homes and Remote interfaces should be durable even across a server restart (this is what the spec says -- the references themselves are still valid after a restart). The only time the references aren't valid is if the beans they reference have been removed. This is obviously only a problem w/ Remote Interfaces (not Homes).
Hope that helps.
Dave
"Brian McSweeney" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 06/05/2003 08:47 AM
|
To: <[EMAIL PROTECTED]> cc: Subject: [JBoss-user] Should I cache ejbRefs? |
Hi all,
my app is fronended with struts, using local beans.
The local beans use stateless session facades as
a frontend.
In a book discussing struts there is a chapter on
using entity beans which describes how it is a good
idea to cache the ejb refs in application scope.
The idea is, that it takes alot of time to create the
JNDI initial context etc.
They suggest using a ServletContextListener to
cache the ejb refs to the stateless session beans
once the application starts up.
Anyone have any opinions on this?
cheers,
Brian