[Logo] RSF Discussions Forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Where to put the Producer bean defs...  XML
Forum Index -> RSF Help and Problems
Author Message
stevegithens
Request-scope Wrangler

Joined: 04/04/2006 20:34:52
Messages: 84
Location: ooeepooee
Offline

In the cookbook tutorials, the Producer beans seem to generally be in applicationContext.xml.

Because many of my producers are starting to depend on request scope beans, I've been moving them all to requestContext.xml.

Is this going to have negative ramnifications for me down the road?

thx
[WWW]
antranig
Request-scope Wrangler

Joined: 03/04/2006 13:29:55
Messages: 643
Offline

The main issue is performance. You can take a look at the RSAC Performance Page which explains what is known about this.

The bottom line is that each request-scope bean takes around 10 microseconds to contruct, which while it isn't terribly much, can mount up after a while if you have enough of them. This was the only reason RSAC was made - it's around 100x faster than Spring at constructing beans, although a bit less flexible.

In general if the performance becomes an issue, you can use the RSACBridgeProxy to bridge a request-scope dependency to application scope and so move your producers back again.

Although I'm a bit suspicious as to why your producers are needing to depend on things in request scope - in general if you want them to access bits of the bean model this should either i) be persistent and so not request-scope, or ii) issued by means of EL bindings. Could you give me some idea of what you are doing?
 
Forum Index -> RSF Help and Problems
Message Quick Reply
Go to:   
Powered by JForum 2.1.6 © JForum Team