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 6899169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:23:17+00:00 2026-05-27T07:23:17+00:00

I have installed Quartz .NET and have created the Quartz database. I need to

  • 0

I have installed Quartz .NET and have created the Quartz database. I need to extend the Quartz job store with my own custom data. For example, when I add a job through the Quartz API, I need to add additional information to my own custom tables within the same database transaction. I know there is a class called JobStoreCMT in Quartz, but I have not been able to find any concise examples showing how to provide Quartz with the transaction that NHibernate creates.

  • 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-05-27T07:23:18+00:00Added an answer on May 27, 2026 at 7:23 am

    My understanding of the JobStoreCMT is that you declare all of your transactions using the classes in System.Transactions namespace that was introduced in .NET 2.0. Fortunately NHibernate operates well with these transactions as well, so you would put your Quartz operations and NHibernate operations in a single TransactionScope, like the following:

    using (var ts = new TransactionScope()) {
    
        // do something with your scheduler here, eg
        _scheduler.ScheduleJob(someJobDetail, someTrigger);
    
        // create an NHibernate session that will be part of the same transaction
        using (var session = _sessionFactory.OpenSession()) {
    
            // perform actions on session here, but do *not* make use of
            // NHibernate transaction methods, such as ISession.BeginTransaction(),
            // because the transaction is controlled via the TransactionScope instance.
    
        }
    
        ts.Complete();
    }
    

    The code above assumes that elsewhere the following vars are declared and initialized:

    Quartz.IScheduler _scheduler;
    NHibernate.ISessionFactory _sessionFactory;
    

    The above code sample is not packed with detail, but this is the general idea.

    One problem you may run into is that the above code will require a distributed transaction because the Quartz JobStoreCMT class creates one database connection, and the NHibernate session creates another database connection. Although it is possible (with SQL Server, at least) to have two different database connections share the same transaction, my understanding is that the current implementation of System.Transactions will upgraded the transaction to a distributed transaction with the opening of the second connection. This will have a significant effect on performance as a distributed transaction is significantly slower than a simple transaction.

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

Sidebar

Related Questions

I am using Quartz.Net to schedule task. I have tried like wise. Started a
I have installed zend server on my local system.I created one project folder using
I have installed Visual Web Developer 2008, the .net framework 3.5 but when i
I have installed SSL for my website http://digitalexperts.net . The website is based on
I have installed RockMongo http://code.google.com/p/rock-php/ to manage my mongoDB database. This is installed in
I have installed rails.2.3.11 and run rake rails:upgrade. Do i need to modify anymore
I have a Windows service that has been scheduled using Quartz.NET . I have
I have installed and setup RubyCAS-Server and RubyCAS-Client on my machine. Login works perfectly
I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I have installed Delphi Prism and XNA Game Studio 3.0. I have managed to

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.