About eric

Founder and CTO of Audaxis.

Required vs RequiredString or how loosing 1 hour

Struts 2 has two type of required validator.

  • required: checks that the value is not null
  • requiredstring: checks that the value is a string and that the string is not empty.

It is important to note the differences between those 2 validators.

For example, when using textbox linked to String attribute, Struts creates empty string. If the required validator is used to check the form values, the form will be validated because the text will not be null.

With the requiredstring validator, the form will not be validated.

As a conclusion, I strongly recommend not to use required validator for String field.

Tobflow.org is online

Tobflow

Here it is. TobFlow has now it’s own site.

It has taken some time before it went out. I started to work on a TobFlow prototype about 2 years ago. Since the early beginning, it was decided to release it as an open source project once it would be ready. Well, evertyhing is not fully ready and we still have to work on different points such as an installation procedure, some documentation but at I think it was time to let the baby grow. Now the project has some visibility and it’s the beginning of a new adventure.

I hope to have some free time in the coming months to work on points such as the wiki, the installation documentation and to start thinking about Tobflow 2.0 (more ajax, more modular).

I wish I could also work on the design tool with I think is essential for a large adoption of TobFlow.

TobFlow is hosted on Sourceforge and on Launchpad.

 

Using Linux to make an image of a windows partition

During the weekend, I had to reinstall a PC from my local sport club. The PC is used to record match results. 

Therefor, I performed a quick install of Windows XP, and I tried to secure most of the thing based on the following tips:

Despite all those securities, I wanted an easy way to create an image of the installation, so that I can quickly restore the PC if needed.

Looking around the web, I end up on a post from Habibbijan blog explaining how to perform an image of a windows NTFS partition and leave it on the disk for future restore. The solution uses Puppy Linux or SystemRescueCD.

I tried it for my own purpose and it was a success.

OpenSource UML tools – BOUML

Up to now, when I had to realize a UML analysis, I was using ArgoUML as free tool. However, I was always frustrated by some strange behavior. Sometimes, for example, it was really difficult to add a synchronous connection in a sequence diagram and with the last version (0.24) I couldn’t assign a class to an item instance of a sequence diagram.

 Recently, I discovered BOUML. BOUML is quite easy to use and it has a lot of interesting features – HTML document generation; Java, C++, IDL and PHP code generation.

I did not had the time yet to test the reverse engineering capabilities but it sounds really promising.

Moreover, BOUML is build to allow multiple users to work on the same model. Something not easy with ArgoUML and often reserved to the non-free editions in the other tool.

I really think BOUML is a great tool and deserve spending time to investigate and test it

 

TV on the WEB

If you google for "webTV" you will find a lot of "you tube" like site.

However, I was looking for something different, something closer to a TV channel.

A friend of mine shows me Mercedes-Benz TV  and Vpod.tv. Of course it’still a set of categorized video but the presentation is different and is closer to what I would expect from a web TV.

Zimbra Administration – enable SSL access

update: I just realize that after enabling the port 443 for the Zimbra administration, Zimbra itself becomes no more accessible through https. An automatic redirection resdirects everything to the Zimbra administration application.

It seems that the only way to combine https access to both Zimbra and Zimbra administration applications is to use Apache in front of Tomcat.


The default port of the Zimbra administration is 7071. To enable it to 443, you need to perform the following modifications:

1. Enable SSL Connector on Tomcat

In /opt/zimbra/<tomcat_dir>/conf directory, check that the SSL connector is enabled. If it is not, change server.xml.in and remove the HTML comments.

2. Allow 443 port for Zimbra administration

In /opt/zimbra/<tomcat_dir>/conf/zimbraAdmin.web.xml.in change the following lines:

<param-name>admin.allowed.ports</param-name><param-value>7071</param-value>

by

<param-name>admin-allowed-ports</param-name><param-value>443, 7071</param-value>

Also edit /opt/zimbra/<tomcat_dir>/conf/zimbra.web.xml.in and change the 2 occurrences of the following lines:

<param-name>admin.allowed.ports</param-name><param-value>7071</param-value>

by

<param-name>admin-allowed-ports</param-name><param-value>443, 7071</param-value>

Restart zimbra and you should be able to access Zimbra administration using: https://<your mail server>/zimbraAdmin

Garbage collection tuning on AIX

On the last AIX IBM JVM (1.5), the default garbage collection algorithm is the “Mark and Sweep” algorithm.

On a current project, running a web application on JBoss, I had some performance issues. The CPU usage was abnormally high. Even during low load (during the night), the Java process was using neatly 20% of the CPU.

After analysis of garnage collection trace output, I found out that the garbage collection was running every 10-12 sec ans was taking bout 1.2s. From those 1.2 sec, about 1.1sec was used by the mark phase. The IBM Pattern Modeling and Analysis tool shows an overall garbage collection overhead of 9%.

I tried different garbage collection policies and finally I found out that the “gencon” policy seems to be the best in our case. The overal garbage collection overhead falls below 2% and the avarage CPU usage drops by more than 15%.

My explanation is that there was a high amount of long life objects – even really long life object, maybe the connection pools. At every run, the Mark and Sweep algorithm had to mark every object and that phase was highly time consuming. The generational algorithm (the “gencon” policy) didn’t process the long life objects until it the old heap size is exceeded (in my case, once every 10 min). So the number of objects to process at each GC run was smaller and the garbage collection was running more quickly.

I just have still one question, in which case would the default setting (the mark and sweep algorithm) be suitable for a server application?