For the statistics part of an application there are several queries that often change and are also rather long. Both IMHO arguments to remove the queries from the source code and put them somewhere where they can be easily edited in an eye friendly format and also copy / pasted from and to a QL editor. This disqualifies named-queries from JPA.
The environment is a Seam application, but this question might be interesting for J2EE in general.
From my view there are three solutions: For relative static queries I can use a Seam managed query home, but it handling of parametrized queries is getting ugly when your parameters are not in any scope and just passed as method parameters.
My current solution is to put all queries into a Seam messages file and access them through the messages array.
A third way would be to create your own Seam component that reads the queries from somewhere and provides them.
How do you managed such a scenario? Did I miss some obvious solution?