This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script for increasing deployment-related timeouts on WildFly to 15 minutes. | |
# Run with: $WILDFLY_HOME/bin/jboss-cli.sh --connect --file=deployment-timeout.cli | |
batch | |
/system-property=jboss.as.management.blocking.timeout:add(value=900) | |
/subsystem=deployment-scanner/scanner=default:write-attribute(name=deployment-timeout,value=900) | |
run-batch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[standalone@localhost:9990 /] xa-data-source add --help | |
DESCRIPTION: | |
Add a new XA data-source (unlike the add operation, this command accepts | |
xa-datasource-properties). | |
REQUIRED ARGUMENTS: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thread t = new Thread(() -> System.out.println("hello guadalajara")) | |
t.start() | |
ExecutorService e = Executors.newSingleThreadExecutor() | |
Future<String> f = e.submit(() -> "hello guadalajara") | |
f | |
f.get() | |
ExecutorService e = ForkJoinPool.commonPool() | |
Future<String> f = e.submit(() -> "hello guadalajara") | |
f.get() | |
CompletableFuture<String> cf = new CompletableFuture<String>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = "hello" | |
/v x | |
var list = new ArrayList<String>() | |
/v list | |
int x | |
var x | |
var x = null | |
var x = (Integer) null | |
int x=0, y=0 | |
var x=0, y=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sed -i "s/<resolve-parameter-values>false<\/resolve-parameter-values>/\ | |
<resolve-parameter-values>true<\/resolve-parameter-values>/" \ | |
$JBOSS_HOME/bin/jboss-cli.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script for enabling access log based on Undertow on WildFly. | |
# Run with: $WILDFLY_HOME/bin/jboss-cli.sh --connect --file=enable-access-log.cli | |
batch | |
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(pattern="%h %t \"%r\" %s \"%{i,User-Agent}\"",use-server-log=true) | |
run-batch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpHandler handler = he -> { | |
String body = "hello confoo"; | |
he.sendResponseHeaders(200, body.length()); | |
try (OutputStream os = he.getResponseBody()) { | |
os.write(body.getBytes()); | |
} | |
} | |
/l handler | |
HttpServer hs = HttpServer.create(new InetSocketAddress(8000), 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = "hello" | |
/v x | |
var list = new ArrayList<String>() | |
/v list | |
int x | |
var x | |
var x = null | |
var x = (Integer) null | |
int x=0, y=0 | |
var x=0, y=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set<Integer> set = new HashSet<Integer>() | |
set.add(1) | |
set.add(2) | |
set.add(3) | |
set = Collections.unmodifiableSet(set) | |
Collections.unmodifiableSet(new HashSet<>Arrays.asList(1,2,3))) | |
Collections.unmodifiableSet(new HashSet<>Arrays.asList(1,2,3)) | |
Collections.unmodifiableSet(new HashSet<>(Arrays.asList(1,2,3))) | |
Collections.unmodifiableSet(new HashSet<Integer>() {{ add(1); add(2); add(3); }}) | |
ImmutableSet.of(1,2,3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/subsystem=keycloak/realm=sample-realm:write-attribute\ | |
(name=cors-max-age,value=1000) | |
/subsystem=keycloak/realm=sample-realm:write-attribute\ | |
(name=cors-allowed-methods,value="GET, POST, PUT, DELETE, OPTIONS, HEAD") | |
/subsystem=keycloak/realm=sample-realm:write-attribute\ | |
(name=enable-cors,value=true) |
NewerOlder