In most cases, its not recommended to create data service objects, like
ResultSets and RowSets, directly in your backing beans. For small apps it works well. Whereas using a separate class, which is an implementation of the Data Table Gateway
pattern [Fowler, Enterprise Pattern Architecture], is more flexible because you can unit-test it and reuse it within different backing beans.
Thanks.