-->
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.  [ 4 posts ] 
Author Message
 Post subject: Smart Client and Web Services
PostPosted: Tue May 24, 2005 5:38 pm 
Newbie

Joined: Tue May 24, 2005 5:21 pm
Posts: 2
Hi, I would appreciate a brief point in the right direction. I'm looking at a Smart Client design with a windows client using Microsofts offline block etc, connecting back to a Web Service fronting an application server. My current plan is to use nhibernate to provide persistance to the application's server domain model. I'm familiar with serialization etc and the domain model is serializable etc.

I have played a little with nhibernate and the old Northwind.

I can see how objects that have been created with in nhibernate could be serialized to the remote client.

I know how to get the objects back via the web service.

The points I still need to grasp (I'm sure they are elementary if you know where to look) are:

1) how to return objects back into the nhibernate session?
2) is this process any different for objects originated from the session verse object created out side the session by the smart client.

I would much appreciate some pointers even if it is a reference on where to read.

Rgds


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 24, 2005 6:25 pm 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
When the objects are being deserialized in the webservice (for example after editing in your Smart Client), you can add them to a new session with ISession.Update(). I believe the latest NHibernate has a ISession.SaveOrUpdateCopy() method that should make this even work better. Don't know the details about this yet.

_________________
Cuyahoga


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 24, 2005 9:10 pm 
Newbie

Joined: Tue May 24, 2005 5:21 pm
Posts: 2
Thanks for responding. I will have a play over the next few days and report back. I will naturally keep an eye on the forum for more input should it come forth.

Again,

Many thanks for responding.


Top
 Profile  
 
 Post subject: Re: Smart Client and Web Services
PostPosted: Fri May 27, 2005 9:40 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
Bryan wrote:
2) is this process any different for objects originated from the session verse object created out side the session by the smart client.


No, there is no difference at all; as long as you understand when an entity is be viewed as transient by NHibernate.

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.