rspec/rules/S3368/java/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

57 lines
1.3 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)
=== Message
Configure a third-party connection pool.
=== Highlighting
primary:
* property name and value for xml
* whole line for property
endif::env-github,rspecator-view[]