Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8528519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:49:08+00:00 2026-06-11T08:49:08+00:00

I have some experience with NHibernate and I’m trying to get started with Castle

  • 0

I have some experience with NHibernate and I’m trying to get started with Castle Nhibernate Facilities OR Castle NhibernateIntegration. I’d like to know, where I can find a demonstration project of how to configure and perform transactional control (with attributes) in a service layer (business, class library project)? There is no documentation, and I have a really difficult to find some content to getting started.

I found some samples on the web but only with pieces of code and not the demonstration project… I would like to download something to study. I’m not finding to a complete solution, just the configuration and transactional control in business classes (class library).

Sorry for this kind of thread here, but I do know how to start.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:49:10+00:00Added an answer on June 11, 2026 at 8:49 am

    If you want to see an full example of Castle Windsor integrating with nHibernate then I would check out Sharp Architecture

    Sharp is an attempt at a ‘best practice’ template project and utilises a number of tech’s (Castle and nHibernate included). While some of the things it does may not be to your taste it will clearly show you one of the ways that it can all fit together.

    You may need to go hunting into the source repository on GitHub if you want to see what is going on at a low level as Sharp uses it’s own base classes in the template project that are pre-compiled (tho its still open source so you can see what is going on if you want).

    It was an invaluable help to me when I was putting my architecture together and I can honestly say that Castle and nHibernate are the way to go, so you are very much on the right track.

    EDIT FOR COMMENT 1: Perhaps I am a little confused here. According to the Castle notes

    Facilities are main way of extending the container. Using facilities
    you can integrate container with external framework, like WCF or
    NHibernate, add new capabilities to the container like event wiring,
    transaction support… or to components (synchronization, startable
    semantics…).

    To the best of my knowledge both Castle Nhibernate Facilities and Castle NhibernateIntegration are Facilities and must be based on a container.

    If you want to work without a container then you need to use some form of Singleton Factory to manage the SessionFactory. There is an example of this here.

    In terms of attributes controlling Transactions then this is how Sharp does it (see here). You may get away with reusing this code and replacing NHibernateSession with your own Singleton like theirs.

    You don’t need to implement UnitOfWork as nHibernate is effectively doing this for you. What you really need is an architecture that allows you to manage a transaction at a single point of control (Singleton) and is available in every repository.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know java well, and have some experience in EclipseLink, Hibernate, JSF, Grails and
I have some experience in ASP.Net and can work my way around it without
I don't know almost anything about this so if you have some experience let's
I have some experience in Python and Java, but I dont really know the
I have some experience writing parsers with ANTLR and I am trying (for self-education
I have some experience using parallel extensions in .Net development, but I was looking
I have some experience writing web applications in Java for class projects. My first
I have some experience with Java , C , databases , networking etc..But anything
Hi I have some experience with programming but I'm not very good with pointers.
I have experience with MySQL as a web developer. I also have some experience

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.