Remote debugging with Java Virtual Machine

In order to remote debug a JVM export the following java options:

export JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n -XX:MaxPermSize=1024m"

I got this information from this site http://ztiromoritz.wordpress.com/2009/08/03/java-remote-debugging/.

After exporting these java options in the shell where you start the jvm you like to debug, you can use your favorite IDE to connect to port 8888 at localhost in order to start debugging.

Multiple one phase resources in jBoss-5.1.0.GA

In jBoss-5.0.1.GA there was the configuration file ${JBOSS_HOME}/${SERVER_CONFIG}/conf/jbossjta-properties.xml. In order to enable distributed transactions for multiple local resources (non-XA) the following option had to be inserted into this file:


In jBoss-5.1.0.GA this config file has been replaced by ${JBOSS_HOME}/${SERVER_CONFIG}/conf/jbossts-properties.xml. So you have to add the same line into the xml-element with name properties and attributes depends with value “arjuna” and name with value “jta”:


    
    <!-- ... -->

Standalone Tomcat with jBoss plus authentication against LDAP

There is a 2nd edition of this post: Standalone Tomcat with jBoss (2nd Edition)!
This tutorial desribes, how to install and configure a standalone Tomcat, so that a deployed webapp can authenticate against LDAP and connect to a jBoss passing the credentials in every call of an EJB via remote interface , so that the business application can authenticate against the same LDAP, too. The configuration of the jBoss seems to be a more common and better documented task and will be covered in another tutorial, which I will link here later, as soon as I have written it.

WARNING: Please don’t use this solution in a productive system, but for testing purpose only. The custom LdapExtLoginModule presented here exposes the credentials of all online users to all classes using the same class loader! I will add a blog post, as I find a solution for production systems.
Read More