Often you’re using ldap for authentication. But what if you’d like to store more information to your ldap and access it from your enterprise application? You can add an external context to your JNDI tree.
Read More
Author: jonny
Bug in JDK Javadoc for class java.util.regex.Pattern
The Javadoc for class java.util.regex.Pattern contains a bug. It says that a back reference (Pattern (Java Platform SE 6)) to a capturing group is depicted by \n
whereas n denotes the number of the capturing group. Unfortunately this won’t work. Use $n
instead.
Read More
Script for comparing working copies
svn diff
compares repository URLs only. So, if you reintegrated a branch to the working copy of your trunk or synchronized the trunk to the working copy of your branch, you will have a problem. This little script helps you to compare two working copies.
Read More
Transaction Propagation for Remote calls
I didn’t find a clear statement whether transactions are propagated for remote calls in Java EE 5. So I tested it by creating two enterprise applications being deployed in different ears to the same JBoss-5.1.0-GA. In short: YES, the transaction is propagated and a rollback on a calling method initiates a rollback on the remote transaction, too. The willing reader might read on in order to get to know the test setup. Read More
Track Login and Logout of Users with Tapestry 5
Often it is necessary to be notified, whenever a user logs in or out. This tutorial shows, how this can be achieved with tapestry 5 using form based authentication supported by a web container like tomcat. A really nice design decision of tapestry 5 is not to use XML for configuration, but pure Java. Beside avoiding most of the configuration overhead by following the paradigm Convention over Configuration, there are service classes being responsible for the configuration as defining filters or customized dependency injection and much more. Read More
Problem deleting mailboxes in cyrus with cyradm
The cyrus imap server in version 2.2 has a weired behavior: By default an admin user is not allowed to delete mailboxes he created. The good news is, he is allowed to give himself the right to do so. Read More
Virtualization for VPN on Shared Systems
If you are using a machine being shared between several persons it is not advisable to open a VPN connection, because the tunnel would be accessible for all users of the computer. This is often the case in environments with thin clients. Instead of using a notebook or some other dedicated system, there is another possibility. Stephan Windmüller pointed me at the following solution. Simply install a virtualizer like VirtualBox with an operating system emulating its own network hardware. You can use a VPN tunnel from inside the virtualized OS without sharing the connection with other users on the host machine.
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”:
<!-- ... -->