1. how to package all jars in the EAR's lib
  2. Jars can be moved to the EAR's lib but sometimes the WAR cannot see certain jars needed for the web application. To solve that, one needs to modify the MANIFEST.MF of the WAR to include the lib/ folder in the CLASSPATH. Doing so may override the default classpath of the JBoss AS7 (or EAP6) though, so there are two solutions: (a) either explicitly complement the MANIFEST.MF with the Dependencies tag:
    Classpath:lib
    Dependencies:javax.faces.api
    
    -or- (b) 'install' the necessary jars in JBoss using the 'modules' mechanism. It is worth noting that this overriding behavior is likely a bug in JBoss.
  3. how to copy an EAR to a remote JBoss and deploy it
  4. See : here
  5. how to start JBoss AS 7.1.1 in Debug mode in Linux
  6. In file standalone.sh which is typically located in: jboss-as-7.1.1.Final/bin/standalone.sh add the following line at the top:
    JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME -classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
    Note the suspend=n at the end (if set to y JBoss suspends and doesn't load deployed EARs. You can then attach to the JBoss AS from NetBeans using the debug/attach option (you don't have to deploy the EARs yourself to attach, you can attach to a running JBoss AS instance where the EARs have been deployed from another machine).
  7. to build from github
  8. be sure to have OpenJDK 1.7.0_07 installed:
    1. sudo apt-get remove openjdk-7-jdk
    2. sudo apt-get install openjdk-7-jdk
    After that mvn install (with Maven 3) should build OK without any problems (or so the theory goes). It was also successfully built using build.sh (not maven) with the following configuration:
    1. java -version
    2. java version "1.7.0_02-ea" Java(TM) SE Runtime Environment (build 1.7.0_02-ea-b08) Java HotSpot(TM) Server VM (build 22.0-b06, mixed mode)
    3. javac -version
    4. javac 1.7.0_02-ea
  9. configuring JBoss AS7 clustering
  10. There's a surprising dearth of material on that subject. The only guide I found is given in the 'useful links' section of my Gaia page. Thankfully it worked.
  11. Running multiple JBoss 7 instances on the same machine
  12. NB: not all the following pieces of advice work in JBoss AS7.

    There are three options (see here for more):

    1. manually override all sets of ports on the second instance
    2. use the jboss.service.binding.set property as in:
      ./run.sh -Djboss.service.binding.set=ports-01
    3. create another virtual IP address
  13. Configuring JBoss 7 AS HTTP port
  14. you need to modify the following file (in standalone mode): /standalone/configuration/standalone.xml

    Take note that this file allows you to set both the port and the IP address bindings. By default JBoss 7 AS is bound to 127.0.0.1 but you can set this to another address or even to 0.0.0.0 (which binds to all interfaces).

The important section in the above configuration file is the following:

The various bindings can be enforced (in place of the default 127.0.0.1 values) by defining environment parameters upon the invocation of the "/bin/standalone.sh" script. E.g. I've defined a script "jboss-start" as follows:

    ./standalone.sh -Djboss.bind.address=192.168.2.5 -bmanagement=127.0.0.1
This allows me to connect to the deployed wars from remote machines and use the jboss_cli.sh console only locally.