[mapguide-internals] Review Request for MapGuide RFC 78 -Enhance transaction capability to Feature Service

Klain Qin klain.qin at autodesk.com
Mon Jul 20 01:20:29 EDT 2009


Yes, it could throw an exception if the provider doesn't support it or just simply do nothing in BeginTransation(). 

Yes, MgTransaction will hold on the particular FDO connection until Commit or Rollback is executed. And there is also a timeout for transaction that if it's not committed or rollbacked within the timeout, the server will automatically rollback the transaction as mentioned in the RFC.  

Klain

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Haris Kurtagic
Sent: Saturday, July 18, 2009 11:48 PM
To: MapGuide Internals Mail List
Subject: RE: [mapguide-internals] Review Request for MapGuide RFC 78 -Enhance transaction capability to Feature Service

In case that FDO provider doesn't support transaction, it throws exception ?


I think too that it doesn't have to do auto roll back but another question comes to me. I assume that MgTransaction will get hold on one particular FDO connection until either Rollback or Commit is executed ? 

Haris

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Klain Qin
Sent: Saturday, July 18, 2009 10:14 AM
To: MapGuide Internals Mail List
Subject: RE: [mapguide-internals] Review Request for MapGuide RFC 78 -Enhance transaction capability to Feature Service

In that case, ExecuteSqlQuery or ExecuteSqlNonQuery could be designed to automatically rollback the transaction. However to give the user more flexibility, I would prefer the users to do it by themselves. So the user can write their application in this way:

MgTransaction tran = MgFeatureService::BeginTransaction(resource);
Try
{
	MgFeatureService::ExecuteSqlQuery(resource, sql statements 1, tran); }
Catch(...)
{
	Do something else here, where it could issue a call to tran->Rollback(). 
}

MgFeatureService:: ExecuteSqlNonQuery(resource, sql statement 2, tran);

Tran->commit();

If transaction is automatically rollbacked by ExecuteSqlQuery or ExecuteSqlNonQuery, the user will lose such kind of flexibility. 

And a database application would normally like to commit or rollback the transaction explicitly. 

BTW - thanks for the reminding for adding the link for review. That's a good suggestion. 

Klain

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: 2009年7月17日 11:12
To: MapGuide Internals Mail List
Subject: RE: [mapguide-internals] Review Request for MapGuide RFC 78 - Enhance transaction capability to Feature Service

Looks like a good idea.

What happens when one of ExecuteSqlQuery or ExecuteSqlNonQuery fails?  Does the user need to rollback transaction within exception handling, or is this done automatically?

In the future, please link to the RFC as part of review request so there are fewer barriers to getting people to review it.

http://trac.osgeo.org/mapguide/wiki/MapGuideRfc78

Jason

-----Original Message-----
From: Klain Qin
Sent: Thursday, July 16, 2009 7:55 PM
Subject: [mapguide-internals] Review Request for MapGuide RFC 78 - Enhance transaction capability to Feature Service

MapGuide RFC 78 has been posted and ready for review. Can you help review it? Any comments are much appreciated.

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals


More information about the mapguide-internals mailing list