Skip to content

Instantly share code, notes, and snippets.

@EugenyB
Last active March 1, 2024 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EugenyB/e55948f9b60aa78b9a16b3f1c5db1e25 to your computer and use it in GitHub Desktop.
Save EugenyB/e55948f9b60aa78b9a16b3f1c5db1e25 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 6.2023 Resource Definitions//EN" " ">
<!--
Заповнити дані - див.коментарі
-->
<resources>
<!-- ім'я пула (замінити poolname), наприклад java:app/db_pool-->
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false"
connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10"
connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0"
connection-validation-method="auto-commit"
datasource-classname="org.mariadb.jdbc.MariaDbDataSource"
fail-all-connections="false" idle-timeout-in-seconds="300"
is-connection-validation-required="false" is-isolation-level-guaranteed="true"
lazy-connection-association="false" lazy-connection-enlistment="false"
match-connections="false" max-connection-usage-count="0" max-pool-size="32"
max-wait-time-in-millis="60000"
name="nuospool"
non-transactional-connections="false" pool-resize-quantity="2"
res-type="javax.sql.DataSource"
statement-timeout-in-seconds="-1" steady-pool-size="8"
validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
<!-- ім'я користувача - логін к БД -->
<property name="User" value="student"/>
<!-- Пароль к БД -->
<property name="Password" value="123"/>
<!-- URL БД - в кінці ім'я БД -->
<property name="URL" value="jdbc:mariadb://localhost:3306/nuos?createDatabaseIfNotExist=true"/>
<property name="driverClass" value="org.mariadb.jdbc.Driver"/>
</jdbc-connection-pool>
<!-- JNDI ім'я ресурса та ім'я пула (замінити resourcename та poolname)-->
<jdbc-resource enabled="true" jndi-name="java:app/jdbc/nuos" object-type="user" pool-name="nuospool"/>
</resources>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment