Skip to content

Commit 27d7ef7

Browse files
committed
Add documentation for TC_DAEMON parameter
1 parent 3b7830b commit 27d7ef7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/usage/database_containers.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ public class JDBCDriverTest {
9797
...
9898
```
9999

100+
#### Running container in daemon mode
101+
102+
By default database container is being stopped as soon as last connection is closed. There are cases when you might need to start container and keep it running till you stop it explicitly or JVM is shutdown. To do this, add `TC_DAEMON` parameter to the URL as follows:
103+
104+
`jdbc:tc:mysql://hostname/databasename?TC_DAEMON=true`
105+
106+
With this parameter database container will keep running even when there're no open connections.
107+
100108
#### Overriding MySQL my.cnf settings
101109
102110
For MySQL databases, it is possible to override configuration settings using resources on the classpath. Assuming `somepath/mysql_conf_override`

0 commit comments

Comments
 (0)