-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Design question -long transaction
PostPosted: Fri May 04, 2007 12:12 pm 
Regular
Regular

Joined: Wed May 02, 2007 2:42 pm
Posts: 101
Hey,

i know that this is not the best place , but i am using Jboss with hibernate and this design issue is relevant to a lot of technology, also this forum have the best writers.


My client is a swt client that runs on machine A and the server is a J2ee server that runs on machine B.
We use facade design pattern and the API are exposed to the client as a stateless session bean.

The user does some configuration changes.
for change (like add new components ... ) we need to go to the server in order to create or edit the component (the client doesn't have the knowledge how to do this)
in the end of the configuration process the user may press on the persist button and all the changes need to be persist.

The concept that I need to implement is similar to the concept of editing word document all the changes are saved in temporal document until the user click on save or close the document.

As I see it I need long transaction here, but stateless doesn't support in long transaction and there are a lot of problems (time out and etc) in a long transaction.
I have to save those "temporal configurations" to the DB, because I need to get id for these configurations and other operations.

Does any one have an idea how to implement it?

It is important to remember that if the user edit an existing component other user don't see those changes unless he press on the save button. This scenario can lead to conflict.

Thank you.
Any idea will be welcomed.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 2:33 pm 
Regular
Regular

Joined: Wed Nov 17, 2004 11:49 am
Posts: 65
Location: Pittsburgh
I am not sure I see the problem. It doesn't matter where the component is instantiated, if it has to be instantiated in some server-side factory method, that is OK. There is nothing requiring you to actually persist the entity at that point. You can return a transient entity as well as a detached entity to the client. The client can continue to define the component and when they are ready to persist, you simply save the entity on the server-side.


Top
 Profile  
 
 Post subject: I need a PK in order to have the ability to control
PostPosted: Sat May 05, 2007 2:29 pm 
Regular
Regular

Joined: Wed May 02, 2007 2:42 pm
Posts: 101
on the realation between objects.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.