2023-05-03 11:06:20 +02:00
== Why is this an issue?
2021-04-28 16:49:39 +02:00
According to Hibernate's documentation:
____
Hibernate's own connection pooling algorithm is, ... quite rudimentary. It is intended to help you get started and is _not intended for use in a production system_, or even for performance testing. You should use a third party pool for best performance and stability.
____
This rule raises an issue when a ``++hibernate.connection.pool_size++`` value is found in a _hibernate.cfg.xml_ or _hibernate.properties_ file.
2021-04-28 18:08:03 +02:00
2023-05-03 11:06:20 +02:00
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,java]
2021-04-28 16:49:39 +02:00
----
<hibernate-configuration>
<session-factory>
<!-- ... -->
<property name="connection.pool_size">10</property> <!-- Noncompliant -->
</session-factory>
</hibernate-configuration>
----
or
2022-02-04 17:28:24 +01:00
[source,java]
2021-04-28 16:49:39 +02:00
----
// ...
hibernate.connection.pool_size=10 // Noncompliant
----
2021-04-28 18:08:03 +02:00
2023-05-03 11:06:20 +02:00
== Resources
2021-04-28 16:49:39 +02:00
* https://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/session-configuration.html#configuration-hibernatejdbc[Hibernate, Session Configuration] - JDBC Connections
2021-04-28 18:08:03 +02:00
2021-09-20 15:38:42 +02:00
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
2023-05-25 14:18:12 +02:00
=== Message
Configure a third-party connection pool.
=== Highlighting
primary:
* property name and value for xml
* whole line for property
2021-09-20 15:38:42 +02:00
endif::env-github,rspecator-view[]