如何允许每台机器与 JBoss 5 和 Oracle 建立多个数据库连接
我们正在尝试使用 The Grinder 在 Grails / JBoss 5 / Windows Server 2003 应用程序中重现 Oracle 死锁问题。我们使用 8 个 VM Grinder 节点模拟 800 个并发用户,但我们只看到每个 VM 有一个数据库连接,因此在这一过程中的某个地方似乎存在某种限制。
我们如何解除这一限制以允许每个虚拟机有多个数据库连接?
We are trying to reproduce an Oracle deadlock issue in our Grails / JBoss 5 / Windows Server 2003 application with The Grinder. We are simulating 800 concurrent users using 8 VM Grinder nodes, but we are only seen one database connection per VM, so somewhere along the line there appears to be some sort of limit.
How can we lift this limit to allow more than one database connection per VM?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试直接从 Grinder 连接到 Oracle?通常,您会使用 Grinder 对 JBoss 服务器施加负载,并让 JBoss 担心 Oracle 连接。
如果您确实想从 The Grinder 转到 Oracle,并且想要精确控制打开的数据库连接数量,可以通过为每个 Grinder 线程打开单独的连接来完成。在 TestRunner 类的 _init_ 方法中实例化一个新连接。您需要避免使用任何 ORM 工具(Hibernate、Ibatis 等),因为它们会为您进行连接池,并且不允许您直接控制打开的数据库连接数量。请改用 JDBC API(通过 jython)。
Are you trying to connect directly from the Grinder to Oracle? Normally you'd use the Grinder to apply load against your JBoss server, and let JBoss worry about the Oracle connections.
If you really want to go from The Grinder to Oracle, and you want to control exactly how many DB connections you open, it can be done by opening a separate connection for each Grinder threads. Instantiate a new connection in the _init_ method of your TestRunner class. You'll want to avoid using any ORM tools (Hibernate, Ibatis, ...) since they do connection pooling for you and won't let you have direct control of the number of DB connections you open. Use the JDBC API (via jython) instead.