Implicit connection management for the default activation group
An application requester can be implicitly connected to an application server.
Implicit SQL connection occurs when the application requester detects the first SQL statement is being issued by the first active SQL program for the default activation group and the following items are true:
- The SQL statement being issued is not a CONNECT statement with parameters.
- SQL is not active in the default activation group.
For a distributed program, the implicit SQL connection is to the relational database specified on the RDB parameter. For a nondistributed program, the implicit SQL connection is to the local relational database.
SQL will end any active connections in the default activation group when SQL becomes not active. SQL becomes not active when:
- The application requester detects the first active SQL program for the process has ended and the following are all true:
- There are no pending SQL changes
- There are no connections using protected connections
- A SET TRANSACTION statement is not active
- No programs that were precompiled with CLOSQLCSR(*ENDJOB) were run.
If there are pending changes, protected connections, or an active SET TRANSACTION statement, SQL is placed in the exited state. If programs precompiled with CLOSQLCSR(*ENDJOB) were run, SQL will remain active for the default activation group until the job ends.
- At the end of a unit of work, if SQL is in the exited state. This occurs when you issue a COMMIT or ROLLBACK command outside of an SQL program.
- At the end of a job.
Parent topic:
Connection management and activation groups
Related reference
Ending connections