MG>quick comment (others feel free to jump in) > Subject: data is not getting refreshed > From: srinivas...@sify.com > To: user@struts.apache.org > > Hi all > I have situation > > we have two modules which are in production > > one is developed in old servlets and jsp > > and another is in struts2 and hibernate
MG>hibernate has rules regarding lazy-init=true for example <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" > <hibernate-mapping package="org.hibernate.test.cascade"> <class name="JobBatch" table="T_JOB_BATCH"> <id name="id" column="BATCH_ID"> <generator class="native"/> </id> <property name="batchDate" type="timestamp" column="BATCH_DATE" not-null="true"/> <set name="jobs" inverse="true" fetch="select" lazy="true" cascade="all, refresh"> <key column="BATCH_ID"/> <one-to-many class="Job"/> </set> </class> </hibernate-mapping> where: cascade all option means all actions are cascaded from the parent to the child. All is the union of save-update and delete. It has the benefits of both (save and delete actions are propagated). refresh is telling Hibernate to go back to the database and refresh the object that it has in its Session, which could be stale!..(is is up to you to make sure your Session objects are uptodate) concerning lazy associations (which you are defining with lazy="true") For lazy associations to work, the class containing the associations (in this case, the children classes) must either be a.) represented and retrieved via an interface or b.) not declared as final. CGLIB must be able to instantiate these non-final child classes on the fly.. a very good explanation on O/R mapping is available at http://www.javalobby.org/java/forums/t20533.html Does this conform to your hibernate configurations? MG> > we are using tomcat > > > > in second module we are facing weird problem RE>what is this ? > > > when we access our site through url , > > data is not getting updated > > and same when we try to access through ip address data is getting updated > > > > and we are not facing this problem in our first module > > > > only big difference is when we access though our url ,its passing through > F5, > F5 is doing nothing but just a load blancing , > > or is their any problem with struts UI tags MG>Struts (and JSTL) tags display data from Action or backing bean via JSTL or OGNL .. MG>what happens when you display the data directly in session e.g. MG> <s:property value="%{#session.mySessionAttribute}" />MG>? > regards > srini. MG>regards MG>MG _________________________________________________________________ Windows Live™ Hotmail®:…more than just e-mail. http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009