-->
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.  [ 2 posts ] 
Author Message
 Post subject: What are the best pratice for NH and WebService
PostPosted: Sat Jan 05, 2008 12:32 am 
Newbie

Joined: Thu Jan 19, 2006 2:36 pm
Posts: 3
We want to use NHibernate and webservice in .net 2.0
We have been reading on some post that there maybe problems with 1 to many relationships when sending graphobjects thru the wire.

But these where post from 2005 and 2006.

Some post are saying to use IList instead of generic IList,
some other post say to use RPC declaration
some say to put XMlIgnore

We would like to know what exactly is the best pratice for sending and receviing (From client) NH objects thru the webservice.

How do we deal with lazy load

We are also thinking of using spring.net on the webservice

Any comments would be appriciated

Thx


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 07, 2008 10:19 am 
Beginner
Beginner

Joined: Wed Jul 19, 2006 8:24 am
Posts: 35
First off you can't serialize an interface so you'll need to remove your collections or use xmlignore. Proxies and lazy loading are issues too. The way I've dealt with this is to create a light weight data access layer that doesn't have any collections defined. This light weight layer is specifically created to get around serialization issues with NHibernate. Since there aren't any collections defined there are no serialization issues with interfaces and proxies. The downside is there's no lazy loading either.

RPC works well and doesn't have the limitations of web services. If you use binary transfers interfaces, proxies and lazy loading aren't issues. Granted lazy loading works by passing object references to the RPC server. There's a good example RPC app posted somewhere in the forums. try searching for it.

Good Luck


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