Giter Site home page Giter Site logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Sorry damn, wasn't meant to record this as a defect! Apologises

Original comment by [email protected] on 11 Sep 2008 at 5:38

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Here is a modified version of S#arp that has support for multiple session 
factories.
It's not the most elegant code or solution, but I was in a bit of a pinch and 
seems
to work fine. This branch is no longer associated with the svn repos, so I 
couldn't
just send a patch (instead i sent the entire solution). For that matter, it's
actually based on the previous version of Sharp; so I'm only providing this for 
the
rest of the group and Billy to get some ideas. 

Essentially, I have extended the NHibernateSession with a couple of 
Dictionaries for
storing multiple SessionFactories and SessionStores. I also included a class
attribute called SessionFactoryAttribute that is used to decorate your DAOs 
with the
appropriate datastore key (In my case this is Oracle and SQLServer). The 
GenericDao
was then updated to read this attribute. If it is not found, it defaults to the
original NHibernate.Session.Current singleton. 

Your nhib config needs to change a bit too. You need to use an external config 
file
for each db. In the config you must specifically list the hbms that are mapped 
to
that particular config as opposed to mapping an entire assembly.

I hope this helps anyone out there that needs multiple DB support before it 
makes it
into the architecture officially.

Original comment by [email protected] on 10 Oct 2008 at 6:38

Attachments:

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
IS there any progress in this aspect?
Accessing multiple databases is very important (and common) in real projects..

Original comment by [email protected] on 4 Mar 2009 at 6:29

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
This will be in the 1.0 final release, but will not make it into the RC 2 
release, 
due for this weekend.  (Another reference I found concerning this was at 
http://tiredblogger.wordpress.com/2009/03/06/using-multiple-nhibernate-session-
factories/ )

Original comment by [email protected] on 12 Mar 2009 at 7:29

  • Changed state: Accepted

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi,

I'm currently evaluating Sharp Archicture (it's awesome btw) but have also hit 
the
single db connection wall very quickly - is there any update on when this 
feature is
going to be available (in the main trunk or as a patch to the RC2)?

Many thanks,

Howard

Original comment by [email protected] on 1 Apr 2009 at 8:57

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Hi Howard, current priorities are as follows:

* Add WCF support and example of using it; the WCF support is ready but not 
committed
- finishing up the example.
* Add example of using a service.
* Provide support for multiple DBs.

I should be able to get to multiple DB support by mid April or sooner.

Original comment by [email protected] on 2 Apr 2009 at 4:45

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024

Original comment by [email protected] on 8 Apr 2009 at 10:35

  • Changed state: Started

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
Fixed on trunk...see /docs for details within the Q&A section.  Also see
/VersionHistory.txt for a detailed listing of related changes.

Original comment by [email protected] on 2 May 2009 at 7:35

  • Changed state: Fixed

from sharp-architecture.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
What makes WCF not support multiple databases in the current release, btw?

Original comment by alen.siljak on 25 Nov 2010 at 1:01

from sharp-architecture.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.