Archive for the 'Development' Category

Semtinel Workbench released on Sourceforge

Monday, May 24th, 2010

Finally, after roughly three years of development, Alexander Hanschke and I  now released a version of Semtinel to the public. (more…)

Netbeans Update Center written in PHP

Friday, July 17th, 2009

Do you use Netbeans? It is my favorite IDE for Java development and beside the IDE, it also provides the Netbeans Platform, a GUI framework that makes the development of GUI applications (so called Rich Client Applications) very easy. One of the features, that the Netbeans Platform provides, is the management of updates. The user can easily install and update new modules, the building blocks of a Netbeans Platform application. Now these updates can also be distributed very easily via a simple webserver that supports PHP. (more…)

Monitoring HTTP Traffic with tcpmon

Friday, April 17th, 2009

Especially for the development of web service applications, sometimes it is very helpful to see the actual SOAP messages that are exchanged between the client and the server. A handy tool to achieve this is the TCP Monitor tcpmon. First of all, here is the link to the Webstart version: TCP Monitor (Webstart).

(more…)

Message Handling with JSF and Redirects

Sunday, March 1st, 2009

The JavaServer Faces-Framework offers a mechanism to present messages to the user. The meesages can be created by the framework itself, for example during the conversion oder validation phase. But it is also possible to create custom messages within your actual application.

But there is a problem, if you use redirects instead of forwards, e.g. by using the <redirect/> tag in faces.config.xml. A redirect leads to a second request loading the following page. The messages are only valid in the current request and are thus not displayed on the following page.
(more…)

Hibernate Performance-Tuning

Thursday, February 26th, 2009

Today, I spent some time to dive deeply into the heart of the Semtinel Core to fix a performance leak that occured since I did some experiments with rather large annotation sets. I ran into several difficulties that might be interesting to other developers as well, so this post covers the following topics:

  • Tracing of SQL statements for performance tuning of the H2 database.
  • Generating statistics for H2 in order to see, where the time is lost.
  • How to configure a single-value property in Hibernate for lazy fetching using annotations.
  • Extending the Netbeans build.xml, so that the necessary bytecode instrumentation is done automatically at build time.

(more…)

How to configure SVN for group access

Thursday, February 26th, 2009

In order to seperate the access permissions among different user groups and for different directories, you have to extend the configuration of svnserve a little bit. For example, you could have a group of users with read-only access and another group with write-access. Or you want to assign write-permissions on a per-directory basis. The setup described here is valid for the access via svnserve (svn://-style URLs).

(more…)

Determine current method in Java

Friday, February 13th, 2009

A rather strange way to determine the method, where you currently are, but it works:

1
2
3
4
5
6
7
8
9
private String getCurrentMethodName() {
   List stackTraceList = Arrays.asList((new Throwable()).getStackTrace());
   for (Iterator it=stackTraceList.iterator();it.hasNext();) {
      StackTraceElement ste = (StackTraceElement) it.next();
      if (!ste.getClassName().equals(this.getClass().getName())) 
         return ste.getClassName().concat(".").concat(ste.getMethodName());
   }
   return null;
}

I implemented it the way that the first method from the stacktrace is returned that does not belong to the class, where this code resides. So it is possible to use this code for example in an own logging class to augment the logging messages with the method name.

You can find another example here: http://dev.kanngard.net/

Basic Auth Webservice Client with .NET

Wednesday, February 11th, 2009

If a webservice requires basic http authentication (like the ones from wortschatz.uni-leipzig.de) and it doesn’t respond to a request without authentication with the proper 401 response (for example with a 500), you cannot use this service with the standard .NET client, because this client doesn’t send the header with the first request. Only after a 401 response, the header is sent. (more…)