48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
== Why is this an issue?
|
|
|
|
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.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,java]
|
|
----
|
|
<hibernate-configuration>
|
|
<session-factory>
|
|
<!-- ... -->
|
|
<property name="connection.pool_size">10</property> <!-- Noncompliant -->
|
|
</session-factory>
|
|
</hibernate-configuration>
|
|
----
|
|
or
|
|
|
|
[source,java]
|
|
----
|
|
// ...
|
|
hibernate.connection.pool_size=10 // Noncompliant
|
|
----
|
|
|
|
|
|
== Resources
|
|
|
|
* https://docs.jboss.org/hibernate/orm/3.3/reference/en-US/html/session-configuration.html#configuration-hibernatejdbc[Hibernate, Session Configuration] - JDBC Connections
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
include::highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|