Spring.Net WebApplicationContext.GetObject如何处理并发请求?

发布于 2024-08-26 17:33:08 字数 183 浏览 8 评论 0原文

如果我在这里错过了一些明显的东西,但在浏览了文档、论坛和谷歌搜索了几个小时后,我只是找不到以下问题的明确答案:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寂寞陪衬 2024-09-02 17:33:08

我收到了 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"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文