Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
orbital76
Post subject: MyBlog Struts/Hibernate CRUD Example Project  PostPosted: Mar 20, 2008 - 07:32 PM



Joined: Mar 20, 2008
Posts: 4

something strange happens when i try this example, sometimes when i point the browser
to http://localhost:8080/MyBlogStrutsHibernateExample/postProcess.do?dispatch=getPosts the results in the table don't match the data stored in the db.
when it happen i take a look at hibernate logs ,and it seems that after a call to getPosts the hibernate query return old values.
sorry for my english
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: MyBlog Struts/Hibernate CRUD Example Project  PostPosted: Mar 20, 2008 - 09:19 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5662

Are you manually modifying the URL ? Can you help me reproduce this condition at my end where the old values are returned. What steps should I follow when I run the example ?

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
orbital76
Post subject:   PostPosted: Mar 20, 2008 - 10:38 PM



Joined: Mar 20, 2008
Posts: 4

take a look at this video demo
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject:   PostPosted: Mar 21, 2008 - 04:48 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5662

The file that you have uploaded seems to be corrupted. I got a message saying the file is damaged. You will have to upload it again.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
orbital76
Post subject:   PostPosted: Mar 21, 2008 - 10:29 PM



Joined: Mar 20, 2008
Posts: 4

please try to download the clip from here http://www.giulioscuro.net/demo.avi
i really don't understand why sometimes the action getPosts return a list of objects
that don't match the records in the db. For example i add a post then i modify its title, then i open another browser window and point to
localhost:8080/MyBlogStrutsHibernateExample , i follow the link 'click here' in the index page
and i see the unmodified version of the post in the table.
that's what happens sometimes not always.
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject:   PostPosted: Mar 25, 2008 - 07:28 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5662

Can you try working with the internal web browser. Does it work without issues ?

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
orbital76
Post subject:   PostPosted: Mar 25, 2008 - 09:45 PM



Joined: Mar 20, 2008
Posts: 4

same issues in internal browser, mozilla and ie.
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject:   PostPosted: Mar 27, 2008 - 10:43 AM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 5662

If your not using transactions to commit those results to the DB, what's happening is that they are staying cached in the session (which will *eventually* flush the change, but not immediately) and when you try with another browser window, it's re pulling from the DB and getting the old values.

You will have to use transaction management.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits