This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts serialisation bedween the action

 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey
I used Struts for some projects and it is great, but one weak point I do not like is the serialisation bedween the action. If i forward one request to several action then every time the form has to be serialised and deserialised this can be very time consuming.
Did I miss something to go around this?
Thanks
Andy
 
Tom Stevns
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Andy Dejung !
Probably this would help you ?
[PS]www.cs.auckland.ac.nz/~john-g/papers/echi98.ps.gz
If not, the view components are serialised and sent ... The components are then deserialised,
given new ... collaboratively editing, resulting in fast editing response ...
Good luck !
 
Ted Husted
Author
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts is primarily designed as a J2SE framework. Generally, the traffic between the browser and the action would not need to be serialized (in the formal sense of the word). If you are making Remote Method Invocations to another server to access persistant data, that can be done from the Action *after* all the ActionForm data has been obtained and validated.
HTH, Ted.
 
Andy Dejung
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answers.
But as I see from your answers I maybe did not express my problem clearly. So I will try it again this time on a example.
Lets say I have a busniess case which should get some person data form a host system and from a other DB.
In Struts I split the case in two tasks (Action). The first Action (HostAction) will perform the host lookup and getting the data from the host. The secound Action (DBAction)will perform the DB lookup and get its data form the DB.
In this scenario I get in the HostAciton the ID of the person out of the Form. Make the lookup and get the data from the host. Then I store the data in the Form and call the next Action (DBAction). In the DBAction I get again the ID and get out of the DB the data. I write this data also into the Form.
Now I call the JSP and display all data.

Now my problem:
The data from the Host which are passed first to the DBAction and then to the JSP, are serialised twice, once for the request of the DBAction and once again for the JSP.
My question is now: Is there a way to call another Action (DBAction) without serilisation bedween. As the Action run in the same Servletcontainer and are called from the same Servlet.
I hope I could now express my problem
Thanks again for any comment
Andy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic