-->
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.  [ 5 posts ] 
Author Message
 Post subject: The easiest way to share the business layer ?
PostPosted: Mon Jun 26, 2006 4:47 am 
Newbie

Joined: Tue May 31, 2005 12:44 pm
Posts: 11
Hello folks, i'm quite new to NHibernate and tried to find a hint to my problem in the faq and the forum but did not find anything.

I have a normal WindowsApp that -till now- uses the DataLayer with Castle and NHibernate as a DLL which is fine for single user access, but the next goal would be to configure and use it as a real multiuser service.
Unfortunately I have no idea how to implement that.

What would be the easiest way to gain a real IoC-Container and share it by mutliple clients? Do i have to use an Applicationserver? Is there a Walkthrough? Any hints appreciated.
Thanx for reading.


Top
 Profile  
 
 Post subject: Re: The easiest way to share the business layer ?
PostPosted: Mon Jun 26, 2006 9:29 am 
Newbie

Joined: Wed Jun 21, 2006 4:48 am
Posts: 2
JoeGranada wrote:
Hello folks, i'm quite new to NHibernate and tried to find a hint to my problem in the faq and the forum but did not find anything.

I have a normal WindowsApp that -till now- uses the DataLayer with Castle and NHibernate as a DLL which is fine for single user access, but the next goal would be to configure and use it as a real multiuser service.
Unfortunately I have no idea how to implement that.

What would be the easiest way to gain a real IoC-Container and share it by mutliple clients? Do i have to use an Applicationserver? Is there a Walkthrough? Any hints appreciated.
Thanx for reading.


Hi,

I am not sure that the following is the best way, however I am using it in my situation ([NAME] are virtual/physical project assemblies) :

On the main Server:
[ DAL (NHibernate Classes) ] <-> [ BLL (Typed Actions - Save, Get, Delete for entities) ] <-> [ Facade (.NET Remoting Server/Web Service - exposes BLL Factory) ]

On other Servers:
[ SITE (User Interface - .NET Remoting Client/Soap Calls) ]

This assures that you have only one persistance layer and multiple clients.


Top
 Profile  
 
 Post subject: HowTo: DAL + BLL creation on VS2005???
PostPosted: Mon Jun 26, 2006 12:19 pm 
Newbie

Joined: Tue May 31, 2005 12:44 pm
Posts: 11
Quote:
On the main Server:
[ DAL (NHibernate Classes) ] <-> [ BLL (Typed Actions - Save, Get, Delete for entities) ] <-> [ Facade (.NET Remoting Server/Web Service - exposes BLL Factory) ]

On other Servers:
[ SITE (User Interface - .NET Remoting Client/Soap Calls) ]

This assures that you have only one persistance layer and multiple clients


OK, thank you but i have no idea how to do this. can you give a Link or something where i can see how to implement that. Maybe any of the "look were clicking some code"-Examples.

Or tell me. Is it possible to run a WindsorContainer for each Application just telling Castle that the DB takes care of synchronization? Maybe by setting the Transactions-Attributes or something. That would be the easier way to get rid of the damn problem without blasting my hed with all that .net remoting stuff.
thx, Joe


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 26, 2006 9:49 pm 
Regular
Regular

Joined: Wed Jun 21, 2006 3:13 pm
Posts: 110
Joe,

If I understand correctly, your goal is to have a single application server where all of your business logic and data access will run. Each client would then hit this application server. Is this right?

If so, may I ask, what is your actual end goal? It's been my experience that remoting is a fine option for some situations, but just deploying the code to every client would be much easier. The database will still be a shared back-end and you can easily account for versioning and locking in your application (with NHibernate's help, of course!)... look at the Version and Timestamp attributes in the mapping for two possible options to help with obtimistic lock resolution.

On the other hand, if you're looking to seamlessly expose your services to a bunch of clients, then you might want to consider something like web services. Again, it really depends on what your end goals are.

BeeGone has a great suggest for how to consolidate things. Just learn more about .Net Remoting and Web Services and you'll find plenty of examples... The easiest way to handle either scenario is with the help of IIS and that'll allow you to continue to use Winsor.

Ben


Top
 Profile  
 
 Post subject: Alright thank you.
PostPosted: Tue Jun 27, 2006 5:03 am 
Newbie

Joined: Tue May 31, 2005 12:44 pm
Posts: 11
First of all Thank you for your reply.

benhyrman wrote:
Joe,
If I understand correctly, your goal is to have a single application server where all of your business logic and data access will run. Each client would then hit this application server. Is this right?

Yes, this was my first idea, but if it is possible to do it in an other way with optimistic locking i think regarding my poor knowledge of .net - remoting i would prefer this last solution.

benhyrman wrote:
If so, may I ask, what is your actual end goal? It's been my experience that remoting is a fine option for some situations, but just deploying the code to every client would be much easier. The database will still be a shared back-end and you can easily account for versioning and locking in your application (with NHibernate's help, of course!)... look at the Version and Timestamp attributes in the mapping for two possible options to help with obtimistic lock resolution.

This seems to be exactly what i'm looking for. As i mentioned this is the actual. Thank you for this Tip.

benhyrman wrote:
BeeGone has a great suggest for how to consolidate things. Just learn more about .Net Remoting and Web Services and you'll find plenty of examples... The easiest way to handle either scenario is with the help of IIS and that'll allow you to continue to use Winsor.

This would be a nice idea but for now the other strategy seems to be faster. I already learned a lot on remoting yesterday and it seems quite capable, but this would be a task some quiet and lazy winter day.
Alright. In the end, BeeGone and benhyrman, i have to say thank you to both of you.
JoeG.


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