1. The reason to use the EntityPropertyPersistenceStrategy is so that you avoid trying to access "detached" objects. The objects themselves are not stored in the session (if they're actually persistent), their identities are (classname and id value). Then, when your request comes in, the identities are resolved back into the real object in the current session.
2. The same sort of thing is true for the "squeezer." The squeezer doesn't write the entire object out to the client, it only writes its identity. The main reason for this (besides detached objects) is that you want to avoid writing the entire object graph out to the client. Imagine a highly connected domain model where each object is connected to other objects and so on and so on (and they tell two friends, and so on, and so on). Anyway, when you go to serialize that, all of the references to other objects will be serialized to and you could end up with the entire database (worst case of course) being serialized out to the client. YUCK! 3. As far as the OpenSessionInViewFilter, it really shouldn't be needed with HiveUtils. The session is supposed to be opened "as needed", but in my experience, it wasn't. -----Original Message----- From: Andreas Bulling [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Bulling Sent: Wednesday, March 01, 2006 11:23 AM To: [email protected] Subject: Re: Hivetranse/Hibernate/Tapestry troubles On 01. Mär 2006 - 08:53:51, James Carman wrote: | Tapestry doesn't require HiveMindFilter. It has its own way of dealing with | the registry. The ehcache.xml and log4j.properties files should be in | /WEB-INF/classes. It's okay to have your hivemodule.xml file in /WEB-INF | also, since that's where Tapestry looks for it by default. Any | hivemodule.xml files residing inside jar files in your /WEB-INF/lib | directory will be picked up automatically. Also, | /WEB-INF/classes/WEB-INF/hivemodule.xml will be picked up if you provide one | (most just use the one directly in WEB-INF). OK, I changed this according to your explanations and it seems to work now (at least I can see some Hibernate outputs in catalina.out). BTW: Do you know if it's normal that instead of the actual values for the database fields the queries only show ? instead? | Did you try my example of using HiveUtils (hivetranse), called Tapernate? Yes, I even think I must have been the first one having downloaded your example after the big problems I had before ;) But to be honest I didn't use it because I have no clue - what this EntityPropertyPersistenceStrategy is good for/if I need it - the same with EntitySqueezer - why there is a/if I need the OpenSessionInViewFilter In the meanwhile I got _something_ to work (that means I can make database queries without any java exceptions so far). But I don't know if all these demarcations, interceptors actually work :| Sincerly, Andreas --------------------------------------------------------------------- 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]
