Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executor settings passed to the builder are ignored #262

Closed
andrus opened this issue May 3, 2020 · 5 comments
Closed

Executor settings passed to the builder are ignored #262

andrus opened this issue May 3, 2020 · 5 comments

Comments

@andrus
Copy link

andrus commented May 3, 2020

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.

@bbottema bbottema added this to the 6.0.4 milestone May 3, 2020
@bbottema
Copy link
Owner

bbottema commented May 3, 2020

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

bbottema added a commit that referenced this issue May 3, 2020
…nalConfig is created for the new Mailer instance so we don't miss any related properties set on the builder
@bbottema
Copy link
Owner

bbottema commented May 3, 2020

Fix released in 6.0.4.

@bbottema bbottema closed this as completed May 3, 2020
@andrus
Copy link
Author

andrus commented May 3, 2020

Thanks for the quick turnaround. Looking forward to 6.0.4

@bbottema
Copy link
Owner

bbottema commented May 3, 2020

Should be in Maven Central in a few minutes

@andrus
Copy link
Author

andrus commented May 3, 2020

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
Projects
None yet
Development

No branches or pull requests

2 participants