The sessionFactory definition looks good. It is rather similar to what we have used in for example the CRUD GUI tutorial (HelloWorld). We don't use OpenSessionInViewInterceptor. Instead we have developed our own OpenHibernateSessionInConversationListener that works in the way we like together with Spring WebFlow.
Another difference is that we have used JBoss, you use WLS. Are you using EJB local interfaces to access the services from the web tier? /Patrik termiX wrote: > > Hi Patrik, > > I have my own web client (spring mvc, jsp, jstl). i am using spring and > spring mvc (web tier) and hibernate and informix database (IBM JDBC > connector) and ehcache. > > example: > > in person.hbm.xml i have List of Address objects (relation 1:n Person <-> > PersonAddress): > > <list cascade="all" inverse="true" name="addressList"> > > > <key column="id" on-delete="cascade"/> > > <list-index column="id"/> > > <one-to-many class="com......PersonAddress"/> > </list> > > problem is, when i read addressList; > > in person bean: getAddressList() and this object is null. > > hibernate session factory settings: > > <bean id="sessionFactory" > class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> > > <property name="hibernateProperties"> > <props> > <prop > key="hibernate.dialect">org.hibernate.dialect.InformixDialect</prop> > > <prop key="hibernate.query.substitutions">true 1, false > 0</prop> > > <prop key="hibernate.show_sql">true</prop> > > <prop key="hibernate.format_sql">true</prop> > > <prop > key="hibernate.hibernate.generate_statistics">true</prop> > > <prop > key="hibernate.cache.use_structured_entries">true</prop> > > <prop > key="hibernate.cache.use_second_level_cache">false</prop> > > <prop > key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop> > > <prop key="hibernate.cache.use_query_cache">true</prop> > > <prop > key="hibernate.current_session_context_class">org.hibernate.context.ManagedSessionContext</prop> > <prop > key="hibernate.transaction.auto_close_session">false</prop> > > <prop > key="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</prop> > <prop > key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</prop> > > </props> > </property> > > is this correct ? > > and i have openSessionInViewInterceptor : > > > <bean name="openSessionInViewInterceptor" > class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor"> > <property name="sessionFactory"> > <ref bean="sessionFactory"/> > </property> > <property name="singleSession"> > <value>false</value> > </property> > </bean> > > i don`t know is this correct setting of session fatory in sculptor`s > application. > > thanks! > > Ivan > > > > Ivan > > > > > > > > > Patrik Nordwall wrote: >> >> Hi Ivan, >> >> Can you describe your application more so that I can understand in what >> kind of situation you have problems with hiberante lazy loading. >> >> Are you using the generated Sculptor CRUD GUI as client or are you using >> your own client? >> >> The way the hibernate session is managed in the CRUD GUI is described >> here: >> http://fornax-platform.org/cp/display/fornax/5.+CRUD+GUI+Tutorial+%28CSC%29#5.CRUDGUITutorial%28CSC%29-HibernateSession >> >> /Patrik >> >> termiX wrote: >>> >>> Hi, >>> >>> i have a question about hibernate lazy-loading in application generated >>> by sculptor. i can`t turn-off hibernate lazy loading, but I have this >>> error message, because there si no session from sessionfactory: No >>> session currently bound to execution context.... . please, what is the >>> best solution to integrate lazy-loading to application generated by >>> sculptor. please, can someone post example source code. thanks! >>> >>> Ivan >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/sculptor-and-hibernate-lazy-loading-tp17702609s17564p17707506.html Sent from the Fornax-Platform mailing list archive at Nabble.com. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Fornax-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fornax-developer
