简体   繁体   English

JPA连接限制

[英]JPA Connection Limits

I am building a socket server for multiple clients. 我正在为多个客户端构建套接字服务器。 Every client has his/her own thread in which there is an associated EntityManager. 每个客户端都有自己的线程,其中有一个关联的EntityManager。 As long as there are many operation for each client, I close the EntityManager only when the client disconnects from the server. 只要每个客户端有很多操作,我仅在客户端与服务器断开连接时才关闭EntityManager。 How many connections can my java program hold in such manner? 这样我的Java程序可以保持多少个连接? I am using JPA (Eclipselink) + MySQL without JTA . 我正在使用不带JTA JPA (Eclipselink) + MySQL EntityManagerFactory is one for all clients. EntityManagerFactory是所有客户端的一个。 How can I calculate the number of connections for my machine? 如何计算机器的连接数? Or is there a special limit? 还是有特殊限制?

Your limit will be based on your database server as well as available resources on the machine where your socket server is running. 您的限制将基于您的数据库服务器以及运行套接字服务器的计算机上的可用资源。 There is no limit in JPA per se. JPA本身没有限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM