Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: spring.net + nhibernate integration

  1. #1
    Join Date
    Oct 2005
    Posts
    1

    Default spring.net + nhibernate integration

    I used the spring+hibernate , it reduced the many code , the app extremely is also clear.
    Now nhibernate has release version 1.0 RC3, so I want to try to use spring.net + nhibernate, consulted the spring.net reference documents, the documents also mentions conformity nhibernate, but the consult code, had not discovered the correlation conformity the example.

    I want to know Which version spring.net will integrate nhibernate, version 1.1? and about time plan?

  2. #2
    Join Date
    Sep 2004
    Location
    Leeds, UK
    Posts
    166

    Default

    Hi

    Data access and ASP.NET web integration are the focus for the 1.1 release of Spring.NET, planned for release at the start of the new year (~January).

    On the data side, ADO.NET and iBatis.NET will definitely be supported. So far, no one has expressed an interest in doing any integration with NHibernate... you could always create a JIRA issue and garner some votes for Spring.NET offering integration with NHibernate if you'd like.

    Ciao
    Rick
    Senior Consultant, Interface21 - Spring Services from the Source

    The Spring Experience - The Premier Spring Event of 2006. December 7-10, 2006, Hollywood, Florida

  3. #3
    Join Date
    Nov 2005
    Location
    WI
    Posts
    10

    Default

    Quote Originally Posted by Rick Evans
    Hi

    Data access and ASP.NET web integration are the focus for the 1.1 release of Spring.NET, planned for release at the start of the new year (~January).

    On the data side, ADO.NET and iBatis.NET will definitely be supported. So far, no one has expressed an interest in doing any integration with NHibernate... you could always create a JIRA issue and garner some votes for Spring.NET offering integration with NHibernate if you'd like.

    Ciao
    Rick
    Rick,
    I've seen a few requests for nHibernate integration in Spring.net and I think it would be wise to have that support in Spring.net because a person coming from Spring Java would probably be very comfortable with the idea of using that combination. (IE it would ease the transistion).
    I was JUST introduced to Java Spring (although I had heard and read about it for a while) on my most recent project. Although I don't think that Spring.net should be an EXACT port of Java Spring, I think it would be great if someone could port their skills in Java Spring/Hibernate over to Spring.net/nHibernate with nominal effort.
    With that in mind, if no one else has taken the reigns for Spring.net-nHibernate integration, I would like to take on the task, seeing that I will be needing it myself. I'll start it as a contrib project on my own server and if the team deems me worthy, will make it part of Spring.net proper. Development starts, this evening for me.

    Michael

  4. #4
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi Michael,

    Glad to hear it! I had an email a while ago from someone who was critical of the Spring.Java approach to hibernate integration in the context of how it translated to .NET. I'll forward it to you, the conversation with that fellow has died off unfortunately.

    Cheers,
    Mark

  5. #5
    Join Date
    Sep 2004
    Location
    Leeds, UK
    Posts
    166

    Default

    Hi

    With that in mind, if no one else has taken the reigns for Spring.net-nHibernate integration, I would like to take on the task, seeing that I will be needing it myself. I'll start it as a contrib project on my own server and if the team deems me worthy, will make it part of Spring.net proper. Development starts, this evening for me.
    Nice one... its good to see someone picking up the ball and running with it.

    One area that you and I (and gee everyone I guess) will probably want to get together on is transation management. I daresay its a little ways down the road, but there is currently little to no transaction management. All of the core interfaces from Spring Java are there (in the Spring.Data project in the sandbox, but there are no implementations of any transaction management interfaces currently in CVS (e.g. NHibernatePlatformTransactionManager, etc).

    I noticed as I was playing (and I mean playing in the kiddie sense of the word) with NHibernate on Sunday that they have implemented their own connection factory (read javax.sql.DataSource)... unsurprisingly, the iBatis.NET team also have their own connection factory interface (I forget what its called straight off the top of my head). I was speaking with Erik Doernenburg (of ThoughtWorks and NEO fame) a few weeks back (concerning Spring.NET / NEO integration) and we talked about javax.sql.DataSource and what a great interface it is (if everyoe on these disparate projects could agree on an interface for connections it would be good). Being able to control connections (and their attendant transactions) is crucial to a robust and complete transaction management strategy, so now that everyone seems to be straining at the leash to get the Spring.Data stuff done, we can hopefully get some cross project traction here.

    Oh yeah, if you are going to start an integration project (and incubate it on your own box), the namespace that was mooted for such integration projects is Spring.Integration.YourTechHere . So in the case of NHibernate, the root namespace would be Spring.Integration.NHibernate... just thought I'd mention it, and yeah, it is still up for discussion

    Ciao
    Rick
    Senior Consultant, Interface21 - Spring Services from the Source

    The Spring Experience - The Premier Spring Event of 2006. December 7-10, 2006, Hollywood, Florida

  6. #6
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    In terms of DataSource like abstractions, I've been playing a bit with making a new AdoTemplate. It seems to me the way to go is along the lines of the DbProviderFactory class in ADO.NET 2.0. See msdn for some sample usage. That said, also I believe we can collapse the Spring.Java StoredProcedure, SqlUpdate, etc classes into AdoTempate. This is primarily because the ado.net command approach for dealing with text and stored procs is better than what you have to do in jdbc. It also means that in some cases if we would call something like "addParameter" on AdoTemplate we will build state inside that instance of AdoTemplate, i.e. "prototype" usage. Now the only state in JdbcTemplate is the connection, it is probably typically used as a singleton, and everything is passed in as method parameters. Squeezing in all thost method parameters in the case of parameters is frankly quite ugly in JdbcTemplate. Hope to have something to show soon....

    Cheers,
    Mark

  7. #7
    Join Date
    Nov 2005
    Location
    Costa Rica
    Posts
    10

    Default

    Michael,

    I've been using nhibernate recently and I'll need to start working with Spring.net soon. I want to help you with the spring-nhibernate integration.

    Esteban

  8. #8
    Join Date
    Mar 2006
    Location
    Ukraine, CR
    Posts
    11

    Default

    Hi guys! I already use Spring and NHibernate in my projects last half year and I'm agree that it would be very usefull and helpfull to have NHibernate implementation in Spring.ADO module

  9. #9
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    Have you guys tried the spring-nhibernate integration that is currently in the sandbox? There are only a few things missing as compared to the Spring.Java version
    1) generate proxy for ISession to suppress calls to close.
    2) asp.net module to store session in callcontext for lifecycle of page processing.
    3) exception rollback rules - right now rollback on any exception thrown.
    4) setting of isolation level property
    6) integration with AdoTemplate (use tx/connection as started from ado.net and vice-versa)

    The daily builds include the spring.nhibernate dll and the api is very straightforward. The integration test code shows sample usage and a little bit is described here - Let me know and I'll be happy to help bootstrap you using it.

    Cheers,
    Mark

  10. #10
    Join Date
    Mar 2006
    Location
    Ukraine, CR
    Posts
    11

    Default

    Hi Mark!

    I have just tried the NHibernate integration with Spring and it is real cool! Thank you and all team. Well, I'm waiting very much when you finish these few things you describe above and hope it will be soon :wink:

    Most wanted for me and many of our developers is asp.net module to store session in callcontext for lifecycle of page processing. We are going to start new project and I would like to know have you got some approximate forecast for these features?

    Thanks in advance! You made great work! :lol:

Similar Threads

  1. Activate NHibernate integration
    By sir-archimedes in forum Architecture, Design and Best Practices
    Replies: 1
    Last Post: 04-02-2006, 04:00 PM
  2. Update on Spring.net/nHibernate Integration
    By ivolved in forum Data Access
    Replies: 24
    Last Post: 03-12-2006, 03:58 PM
  3. Spring and Spring.Net
    By dsellers in forum Core Container
    Replies: 3
    Last Post: 02-17-2006, 03:29 AM
  4. Need help to start a new project
    By thuland in forum Architecture, Design and Best Practices
    Replies: 5
    Last Post: 05-13-2005, 01:41 PM
  5. Spring.Net and NHibernate
    By nohare in forum Core Container
    Replies: 2
    Last Post: 03-09-2005, 09:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •