Domain Driven Design Context Map Integration Patterns

Shared Kernel Two or more teams shares some context. They are both and equally responsible from the shared context. Consumer/Supplier Consumer and the supplier has to work together. The consumer may veto the changes or may demand changes from the producer. Conformist The consumer and the producer are independent of each other and the producer … More Domain Driven Design Context Map Integration Patterns

Configuring Docker insecure repository ( server gave HTTP response to HTTPS client)

If docker gives the error “server gave HTTP response to HTTPS client” when starting a container, you can fix it by adding the following configuration: for never Docker releases, create or update the file /etc/docker/daemon.json as: { “insecure-registries”:[“MY_INSECURE_ADDRESS:5000”] } Replace MY_INSECURE_ADDRESS with your own address. for older Docker releases, create or update the file  /etc/init.d/docker as: DOCKER_OPTS=–insecure-registry MY_INSECURE_ADDRESS:5000 … More Configuring Docker insecure repository ( server gave HTTP response to HTTPS client)

CompletableFuture with timeout

Two CompletableFutures  can be combined to timeout the CompletableFuture with the business logic like below:  package competablefuture; import java.time.Duration; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; public class CompletableFutureSample { static ScheduledExecutorService pool = Executors.newScheduledThreadPool(4); public static CompletableFuture executeAsyncTimed(Duration duration) { final CompletableFuture asyncTimedFuture = new CompletableFuture<>(); pool.schedule(() -> asyncTimedFuture.completeExceptionally(new TimeoutException()), duration.toMillis(), … More CompletableFuture with timeout

JBOSS Wildfly XADataSourceClass is undefined

Sometimes, the server gives the following error after configuring the driver for the database: ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906: Error during crash recovery: java:/PostgresXADS (IJ031084: Unable to create connection): javax.resource.ResourceException: IJ031084: Unable to create connection at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection( at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1$ at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1$ at Method) at at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$ at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$ at Method) at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection( … More JBOSS Wildfly XADataSourceClass is undefined