Skip to content

Maintenance: Let Mailer implement AutoCloseable, so it shuts down the connection pool automatically when disposed of by Spring #466

Closed
@lburja

Description

@lburja

When using the connection pool (batch-module enabled), the documentation suggests that the application should call mailer.shutdownConnectionPool() to allow the JVM to shut down.

With Spring Boot (spring-module), beans that implement AutoClosable are normally automatically handled and their close() method is called by the Spring framework upon application shutdown (see Spring documentation).

Therefore, I would expect Mailer to implement AutoClosable, and shut down the connection pool in the close() method, so that shutdown can be automatically handled by Spring Boot (also try-with-resources)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions