Skip to content

Executor settings passed to the builder are ignored #262

Closed

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.

Activity

  1. added this to the 6.0.4 milestone on May 3, 2020
  2. bbottema commented on May 3, 2020

    @bbottema
    Owner

    Thank you for reporting this. Will look into it asap.

  3. added a commit that references this issue on May 3, 2020
  4. bbottema commented on May 3, 2020

    @bbottema
    Owner

    Fix released in 6.0.4.

  5. andrus commented on May 3, 2020

    @andrus
    Author

    Thanks for the quick turnaround. Looking forward to 6.0.4

  6. bbottema commented on May 3, 2020

    @bbottema
    Owner

    Should be in Maven Central in a few minutes

  7. andrus commented on May 3, 2020

    @andrus
    Author

    Already is. Works like a charm. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions