[fleXive] Developer Blog

March 31, 2009

JSFDays2009 examples

Filed under: Miscellaneous, Using fleXive — Tags: , , , , , , , , , , — Daniel Lichtenberger @ 14:26

In this post you can find the examples from the presentation “Challenges of JSF Web Site Development” held by Yours Truly at theĀ  JSFDays2009 conference in Vienna, Austria. The slides will also be made available after the conference.

minicms

Download: minicms.zip (3.3M)
Prerequisites: Java 1.5+, Maven 2

Instructions:

  • Unpack into a local directory
  • cd minicms
  • mvn install
  • cd war
  • mvn jetty:run

Note for those that attended the session: the ResourceResolver in minicms is actually different from the one presented in the slides, it is based on temporary files that are updated by a servlet filter. The main reason is that when I wrote minicms I hadn’t yet discovered the more elegant approach using a URLStreamHandler as described in the slides. If time permits, I’ll update the minicms ResourceResolver. This would make the Filter obsolete and also make caching easier (and it’s probably faster, too).

JSF web site development examples

Download: jsfdays09-website-examples.zip (17.4M)
Prerequisites: Java 1.5+, Apache Ant

This package contains examples covering the following areas:

  • Accessibility: MyFaces Trinidad
  • Accessibility: Yahoo UI (progressive enhancement)
  • Dynamic templates (Facelets ResourceResolver)
  • RESTful URLs: PrettyFaces
  • RESTful URLs: PrettyUrlPhaseListener (Mojarra)
  • RESTful URLs: RestFaces
  • RESTful URLs: UrlRewriteFilter

Instructions:

  • Unpack into local directory
  • cd jsfDays09
  • ant

Deploy any of the generated WAR files to a web container like Tomcat.

December 4, 2008

A [fleXive] server in 150 MB RAM

Filed under: Miscellaneous, Using fleXive — Tags: , , , , , , , , , , , , — Daniel Lichtenberger @ 16:12

63.56 - 21.88 = about 40Who said JavaEE servers have to be resource hogs? It turns out that the combination of Jetty, OpenEJB and H2 mentioned in the Maven integration article is actually relatively lightweight in terms of memory usage (for a JavaEE application, that is).

While it required some fixes to get the [fleXive] content cache under control, a [fleXive] application including the backend clocks in at about 40 megabytes heap usage (Linux, 32 bit). Looking at the system resources reveals slightly less encouraging numbers, but still more than manageable even on a shared host:

25587 11335 158440 247972 30.4 4.7 /usr/lib/jvm/java-6-sun/bin/java -Xmx64M -client -classpath /usr/share/maven2/boot/classworlds.jar -Dclassworlds.conf=/usr/share/maven2/bin/m2.conf -Dmaven.home=/usr/share/maven2 org.codehaus.classworlds.Launcher “jetty:run” “-Dflexive.cache.config=cacheconfig.xml”

This means about 150 MB of memory for the web and EJB containers, the (in-process) H2 database engine, all flexive libraries (about 30 MB in compressed JAR files), and the cluster-enabled JBoss Cache.

Since Maven and Jetty already consume about 70 MB of memory right after startup (I assume most of it is on Maven), it should be possible to reduce memory usage considerably by launching Jetty outside Maven (but then I’d lose the convenient dependency injection, so I left it at that for now).

November 20, 2008

Hello world!

Filed under: Miscellaneous — Tags: , , , , — Daniel Lichtenberger @ 13:16

This is the official developer blog of framework [fleXive]. It contains updates directly from the developer, discusses current development issues and illuminates various aspects of [fleXive].

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.