This is a quick reference to get to Jolokia statistics urls for JBoss Fuse or JBoss A-MQ statistics. Sometimes, when you are interested in very specific attributes, it's easier to keep monitoring a specific url rather than loading the full Hawtio console.
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
This file contains hidden or 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
| package laccetti.test; | |
| import org.apache.qpid.server.Broker; | |
| import org.apache.qpid.server.BrokerOptions; | |
| import com.google.common.io.Files; | |
| /** | |
| * We shouldn't need external things for testing | |
| */ |
In your expression evaluate at IDE run the follow:
org.apache.log4j.LogManager.getLogger("org.hibernate.SQL").setLevel(Level.TRACE);
org.apache.log4j.LogManager.getLogger("org.hibernate.type").setLevel(Level.TRACE);
((ch.qos.logback.classic.Logger)LoggerFactory.getLogger("org.hibernate.type")).setLevel(Level.ALL);
((ch.qos.logback.classic.Logger)LoggerFactory.getLogger("org.hibernate.SQL")).setLevel(Level.ALL);
java.util.logging.Logger.getLogger("org.hibernate.SQL").setLevel(Level.ALL);
java.util.logging.Logger.getLogger("org.hibernate.type").setLevel(Level.ALL);
This file contains hidden or 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 CustomApplicationContextLoader extends SpringApplicationContextLoader { | |
| @Override | |
| public ApplicationContext loadContext(MergedContextConfiguration config) throws Exception { | |
| final HyperSqlDbServer hyperSqlDbServer = new HyperSqlDbServer(); | |
| hyperSqlDbServer.start(); | |
| return super.loadContext(config); | |
| } | |
| } |
This file contains hidden or 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
| /* schema */ | |
| CREATE TABLE `item` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `name` varchar(45) DEFAULT NULL, | |
| `user_id` varchar(45) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; | |
| CREATE TABLE `user` ( |
This file contains hidden or 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
| rabbitmq: | |
| image: rabbitmq:3.6.1-management | |
| ports: | |
| - "15672:15672" | |
| - "5672:5672" | |
| hostname: "rabbitmq.dev.intranet" | |
| volumes: | |
| - /var/lib/rabbitmq:/var/lib/rabbitmq |
$ JDK_LINK="http://googledrive.com/host/0BwBEh4QJvkXjQzIxSFJtal9LNXM" # x64 bits
$ TAR_NAME="/tmp/jdk1.8.0-amd64-font-fixed.tar.xz"
$ curl -L $JDK_LINK > $TAR_NAME
tar: jdk1.8.0-amd64-font-fixed/man/ja: Cannot create symlink to ‘ja_JP.UTF-8’: File exists # no problem here
tar: Exiting with failure status due to previous errors
$ sudo tar -xf $TAR_NAME -C /opt/
This file contains hidden or 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 java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileWriter; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.io.UnsupportedEncodingException; | |
| import gherkin.formatter.JSONFormatter; | |
| import gherkin.formatter.JSONPrettyFormatter; | |
| import gherkin.parser.Parser; | |
| import gherkin.util.FixJava; |