March 16th, 2011 by
Stefan Fußenegger |
Published in
Java, Wicket, wicketstuff-merged-resources | 3 Comments
This post is short but still just amazing. Now it’s possible to serve Wicket resources from CDNs supporting custom orgins within just a few minutes (at least if you are already using wicketstuff-merged-resources). First of all, you’ll need the latest version (3.1-alpha-1) of wicketstuff-merged-resources (which is now available from Maven Central!).
Read the rest of this entry »
December 18th, 2009 by
Michael Sparer |
Published in
Compass, Java | 2 Comments
While implementing a forum with wicket, spring, hibernate and compass for search, I recently ran into a problem: there are topics and posts that should only visible for some users. Say there’s a moderator forum where all content should only be visible for … well moderators
.
Read the rest of this entry »
November 26th, 2009 by
Stefan Fußenegger |
Published in
Java | 12 Comments
In this post, I’m looking for active collaboration of my readers (as I really hope that I have some). I’ve thought about a simpler way to handle Java system properties as I tend to forget them all the time. Additionally, I don’t like to see them as string constants – neither within the code nor somewhere else. I’ve come up with a single enum class, that aims to simplify handling of system properties. Actually, you won’t ever think of possible best practices – hence “The Final Take on Java System Properties” 
Read the rest of this entry »
November 6th, 2009 by
Stefan Fußenegger |
Published in
Java | 5 Comments
As we’ve recently started feeling that response times of one of our webapps got worse, we decided to spend some time tweaking the apps’ performance. As a first step, we wanted to get a thorough understanding of current response times. For performance evaluations, using minimum, maximum or average response times is a bad idea: “The ‘average’ is the evil of performance optimization and often as helpful as ‘average patient temperature in the hospital’” (MySQL Performance Blog). Instead, performance tuners should be looking at the percentile: “A percentile is the value of a variable below which a certain percent of observations fall” (Wikipedia). In other words: the 95th percentile is the time in which 95% of requests finished. Therefore, a performance goals related to the percentile could be similar to “The 95th percentile should be lower than 800 ms”. Setting such performance goals is one thing, but efficiently tracking them for a live system is another one. Read the rest of this entry »
October 13th, 2009 by
Stefan Fußenegger |
Published in
Java, Wicket, wicketstuff-merged-resources | 19 Comments
Today, I’m happy to announce the availability of annotation-based mounting and merging of resources in wicketstuff-merged-resources (version 3.0-SNAPSHOT for Wicket 1.4, version 2.1-SNAPSHOT for Wicket 1.3). In order to mount resources, all that’s needed is adding annotations to component classes:
@JsContribution
@CssContribution(media = "print")
@ResourceContribution(value = "accept.png", path = "/img/accept.png")
public class PanelOne extends Panel {
public PanelOne(String id) {
super(id);
// ...
}
}
Read the rest of this entry »
October 7th, 2009 by
Stefan Fußenegger |
Published in
Hibernate, Java | 2 Comments
I’ve recently discovered Stackoverflow as a nice pass-time on the one hand and as a valuable source for answers on the other hand. Normally it takes only a few minutes to get answers for most questions. However, I managed to ask a question that nobody was able to answer yet. The question was about Collations. As I’m suspecting that Collations are a Java feature that is hardly used, I kept working on the problem myself rather then just waiting for an answer on Stackoverflow.
I’ve managed to get something working right now. It’s not completely tested but it should work quite well. What I’m doing is the following: I parse the charset files of MySQL (on an Ubuntu system, you can find them in /usr/share/mysql/charsets/) and do the collation based on those files myself rather than using Java’s built-in collations.
EDIT: I’ve just created a github project that’s available as a Maven artifact from Sonatype’s OSS repository.
September 24th, 2009 by
Stefan Fußenegger |
Published in
Java, Wicket, wicketstuff-merged-resources | 6 Comments
It’s been a while since I’ve last posted here. Nevertheless, I’ve been busy working on some (yet to be released) Open Source projects. Others are already released but not documented/promoted yet. One of these unpromoted releases is the new version of wicketstuff-merged-resources. wicketstuff-merged-resources was the result of my “Wicket Interface Speed-up” series where I investigate how to reduce time spent rendering Wicket pages on the client side. wicketstuff-merged-resources has two main purposes: reducing the number of HTTP requests by merging resources (i.e. JS and CSS files) and enabling aggressive caching (up to a year) by adding a version number to mounted resources (e.g. /css/all-42.css instead of /css/all.css). While wicket has the option to add a timestamp to references (something like /css/all.css?t=20090924), adding the version to the name is preferred over adding a query string. This said, let’s see how to use wicketstuff-merged-resources’ new version. Read the rest of this entry »
April 6th, 2009 by
Stefan Fußenegger |
Published in
Maven
After running `mvn eclipse:eclipse` this morning, we got a warning from eclipse, telling us that “Build path specifies execution environment J2SE-1.5. There are no JREs in the workspace strictly compatible with this environment.” We didn’t make any changes that could cause this warning, though. We deceided to leave the problem as it was and fix it later – it’s only a warning anyway. However, when trying to start another project, I got another exception I haven’t ever received before. It was caused by mixing up wrong versions of different slf4j JARs.
Read the rest of this entry »
March 25th, 2009 by
Stefan Fußenegger |
Published in
Hibernate, Java, Wicket
Today I’ve received a mail by someone interested in a serialization mechanism I described some days ago. This mechanism was implemented to avoid dealing with detached Hibernate objects in different HTTP (i.e. Wicket) requests (it’s not restricted to Hibernate though). The idea is quite simple: detach objects if they are persistent, serialize them if they are transient, deserialize and attach for the next request – all transparently. So far, this isn’t very special and doesn’t justify such a complicated approach. However, it’s the only way of attaching and detaching object graphs that consist of transient and persistent objects I know.
Read the rest of this entry »