Spring.NET with NHibernate and quartz transaction (global transaction manager) -


I want to use Global Transaction Manager at my service level.

For example. Namasthan assembly name. Call.seva Implementation {public class demosva {public zero demo} {save (model); // This is the nHibernate transaction SchedulerManager.GetInstance.save (id); // it is related to quartz}}}

What should I do?

If I used the TransactionScope () then it is giving me an error because NHibernateTransaction can not

I

  & lt; Object id = "transactionManager" type = "Spring.Data.NHibernate.HibernateTransactionManager, Spring.Data.NHibernate33" & gt; Have used. & Lt; Property Name = "DbProvider" ref = "DbProvider" /> & Lt; Asset Name = "Session Failure" Ref = "NHibernateSessionFactory" /> & Lt; / Object & gt; Edit   

: Then I used two transaction managers in the Spring config file:

 < Code> & lt; Object id = "transactionManager" type = "Spring.Data.NHibernate.HibernateTransactionManager, Spring.DataNHibernate33" & gt; & Lt; Property Name = "DbProvider" ref = "DbProvider" /> & Lt; Asset Name = "Session Failure" Ref = "NHibernateSessionFactory" /> & Lt; / Object & gt; & Lt; Tx: Advice ID = "txAdvice" transaction-manager = "transactionManager" & gt; & Lt; Tx: blames the account & gt; & Lt; tx: Method Name = "*" /> & Lt; / tx: Explains responsible & gt; & Lt; / tx: Advice & gt; & Lt; Object ID = "Service Operation" type = "Spring.Aop.Support.SdkRegularExpressionMethodPointcut, Spring.Aop" & gt; & Lt; Property Name = "Pattern" Value = "Assembly Name" .core Service.  & lt; / tx: Lies & gt; & lt; / tx: Advice & gt; & lt; Object ID =" Service Operation Global "type =" Spring.Aop.Support.SdkRegularExpressionMethodPointcut, Spring.Aop "& Gt; Property Name =" Pattern "Value =" Assembly Name. . Service. Implementation.DemoService "/> & lt; / object & gt; & lt; aop: config & gt; & lt; aop: Advisory Bindoot-Riff =" Service Operation "Advice- ref =" txAdvice "/> Lt; aop: consultant point quote-riff = "service operation global" advice-ref = "txAdviceGlobal" />    

error after this Getting: The NHibernate transaction is not disconnected or connected.

Finally, as the following issue Resolved my problem:

I added tx annotation for NHibernate transactions :

  & lt; tx: attribute-driven transaction-manager = "transaction manager" proxy-target-type = "true" />   < P> For Global Transactions, I have removed the service 'Operation' by changing my Spring.Cong file and the NHibernate Transaction Advisor.  
   & lt ; Aop: Consultant Point Quote-Riff = "Service Operation Global" advice - ref = "txAdviceGlobal" />   

Changes to my code:

  Namesh place assembly. Type Yksewakanwyn {public class Demo Service {[transactions (transactions Denprapti. Required)] Public Zero Demo () {Save (model); // This is the nHibernate transaction SchedulerManager.GetInstance.save (id); // It is related to quartz}}}   

Edited: The other problem started by doing this is going on well on many PCs, but in some PC it shows this error: When I'm performing a demo () operation, the connection was disconnected or not.

I have configured all the settings that need to run MS DTC.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -