Skip to content

Instantly share code, notes, and snippets.

View tedwon's full-sized avatar

Ted Won tedwon

View GitHub Profile
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@tedwon
tedwon / standalone.xml
Created November 15, 2017 07:24
standalone mode with adding mod_cluster
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:4.1">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
/*
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.8">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.cmp"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@tedwon
tedwon / Extending_JBoss_AS_7.txt
Created February 24, 2017 01:27
Extending JBoss AS 7
{toc:style=none\|outline=true}
h1. Target Audience
This document is intended for people who want to extend JBoss Application Server (AS) 7 to introduce new capabilities.
h2. Prerequisites
You should know how to download, install and run JBoss Application Server 7. If not please consult the [AS7:Getting Started Guide]. You should also be familiar with the management concepts from the [AS72:Admin Guide], particularly the [AS72:Core Management Concepts] section and you need Java development experience to follow the example in this guide.
h2. Examples in this guide
@tedwon
tedwon / A.java
Last active February 3, 2017 01:48
b
c
import java.util.ArrayList;
public class MemoryUtil{
private static final int MegaBytes = 10241024;
public static void main(String args[]) {
long freeMemory = Runtime.getRuntime().freeMemory()/MegaBytes;
long totalMemory = Runtime.getRuntime().totalMemory()/MegaBytes;
@tedwon
tedwon / TestLAF.java
Created November 16, 2016 02:04
Test Java Class
import javax.swing.UIManager;
public class TestLAF {
public static void main(String[] a) {
UIManager.LookAndFeelInfo[] looks = UIManager.getInstalledLookAndFeels();
for (UIManager.LookAndFeelInfo look : looks) {
System.out.println(look.getClassName());
}
// wait infinitely