Skip to content

Executor settings passed to the builder are ignored #262

Closed
@andrus

Description

@andrus

I am integrating Simple Java Mail to the Bootique framework. It works great otherwise, but I noticed a small inconsistency. If I assemble the mailer like this:

MailerRegularBuilderImpl builder = MailerBuilder
    .withSMTPServer(resolveSmtpServer(), resolveSmtpPort())
    .withThreadPoolSize(5)
    .withThreadPoolKeepAliveTime(10);

Custom threadPoolSize and threadPoolKeepAliveTime are ignored, as the internal ExecutorService is resolved in MailerGenericBuilderImpl constructor, prior to those properties being redefined.

I found a workaround, which is to configured ExecutorService on my own, and pass it over to .withExecutorService. So while this is not an immediate issue for Bootique, I still figured I'd mention it here.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions