在java中使用相同的数据源将两个应用程序连接到同一个数据库会有什么影响? [英] What would be the impact of Connecting two application to the same database using same datasource in java?

查看:145
本文介绍了在java中使用相同的数据源将两个应用程序连接到同一个数据库会有什么影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在同一个jboss服务器上运行有2个不同的应用程序。我想通过相同的数据源将这两个应用程序与同一个mysql数据库连接起来。

There are 2 different applications running on the same jboss server. I want to connect these 2 applications with the same mysql database through the same data source.

运行这两个应用程序会产生什么样的影响 -

what kind of impact can be occur in running these 2 application -

我认为这些问题可能会发生会发生。
- 表锁定问题,性能下降,连接问题,ACID属性丢失问题。

I am supposing that these issues could be happen . - Table Locking issues, Slow performance, connectivity issue, ACID properties lost issue.

这种方法有什么缺点吗?

Are there any drawbacks with this approach?

推荐答案

这一切都不会发生(表锁定问题,性能低下,连接问题,ACID属性丢失问题)。

Nothing of this can happen (Table Locking issues, Slow performance, connectivity issue, ACID properties lost issue).

数据库无法真正区分两个连接是否来自同一个应用程序。

The database cannot really distinguish if two connections come from the same application.

当然,两个应用程序仍然意味着两倍的请求,因此性能可能会受到影响。 ACIDity不受影响,您也不太可能用完TCP端口。

Of course, two applications still means twice as many requests, so performance may be affected. ACIDity is not affected and you are unlikely to run out of TCP ports either.

访问同一数据库的两个应用程序的性能与性能相同一个应用程序两倍流行

这篇关于在java中使用相同的数据源将两个应用程序连接到同一个数据库会有什么影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆