I've seen a couple of comments online to the effect that Seam is some kind of JBoss-only thing. This is not the case, Seam doesn't have any hard dependencies to anything other than the standard Java EE 5 APIs.
Recently, Simon Brown put together a set of
for a very simple blogger application that could be used to compare Java web frameworks. I have
my reservations about the actual requirememts he put together (in particular, there is no
form submission!) but since some other
have bitten, I've gone ahead and ported the example to Seam. I want to put a massive caveat around
this post: Seam is absolutely not designed for applications like blogs or web forums; these kind of
problems are very easy to solve using something like PHP or Ruby on Rails and there is no really
good reason to use Java for a problem like this (unless Java is all you know). We have a set
of requirements here with /no conversations/ and /no business processes/, so all the sophisticated
state management machinery of Seam is redundant. Nevertheless, frameworks need to make simple things
easy, and you'll see how little Java code we need to write to solve this simple problem using Seam.
People using the Criteria API have either transparently or knowingly
used a ResultTransformer .
A ResultTransformer is a nice and simple interface that allows you to
transform any Criteria result element. E.g. you can make any Criteria
result be returned as a java.util.Map or as a non-entity Bean.
Moving Hibernate source code to our new Subversion home is done. Both developer
and annonymous access have been set up. Currently, web access is only available
via the Apache module which is less than ideal. We have been told that either Fisheye
or ViewCVS access over the Subversion repsoitory will be setup soon.
A bug report was recently
opened in Hibernate's JIRA stating that Hibernate incorrectly handles deadlock scenarios.
The basis for the report was an example in the /Pro Hibernate 3/ book (Chapter 9). For
those perhaps not familiar with the term deadlock, the basic gist is that two processes
each hold resource locks that the other needs to complete processing. While this phenomena
is not restricted to databases, in database terms the idea is that the first process (P1)
holds a write lock on a given row (R1) while the second process (P2) holds a write lock on
another row (R2). Now, to complete its processing P1 needs to
acquire a write lock on R2, but cannot do so because P2 already holds its write lock.
Conversely, P2 needs to acquire a write lock on R1 in order to complete its processing,
but cannot because P1 already holds its write lock. So neither P1 nor P2 can complete
its processing because each is indefinitely waiting on the other to release the needed
lock, which neither can do until its processing is complete. The two processes are said
to be deadlocked in this situation.