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
@Produces | |
@SomeQualifier | |
public Dools setupDroolsConfig() | |
{ | |
//set up the configuration and return it. | |
//any producer that returns a Drools automatically installs a | |
//set of generic beans with the same qualifier | |
} |
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
/* | |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
* | |
* Copyright (c) 1997-2011 Oracle and/or its affiliates. All rights reserved. | |
* | |
* The contents of this file are subject to the terms of either the GNU | |
* General Public License Version 2 only ("GPL") or the Common Development | |
* and Distribution License("CDDL") (collectively, the "License"). You | |
* may not use this file except in compliance with the License. You can | |
* obtain a copy of the License at |
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
b() { | |
cd /Users/stuartdouglas/workspace/jboss-as | |
cd $1 | |
mvn install | |
cp target/*.jar ../build/target/$JBOSS_VERSION/modules/org/jboss/as/$1/main | |
} |
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 name="undertow" > | |
<worker accept-threads="5" read-threads="5" write-threads="5" > | |
<high-water-mark value="10000" /> | |
... more options.... | |
</worker> | |
<http-listener name="listener1" socket="my-binding" handler="myHandlerChain"> | |
<tcp-nodelay value="true" > | |
</http-listener> |
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
Working backwards: | |
HEAD(Effectivly 'Use our LTQ') = 96k | |
Do not use linked transfer queue in the buffer pool = 117k | |
Add a per-thread queue to the buffer pool = 110k | |
Fix problem where class cannot be linked due to a catch clause for a missing exception type = 108k |
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
public class MagicLand { | |
static { | |
try { | |
Field field = Math.class.getDeclaredField("randomNumberGenerator"); | |
field.setAccessible(true); | |
field.set(null, new Random() { | |
@Override | |
public double nextDouble() { | |
return 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
public class MagicLand { | |
public static void main(String[] args) { | |
for (int i = 0; i < (Math.random() * 500) + 2; i++) { | |
if (Unicorn.pat()) { | |
System.out.println("UNICORN #1: PAT THIS UNICORN ONCE"); | |
} | |
} | |
for (int i = 0; i < (Math.random() * 500) + 2; i++) { | |
if (Unicorn.pat()) { |
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
public class MagicLand { | |
static { | |
try { | |
Field field = Math.class.getDeclaredField("randomNumberGenerator"); | |
field.setAccessible(true); | |
field.set(null, new Random() { | |
@Override | |
public double nextDouble() { | |
return 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
:stop-servers | |
/server-group=lb:add(profile=load-balancer, socket-binding-group=load-balancer-sockets) | |
/host=master/server-config=la:add(group=lb) | |
/server-group=ha:add(profile=ha, socket-binding-group=ha-sockets) | |
/host=master/server-config=s1:add(group=ha, socket-binding-port-offset=100) | |
deploy ~/workspace/modcluster-example/load-balancing-demo/target/clustering-demo.war --server-groups=ha | |
/server-group=ha:start-servers | |
/server-group=lb:start-servers |
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
import javax.servlet.ServletContextEvent; | |
import javax.servlet.ServletContextListener; | |
import javax.servlet.annotation.WebListener; | |
/** | |
* @author Stuart Douglas | |
*/ | |
@WebListener | |
public class SessionIDChangeListener implements ServletContextListener { | |
@Override |
OlderNewer