[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: albelsky  XML
Profile for albelsky -> Messages posted by albelsky [3]
Author Message
klalithr, thanks for responding. We'd like to keep the lazy loading approach, if possible. We have a complex and extensive domain object tree, so eager loading / preloading would mean a serious performance hit. Our codebase is quite large as well, so we'd like to keep the required amount of changes to the minimum.
We'll have to go with Tomcat clustering, as it works fine out of the box, and doesn't cause the LazyInitializationException issue...
Hello Terracotta Gurus,

Our app stores detached Hibernate entities (some of them use lazy loading) as HTTP session attributes, and uses the OSIV (Open Session in View) pattern. When using Tomcat clustering, lazy loading works correctly with hydrated entities after session failover.

When I disable Tomcat clustering and try implementing Terracotta Web Sessions (open source version) following the Express installation guide, session replication seems to work, but lazy loading operations start throwing:
org.hibernate.LazyInitializationException: could not initialize proxy - no Session 

If I comment out the TerracottaTomcat70xSessionValve in Context.xml, and enable Tomcat clustering, everything works as expected again after a forced failover.

Does the Web Sessions product support this use case? Or would we have to use eager loading if we wanted to try Web Sessions?
I'm sorry, but I couldn't find the answers in the Terracotta documentation or on the web.

tc-config.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
 <tc:tc-config xmlns:tc="http://www.terracotta.org/config"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-6.xsd">
  <servers secure="false" xmlns:tc="http://www.terracotta.org/config" xmlns:con="http://www.terracotta.org/config" xmlns="">
   <server bind="0.0.0.0" host="127.0.0.1" name="node-1">
    <data>C:/libs/terracotta/server/node1/data</data>
    <logs>C:/libs/terracotta/server/node1/logs</logs>
    <statistics>C:/libs/terracotta/server/statistics</statistics>
    <dso-port bind="0.0.0.0">9510</dso-port>
    <jmx-port bind="0.0.0.0">9520</jmx-port>
    <l2-group-port bind="0.0.0.0">9530</l2-group-port>
    <data-backup>C:/libs/terracotta/server/node1/data-backup</data-backup>
    <index>C:/libs/terracotta/server/node1/index</index>
    <dso>
     <client-reconnect-window>120</client-reconnect-window>
     <persistence>
      <mode>permanent-store</mode>
     </persistence>
     <garbage-collection>
      <enabled>true</enabled>
      <verbose>false</verbose>
      <interval>3600</interval>
     </garbage-collection>
    </dso>
   </server>
   <server bind="0.0.0.0" host="127.0.0.1" name="node-2">
    <data>C:/libs/terracotta/server/node2/data</data>
    <logs>C:/libs/terracotta/server/node2/logs</logs>
    <statistics>C:/libs/terracotta/server/statistics</statistics>
    <dso-port bind="0.0.0.0">9511</dso-port>
    <jmx-port bind="0.0.0.0">9521</jmx-port>
    <l2-group-port bind="0.0.0.0">9531</l2-group-port>
    <data-backup>C:/libs/terracotta/server/node2/data-backup</data-backup>
    <index>C:/libs/terracotta/server/node2/index</index>
    <dso>
     <client-reconnect-window>120</client-reconnect-window>
     <persistence>
      <mode>permanent-store</mode>
     </persistence>
     <garbage-collection>
      <enabled>true</enabled>
      <verbose>false</verbose>
      <interval>3600</interval>
     </garbage-collection>
    </dso>
   </server>
   <mirror-groups>
    <mirror-group>
     <members>
      <member>node-1</member>
      <member>node-2</member>
     </members>
    </mirror-group>
   </mirror-groups>
   <ha>
    <mode>networked-active-passive</mode>
    <networked-active-passive>
     <election-time>5</election-time>
    </networked-active-passive>
   </ha>
  </servers>
  <system xmlns:tc="http://www.terracotta.org/config" xmlns:con="http://www.terracotta.org/config" xmlns="">
   <configuration-model>production</configuration-model>
  </system>
  
  <clients xmlns:tc="http://www.terracotta.org/config" xmlns:con="http://www.terracotta.org/config" xmlns="">
   <logs>C:/libs/terracotta/client/logs</logs>
  </clients>
   
 </tc:tc-config>

Environment:
Terracotta Server 3.7.3 (also tried 3.7.4) - ehCache 2.6.3, Web Sessions
Hibernate 3.2.7
Spring 2.5.5
Spring TC Server (Tomcat 7.0.25)

Thanks so much for your time.
I'm also interested in trying the custom/DSO installation due to a very large number of non-Serializable classes. Following the DSO intallation guide step-by-step (http://terracotta.org/documentation/more/terracotta-dso/dso-install). I'm getting the "No module found" exceptions for all 3 of the modules below when I run the "tim-get.bat install-for tc-config.xml" command:
Code:
   
 <module name="tim-ehcache-1.7" />
 <module name="tim-quartz-1.5.1" />
 <module name="tim-tomcat-6.0"/>
 

When I run "tim-get.bat list", I don't see a single "tim-tomcat" item in the list of modules. I see a several ehcache and quartz tims, but they don't match the documentation and our versions.

Does this mean that you discourage the use of the DSO approach to the point that TIMs are not available? (which would make the DSO installation, pretty much, deprecated)
 
Profile for albelsky -> Messages posted by albelsky [3]
Go to:   
Powered by JForum 2.1.7 © JForum Team