Spring.Net WebApplicationContext.GetObject如何处理并发请求?
如果我在这里错过了一些明显的东西,但在浏览了文档、论坛和谷歌搜索了几个小时后,我只是找不到以下问题的明确答案:
WebApplicationContext.GetObject() 方法如何处理并发请求?请求是串行执行还是并行执行?是否有任何性能数据可以证明其在负载下的表现?
预先感谢您的帮助,
安德鲁
Apologies if I have missed something obvious here but having gone through the documentation, forums and googled for a number of hours, I just can't find a definitive answer to the following questions:
How does the WebApplicationContext.GetObject() method handle concurrent requests? Are the requests serialized or executed in parallel? Is there any performance data available to demonstrate how it behaves under load?
Thanks in advance for your help,
Andrew
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我收到了 Spring.Net 论坛上 Mark Pollack 的回复,其中给出了一个非常明确的答案(Mark 是 Spring.Net 项目的联合负责人):
“嗨,
检索/创建单例对象和非单例对象有一个锁,我已经在调用线程中恢复了一些测试,ConcurrentObjectFactoryTests,它有一个配置文件很长时间,但没有使用它的测试实现,以及在 DefaultListableObjectFactoryPerfTests 中
。不久前,当 Spring 和 Guice 之间的 Java 世界对此引起关注时,我就这样做了(可爱地命名为“Semi Useless Benchmark”)
。 ..ource=archives" rel="nofollow noreferrer">http://www.javalobby.org/articles/gu...ource=archives
http://www.jroller.com/Solomon/entry...e_improvements
基准测试中的“.NET 移植”类位于 DefaultListableObjectFactoryPerfTests 内。我没有 Spring.NET 的任何性能数据。社区过去(很久以前)报告了并发问题,这些问题已得到修复,我不知道该领域有任何具体问题。
哈特哈,
标记”
I received the response from Mark Pollack on the Spring.Net forum which gives a pretty definitive answer (Mark is Co Lead on the Spring.Net project):
"Hi,
There is a lock around retrieving/creating singleton objects and non singleton objects, prototypes, are effecdtively 'newed' within the calling thread. I've revived some tests around this area, ConcurrentObjectFactoryTests, which had a config file for ages but no test impl using it, as well as in DefaultListableObjectFactoryPerfTests.
There were some microbench marks that I did a while ago when there was attention on this in the Java world between Spring and Guice. (The cutely named "Semi Useless Benchmark").
http://www.javalobby.org/articles/gu...ource=archives
http://www.jroller.com/Solomon/entry...e_improvements
The ".NET ported" classes from the benchmark are inside DefaultListableObjectFactoryPerfTests. I don't have any performance data for Spring.NET. The community has reported issues with concurrency in the past (quite a while ago) which were fixed and I'm unaware of any specific issues in this area.
HTH,
Mark"