You have to use the Open Session in View Pattern or use data transfer objects
if you don't have the option.  Thew OpenSessionFilter must come before you
Wicket Filter declaration. Spring Hibernate sample below.  


<filter>
  <filter-name>OpenSessionFilter</filter-name>
    <filter-class>
      org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    </filter-class>
    <init-param>
      <param-name>sessionFactoryBeanName</param-name>
      <param-value>yourDatabaseSessionFactory</param-value>
    </init-param>
  </filter> 
 <filter>
    <filter-name>yourWicketApplication</filter-name>
   
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
    <init-param>
      <param-name>applicationClassName</param-name>
     
<param-value>com.your.company.YourWicketWebApplication</param-value>
    </init-param>    
  </filter>


This will solve you lazy load exception, but will also open a transaction
for every request sent to the Wicket filter.  To solve this problem,
implement 
http://www.jarvana.com/jarvana/view/org/springframework/spring/1.2.9/spring-1.2.9-javadoc.jar!/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.html
LazyConnectionDataSourceProxy , this fetches actual JDBC Connections lazily,
i.e. not until first creation of a Statement.


If this doesn't help, check out  http://databinder.net/ Databinder  as well. 
Might help



-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/After-1-minute-the-Pagemap-null-is-still-locked-by-Thread-ACTIVE-tp3047890p3051778.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to