Design issues with Hibernate/Table/Tapestry

"Luke Galea" <[email protected]>
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <[email protected]>
Hello all,
I am currently working out some kinks in my Hibernate Table Model for
the Table component. I have a few issues... namely that my data source
provider (in this case a hibernate session provider) needs access to
either the request or the application specification in order to get
access to the running session. The problem is that the only way for me
to accomplish this that I can think of is to pass the request cycle to
the table model, then to the provider, etc.. which means I have to
modify/subclass the contrib table code and break the elegance of the
model. 
 
Alternatively, I could create a session for each use needed by the table
model and then close it... (using a singleton session factory).. but
that doesn't seem as elegant as pulling it from an application extension
or from the request cycle and using the same session throughout a
request.
 
Does anyone have any ideas? Tackled something similar?
 
Luke Galea 
Software Development
BlueCat <http://www.bluecatnetworks.com/>  Networks
905-762-5225
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.