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

[Issue-42] Use the default (blocking) AddressResolverProvider #44

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<module name="org.jboss.as.version"/>
<module name="org.jboss.modules"/>
<module name="org.jboss.logging"/>
<module name="org.wildfly.security.manager" />
<module name="org.wildfly.subsystem"/>
<module name="org.jboss.as.weld.common"/>
<module name="org.jboss.jandex"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.impl.VertxBuilder;
import io.vertx.core.spi.resolver.ResolverProvider;
import org.jboss.as.controller.CapabilityServiceBuilder;
import org.jboss.as.controller.OperationContext;
import org.jboss.msc.Service;
Expand All @@ -15,6 +16,7 @@
import org.jboss.msc.service.StartException;
import org.jboss.msc.service.StopContext;
import org.wildfly.extension.vertx.logging.VertxLogger;
import org.wildfly.security.manager.WildFlySecurityManager;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
Expand All @@ -29,6 +31,12 @@
* @author <a href="aoingl@gmail.com">Lin Gao</a>
*/
public class VertxProxyService implements Service, VertxConstants {

static {
if (WildFlySecurityManager.getPropertyPrivileged(ResolverProvider.DISABLE_DNS_RESOLVER_PROP_NAME, null) == null) {
WildFlySecurityManager.setPropertyPrivileged(ResolverProvider.DISABLE_DNS_RESOLVER_PROP_NAME, "true");
}
}
private VertxProxy vertxProxy;
private final String optionName;
private final Supplier<NamedVertxOptions> optionsSupplier;
Expand Down