All posts in 'English posts'

Oracle, JBDC, CallableStatements and named parameters

23-Jul-12

Update: Please take a note of comment #5 by DSurber. He works for Oracle and sheds some light on named parameters. In short: The names of the parameter do not refer to named placeholders in statement (like in JPA for example) but to PL/SQL named parameters!. Thank you very much. You might have wondered what […]

Read the complete article »

Java 7, JAAS and Kerberos Single Sign-on vs. newer Windows Systems

Java Authentication and Authorization Service aka JAAS is a pretty neat way to build a pluggable authentication mechanism for a Java application. My goal was to build a Single Sign-on (SSO) mechanism targeted on Windows machines (Windows XP SP3, Windows 7) that uses the cached kerberos ticket. The jaas configuration should be pretty simple: name_of_the_login_context […]

Read the complete article »

Take care of net.sf.ehcache.transaction.TransactionTimeoutException

15-Feb-12

The net.sf.ehcache.transaction.TransactionTimeoutException is one of those unchecked RuntimeExceptions you should take care of if you use ehcache. If this exceptions occurs you must explicitly rollback the ongoing transaction, otherwise all further requests to start an ehcache transaction from within the current thread will fail with another net.sf.ehcache.transaction.TransactionException as the cache is in an inconsistent state. […]

Read the complete article »

Get the uptime of your Java VM

08-Feb-12

You don’t need JConsole or similar for just displaying the approximate uptime of your application respectively your Java Virtual Machine: import java.lang.management.ManagementFactory;   public class Demo { public static void main(String… args) { final long uptime = ManagementFactory.getRuntimeMXBean().getUptime(); System.out.println(String.format("Up for %dms", uptime)); } }import java.lang.management.ManagementFactory; public class Demo { public static void main(String… args) { […]

Read the complete article »

The dangers of Javas ImageIO

25-Jan-12

Javas ImageIO works… well, most of the time. It contains some unfixed, jpeg related bugs, but it works. It may contain some dangers when used in a webbased application for generation large images on the fly. Most problems are related to ImageIOs filed based caching and not flushing buffers when an IOException in an underlying […]

Read the complete article »