I'm looking for some guidelines/best practices for implementing a keyword search for products in J2EE. I've referred to the Java Pet Store example, but unfortunately, the search they implemented is not designed according to the J2EE Blueprints (they even admit it in the comments).
1. Implement the search as an entity bean with a "findByKeywordSearch()" finder? (I've done this and it works, but I'm not convinced that it's the best way).
2. Implement the search as a stateless session bean returning value objects representing the results of the search?
3. Implement the search the way that the JPS did and just settle with it being out of whack with the Blueprints?
4. Some other way?
The points go to the person who provides the best solution with the best justification for their solution. Special consideration given to solutions that come with references to articles and/or books that back up the solution.