The architecture diagram

We are coming to the end of a very important set of features of NHibernate. Before we close this chapter, I wanted to bring back the NHibernate architecture diagram that I had shown you in the previous chapter and update it with the concepts we learned in this chapter.

The following diagram is not vastly different from the previous one but it does highlight important concepts around sessions and transactions. You can begin one or more transactions inside a session. When a transaction is committed, session is flushed. It is at this point that all the SQL statements required to synchronize the in-memory state of the entities to database, are sent to database server for execution.

Get Learning NHibernate 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.