Can you turn up logging and see what exactly tapernate is doing? It will print out a message when it closes the session (as will hibernate itself). You're accessing this "getter" during page rendering? The session should be open.
On 5/18/06, Chris Chiappone <[EMAIL PROTECTED]> wrote:
Here is a code snippet of where the lazy initialization exception occurs which is in a component of mine: public Collection getVisibleAssessments() { Collection visibleDocs = new ArrayList(); Iterator it = getAssessments().iterator(); while (it.hasNext()) { AssessInfo info = (AssessInfo) it.next(); if (info.documentVisibiltyCheck (getPageVisit().getCurrentUser())) { visibleDocs.add(info); } } return visibleDocs; } And the exception: 16:36:59,506 ERROR [LazyInitializationException] failed to lazily initialize a collection of role: com.app.domain.company.Company.assessments, no session or session was closed org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.app.domain.company.Company.assessments, no session or session was closed at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException (AbstractPersistentCollection.java:358) at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected (AbstractPersistentCollection.java:350) at org.hibernate.collection.AbstractPersistentCollection.initialize( AbstractPersistentCollection.java:343) at org.hibernate.collection.AbstractPersistentCollection.read( AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentSet.iterator( PersistentSet.java:138) at com.app.view.components.AssessmentInfoTable.getVisibleAssessments (AssessmentInfoTable.java:55) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) On 5/18/06, Chris Chiappone <[EMAIL PROTECTED]> wrote: > > For the most part Tapernate has improved the performance on my > application. Although I continue to get Lazy initilialization exceptions. > I'm not quite sure whats the correct process to get arround this? Any one > have any suggestions? > > Thanks > > On 5/16/06, James Carman < [EMAIL PROTECTED]> wrote: > > > Correct. For your other classes, if you wish them to have DAOs injected > > into them, then you'll have to have HiveMind manage them. > > > > -----Original Message----- > > From: Andreas Bulling [mailto: [EMAIL PROTECTED] On Behalf Of > > Andreas Bulling > > Sent: Tuesday, May 16, 2006 2:19 PM > > To: Tapestry users > > Subject: Re: Tapernate configuration questions > > > > On 16. Mai 2006 - 13:54:01, Chris Chiappone wrote: > > | Ok, it appears most of my migration to Tapernate seems to be working > > well. > > | My question is somewhat unrealated to tapernate but maybe someone > > could > > | guide me in the right direction. For pages and components that can > > inject > > | the Dao seem to work like a charm. The problem is I have a handfull > > of > > | classes that are not pages or components that instantiate the Dao in > > them. > > | Since these are now configured via tapernate the session is null and > > cannot > > | be aquired by HibernateDaoSupport. So my question is it possible to > > inject > > | the dao's into other objects? > > > > I think you have to make HiveMind services out of them - please > > correct me if I'm wrong ;) > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > ~chris > -- ~chris