Trifork Blog

Axon Framework, DDD, Microservices

Posts by Erik van Oosten

My 11 day quest to connecting JMS client to remote GlassFish from Tomcat

December 2nd, 2010 by
(http://blog.trifork.com/2010/12/02/my-11-day-quest-to-connecting-jms-client-to-remote-glassfish-from-tomcat/)

To prevent anyone from being in this tormenting situation ever again, this article describes the result of my 11 day quest to get a remote JMS client (running in Tomcat 6) to send JMS messages to a clustered GlassFish v2.1.1.

The contents:

  1. Step 1. Configure GlassFish JMS
  2. Step 2. Configure GlassFish ports
  3. Step 3. Configure the firewall
  4. Step 4. Make the GlassFish jars available
  5. Step 5. Cleanup the classpath
  6. Step 6. Getting the JMS Queue or Topic with JNDI
  7. Step 7. Making MQ client shutdown properly
  8. Ideal world
  9. Conclusions

Read the rest of this entry »

Encoding problems with properties files and IntelliJ

November 4th, 2010 by
(http://blog.trifork.com/2010/11/04/encoding-problems-with-properties-files-and-intellij/)

The Java platform has fantastic support for many character encodings. So it is a bit odd when you find out that regular properties files, read through the Properties class only supports the ISO-8859-1 encoding.

Contrast this with the increasing custom to use UTF-8 as default encoding for all files in a project (as configured through the pom.xml).

IntelliJ automatically picks up the pom setting. However, it also applies this to properties files. This gives some serious problems when you start to edit i.e. Wicket message texts.

Luckily you can change this setting in IntelliJ: File -> Settings, enter “encoding” in the top-left, select “File Encodings” and then set “Default encoding for properties files” to “ISO-8859-1”. Feel free to play around with the “Transparent native-to-ascii conversion” as well.

Update 2010-11-14: Wicket 1.5 bonus: rename your properties file to *.utf8.properties, and Wicket will read it with UTF8 encoding!

Social sites, lessons learned

September 1st, 2010 by
(http://blog.trifork.com/2010/09/01/social-sites-lessons-learned/)

As JTeam is a good match for companies starting a social website, we have had the pleasure of building a couple in the past years. This article summarizes some of the lessons we learned. If you plan to start a social website (any other new site for that matter), take notice.

Contents

  • Go live immediately
  • Focus on as little use cases as possible
  • Be viral
  • Forget pixel perfect, improve as you go
  • Choose the right technology

Read the rest of this entry »

Public Wicket introduction course May 27/28

April 1st, 2010 by
(http://blog.trifork.com/2010/04/01/public-wicket-introduction-course-may-2728/)

JTeam is proud to announce another public Wicket training. This public Wicket Introduction course (in cooperation with jWeekend) is scheduled on May 27 and 28. For more information (or on-site training inquiries) see: Apache Wicket Training page.

Register before April 15 and get a 25% discount!
Also, if you register more than one person, you even get more discount.

Wicket root mounts

February 24th, 2010 by
(http://blog.trifork.com/2010/02/24/wicket-root-mounts/)

One of the very easy things with Wicket is mounting pages on the first words of a URL; listening to URLs like http://shop.nl/article/4513 is programmed before you can say xiphophorus clemenciae.
One of the very hard things with Wicket is mounting pages where the first words of the URL are a parameter; listening to a URL like http://twitter.com/erik_van_oosten is just completely impossible.

Completely impossible? Wicket 1.5 will make this easy but is very instable for now. This article shows you how to mount pages on the root URL with Wicket 1.4. We will need to apply some hacks so hang on!

If you are only interested in using the technique you can skip to the last section ‘Understanding the demo’.

Read the rest of this entry »

Securing connections with TLS

November 10th, 2009 by
(http://blog.trifork.com/2009/11/10/securing-connections-with-tls/)

In this article I’ll explore some ways to secure socket communication with TLS from a java application. To make it more concrete I’ll show you SubEtha SMTP (an excellent Java based bare bones SMTP server) and the recent TLS extensions I added to it.

What you’ll get from this article:

  • How to mix secure with insecure communication
  • How to start TLS, server side
  • How to make the connection really safe
  • How to add client authentication
  • How to apply this with SubEtha SMTP

I’ll assume you know Java, understand the concept of a socket and the purpose of TLS/SSL.
Read the rest of this entry »

Wicket do’s and don’ts

September 16th, 2009 by
(http://blog.trifork.com/2009/09/16/wicket-dos-and-donts/)

In the past 2 years I worked in, and visited many development teams to help them implement divers Wicket applications. Some applications were mostly for visualizing stuff, some were full of forms, and some were full of Ajax tricks. This article contains some of the lessons I had to teach, or had to learn myself. I’ll present them as do’s and dont’s. They are:

  • Do use models
  • Don’t use an Ajax library without intimate knowledge of the library
  • Do make sure you understand the repeaters for high performance sites
  • Don’t overuse inheritance
  • Do keep markup in sync with the component code
  • Don’t try to do authorization from a servlet filter
  • Do take your time to override key Wicket features

Read the rest of this entry »