cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dar...@apache.org
Subject [19/20] git commit: updated refs/heads/txn-refactor to 7364d55
Date Wed, 16 Oct 2013 16:50:30 GMT
New Transaction API

Introduction of a new Transaction API that is more consistent with the style
of Spring's transaction managment.  The existing Transaction class was renamed
to TransactionLegacy.  All of the non-DAO code in the management server has been
updated to use the new Transaction API.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f62e28c1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f62e28c1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f62e28c1

Branch: refs/heads/txn-refactor
Commit: f62e28c1ec125263613d32856b11ef50b815e573
Parents: 81f1a0b
Author: Darren Shepherd <darren.s.shepherd@gmail.com>
Authored: Wed Oct 16 09:21:00 2013 -0700
Committer: Darren Shepherd <darren.s.shepherd@gmail.com>
Committed: Wed Oct 16 09:21:00 2013 -0700

----------------------------------------------------------------------
 .../exception/ConcurrentOperationException.java |    3 +-
 .../bridge/persist/dao/BucketPolicyDaoImpl.java |    6 +-
 .../persist/dao/CloudStackAccountDaoImpl.java   |    3 +-
 .../dao/CloudStackConfigurationDaoImpl.java     |    3 +-
 .../dao/CloudStackSvcOfferingDaoImpl.java       |    5 +-
 .../persist/dao/CloudStackUserDaoImpl.java      |    3 +-
 .../cloud/bridge/persist/dao/MHostDaoImpl.java  |    5 +-
 .../bridge/persist/dao/MHostMountDaoImpl.java   |    3 +-
 .../persist/dao/MultiPartPartsDaoImpl.java      |    9 +-
 .../persist/dao/MultiPartUploadsDaoImpl.java    |   15 +-
 .../bridge/persist/dao/MultipartLoadDao.java    |    9 +-
 .../persist/dao/MultipartMetaDaoImpl.java       |    3 +-
 .../bridge/persist/dao/OfferingDaoImpl.java     |   11 +-
 .../cloud/bridge/persist/dao/SAclDaoImpl.java   |    7 +-
 .../bridge/persist/dao/SBucketDaoImpl.java      |    5 +-
 .../cloud/bridge/persist/dao/SHostDaoImpl.java  |    5 +-
 .../cloud/bridge/persist/dao/SMetaDaoImpl.java  |    5 +-
 .../bridge/persist/dao/SObjectDaoImpl.java      |    7 +-
 .../bridge/persist/dao/SObjectItemDaoImpl.java  |    5 +-
 .../persist/dao/UserCredentialsDaoImpl.java     |    5 +-
 .../cloud/bridge/service/EC2RestServlet.java    |   13 +-
 .../com/cloud/bridge/service/S3RestServlet.java |    5 +-
 .../service/controller/s3/S3BucketAction.java   |    3 +-
 .../service/controller/s3/ServiceProvider.java  |    7 +-
 .../cloud/bridge/service/core/s3/S3Engine.java  |   23 +-
 .../cloud/agent/manager/AgentManagerImpl.java   |    5 +-
 .../manager/ClusteredAgentManagerImpl.java      |    5 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java |  121 +-
 .../entity/api/db/dao/DcDetailsDaoImpl.java     |    4 +-
 .../entity/api/db/dao/EngineClusterDaoImpl.java |    6 +-
 .../api/db/dao/EngineDataCenterDaoImpl.java     |    6 +-
 .../entity/api/db/dao/EngineHostDaoImpl.java    |   14 +-
 .../entity/api/db/dao/EngineHostPodDaoImpl.java |    6 +-
 .../entity/api/db/dao/HostDetailsDaoImpl.java   |    4 +-
 .../entity/api/db/dao/HostTagsDaoImpl.java      |    4 +-
 .../orchestration/NetworkOrchestrator.java      |  918 +++++++-------
 .../orchestration/VolumeOrchestrator.java       |   88 +-
 .../src/com/cloud/alert/dao/AlertDaoImpl.java   |    4 +-
 .../com/cloud/capacity/dao/CapacityDaoImpl.java |   26 +-
 .../configuration/dao/ResourceCountDaoImpl.java |    4 +-
 .../src/com/cloud/dc/ClusterDetailsDaoImpl.java |    6 +-
 .../src/com/cloud/dc/dao/ClusterDaoImpl.java    |    6 +-
 .../com/cloud/dc/dao/ClusterVSMMapDaoImpl.java  |    4 +-
 .../src/com/cloud/dc/dao/DataCenterDaoImpl.java |    6 +-
 .../dc/dao/DataCenterIpAddressDaoImpl.java      |    8 +-
 .../DataCenterLinkLocalIpAddressDaoImpl.java    |    6 +-
 .../src/com/cloud/dc/dao/DataCenterVnetDao.java |    3 +-
 .../com/cloud/dc/dao/DataCenterVnetDaoImpl.java |    8 +-
 .../src/com/cloud/dc/dao/DcDetailsDaoImpl.java  |    4 +-
 .../src/com/cloud/dc/dao/HostPodDaoImpl.java    |    6 +-
 .../src/com/cloud/dc/dao/PodVlanDaoImpl.java    |    8 +-
 .../dc/dao/StorageNetworkIpAddressDaoImpl.java  |    6 +-
 .../src/com/cloud/dc/dao/VlanDaoImpl.java       |    4 +-
 .../src/com/cloud/domain/dao/DomainDaoImpl.java |    6 +-
 .../src/com/cloud/event/dao/EventDaoImpl.java   |    4 +-
 .../com/cloud/event/dao/UsageEventDaoImpl.java  |   10 +-
 .../src/com/cloud/host/dao/HostDaoImpl.java     |   14 +-
 .../com/cloud/host/dao/HostDetailsDaoImpl.java  |    4 +-
 .../src/com/cloud/host/dao/HostTagsDaoImpl.java |    4 +-
 .../src/com/cloud/keystore/KeystoreDaoImpl.java |    4 +-
 .../network/dao/FirewallRulesCidrsDaoImpl.java  |    4 +-
 .../cloud/network/dao/FirewallRulesDaoImpl.java |    6 +-
 .../com/cloud/network/dao/IPAddressDaoImpl.java |    6 +-
 .../com/cloud/network/dao/NetworkDaoImpl.java   |   10 +-
 .../cloud/network/dao/PortProfileDaoImpl.java   |    4 +-
 .../security/dao/SecurityGroupDaoImpl.java      |    6 +-
 .../security/dao/SecurityGroupWorkDaoImpl.java  |    8 +-
 .../security/dao/VmRulesetLogDaoImpl.java       |    8 +-
 .../cloud/network/vpc/dao/PrivateIpDaoImpl.java |    4 +-
 .../network/vpc/dao/StaticRouteDaoImpl.java     |    4 +-
 .../com/cloud/network/vpc/dao/VpcDaoImpl.java   |    8 +-
 .../network/vpc/dao/VpcOfferingDaoImpl.java     |    4 +-
 .../offerings/dao/NetworkOfferingDaoImpl.java   |    6 +-
 .../com/cloud/projects/dao/ProjectDaoImpl.java  |    4 +-
 .../dao/ServiceOfferingDetailsDaoImpl.java      |    4 +-
 .../storage/dao/LaunchPermissionDaoImpl.java    |    6 +-
 .../com/cloud/storage/dao/SnapshotDaoImpl.java  |   14 +-
 .../storage/dao/StoragePoolDetailsDaoImpl.java  |    4 +-
 .../storage/dao/StoragePoolHostDaoImpl.java     |   10 +-
 .../storage/dao/StoragePoolWorkDaoImpl.java     |    4 +-
 .../cloud/storage/dao/VMTemplateDaoImpl.java    |   14 +-
 .../storage/dao/VMTemplateDetailsDaoImpl.java   |    4 +-
 .../storage/dao/VMTemplateHostDaoImpl.java      |    8 +-
 .../storage/dao/VMTemplatePoolDaoImpl.java      |    8 +-
 .../storage/dao/VMTemplateZoneDaoImpl.java      |    4 +-
 .../com/cloud/storage/dao/VolumeDaoImpl.java    |   12 +-
 .../cloud/storage/dao/VolumeDetailsDaoImpl.java |    4 +-
 .../src/com/cloud/upgrade/DatabaseCreator.java  |    8 +-
 .../cloud/upgrade/DatabaseIntegrityChecker.java |    7 +-
 .../cloud/upgrade/DatabaseUpgradeChecker.java   |    6 +-
 .../com/cloud/upgrade/dao/Upgrade307to410.java  |    2 +-
 .../com/cloud/upgrade/dao/VersionDaoImpl.java   |    4 +-
 .../src/com/cloud/usage/dao/UsageDaoImpl.java   |   26 +-
 .../cloud/usage/dao/UsageIPAddressDaoImpl.java  |    6 +-
 .../com/cloud/usage/dao/UsageJobDaoImpl.java    |    8 +-
 .../dao/UsageLoadBalancerPolicyDaoImpl.java     |    8 +-
 .../cloud/usage/dao/UsageNetworkDaoImpl.java    |    8 +-
 .../usage/dao/UsageNetworkOfferingDaoImpl.java  |    6 +-
 .../dao/UsagePortForwardingRuleDaoImpl.java     |    8 +-
 .../usage/dao/UsageSecurityGroupDaoImpl.java    |    6 +-
 .../cloud/usage/dao/UsageStorageDaoImpl.java    |    8 +-
 .../cloud/usage/dao/UsageVMInstanceDaoImpl.java |    8 +-
 .../cloud/usage/dao/UsageVMSnapshotDaoImpl.java |    8 +-
 .../cloud/usage/dao/UsageVPNUserDaoImpl.java    |    6 +-
 .../com/cloud/usage/dao/UsageVmDiskDaoImpl.java |    8 +-
 .../com/cloud/usage/dao/UsageVolumeDaoImpl.java |    8 +-
 .../com/cloud/user/AccountDetailsDaoImpl.java   |    4 +-
 .../src/com/cloud/user/dao/AccountDaoImpl.java  |    4 +-
 .../cloud/user/dao/UserStatisticsDaoImpl.java   |    6 +-
 .../cloud/user/dao/VmDiskStatisticsDaoImpl.java |    6 +-
 .../com/cloud/vm/dao/ConsoleProxyDaoImpl.java   |   16 +-
 .../com/cloud/vm/dao/DomainRouterDaoImpl.java   |    8 +-
 .../src/com/cloud/vm/dao/NicDetailDaoImpl.java  |    4 +-
 .../cloud/vm/dao/SecondaryStorageVmDaoImpl.java |    8 +-
 .../src/com/cloud/vm/dao/UserVmDaoImpl.java     |    8 +-
 .../com/cloud/vm/dao/UserVmDetailsDaoImpl.java  |    4 +-
 .../src/com/cloud/vm/dao/VMInstanceDaoImpl.java |   12 +-
 .../affinity/dao/AffinityGroupVMMapDaoImpl.java |    4 +-
 .../entity/api/db/dao/VMComputeTagDaoImpl.java  |    4 +-
 .../entity/api/db/dao/VMEntityDaoImpl.java      |    4 +-
 .../entity/api/db/dao/VMNetworkMapDaoImpl.java  |    4 +-
 .../entity/api/db/dao/VMReservationDaoImpl.java |    4 +-
 .../entity/api/db/dao/VMRootDiskTagDaoImpl.java |    4 +-
 .../datastore/db/PrimaryDataStoreDaoImpl.java   |   10 +-
 .../endpoint/DefaultEndPointSelector.java       |    3 +-
 .../image/db/ImageStoreDetailsDaoImpl.java      |    4 +-
 .../image/db/SnapshotDataStoreDaoImpl.java      |    6 +-
 .../image/db/TemplateDataStoreDaoImpl.java      |    6 +-
 .../image/db/VolumeDataStoreDaoImpl.java        |    4 +-
 .../datastore/PrimaryDataStoreHelper.java       |    4 +-
 .../db/PrimaryDataStoreDetailsDaoImpl.java      |    4 +-
 .../com/cloud/cluster/ClusterManagerImpl.java   |  102 +-
 .../dao/ManagementServerHostDaoImpl.java        |   16 +-
 .../dao/ManagementServerHostPeerDaoImpl.java    |    4 +-
 .../config/dao/ConfigurationDaoImpl.java        |    6 +-
 .../utils/crypt/EncryptionSecretKeyChanger.java |    3 +-
 .../com/cloud/utils/db/ConnectionConcierge.java |    2 +-
 framework/db/src/com/cloud/utils/db/DbUtil.java |    2 +-
 .../src/com/cloud/utils/db/GenericDaoBase.java  |   36 +-
 .../db/src/com/cloud/utils/db/Merovingian2.java |    2 +-
 .../src/com/cloud/utils/db/SequenceFetcher.java |    2 +-
 .../db/src/com/cloud/utils/db/Transaction.java  | 1166 +----------------
 .../com/cloud/utils/db/TransactionCallback.java |    7 +
 .../utils/db/TransactionCallbackNoReturn.java   |   13 +
 .../db/TransactionCallbackWithException.java    |    7 +
 .../utils/db/TransactionContextBuilder.java     |    6 +-
 .../com/cloud/utils/db/TransactionLegacy.java   | 1174 ++++++++++++++++++
 .../cloud/utils/db/TransactionMBeanImpl.java    |   18 +-
 .../com/cloud/utils/db/TransactionStatus.java   |    7 +
 .../utils/db/TransactionWrappedExeception.java  |   36 +
 .../db/test/com/cloud/utils/db/DbTestDao.java   |    4 +-
 .../db/test/com/cloud/utils/db/DbTestUtils.java |    4 +-
 .../com/cloud/utils/db/TransactionTest.java     |   26 +-
 .../framework/jobs/dao/AsyncJobDaoImpl.java     |    4 +-
 .../jobs/dao/AsyncJobJoinMapDaoImpl.java        |   10 +-
 .../framework/jobs/dao/SyncQueueDaoImpl.java    |    4 +-
 .../jobs/dao/SyncQueueItemDaoImpl.java          |    4 +-
 .../jobs/impl/AsyncJobManagerImpl.java          |  286 ++---
 .../jobs/impl/SyncQueueManagerImpl.java         |  271 ++--
 .../affinity/ExplicitDedicationProcessor.java   |   32 +-
 .../dedicated/DedicatedResourceManagerImpl.java |  273 ++--
 .../BareMetalPingServiceImpl.java               |    3 -
 .../networkservice/BaremetaNetworkGuru.java     |   21 +-
 .../networkservice/BaremetalDhcpElement.java    |    4 -
 .../BaremetalDhcpManagerImpl.java               |    4 -
 .../BaremetalKickStartServiceImpl.java          |    7 +-
 .../networkservice/BaremetalPxeElement.java     |    4 -
 .../com/cloud/ucs/manager/UcsManagerImpl.java   |    3 -
 .../lb/ElasticLoadBalancerManagerImpl.java      |   32 +-
 .../cloudstack/storage/test/AopTestAdvice.java  |    4 +-
 server/src/com/cloud/api/ApiServer.java         |   65 +-
 .../com/cloud/capacity/CapacityManagerImpl.java |  321 ++---
 .../configuration/ConfigurationManagerImpl.java |  880 ++++++-------
 .../consoleproxy/ConsoleProxyManagerImpl.java   |   34 +-
 .../cloud/dc/dao/DedicatedResourceDaoImpl.java  |    3 +-
 .../deploy/DeploymentPlanningManagerImpl.java   |  157 +--
 .../ha/HighAvailabilityManagerExtImpl.java      |    7 +-
 .../cloud/ha/dao/HighAvailabilityDaoImpl.java   |    3 +-
 .../metadata/ResourceMetaDataManagerImpl.java   |   86 +-
 .../network/ExternalDeviceUsageManagerImpl.java |  155 +--
 .../ExternalFirewallDeviceManagerImpl.java      |   46 +-
 .../ExternalLoadBalancerDeviceManagerImpl.java  |  171 ++-
 .../com/cloud/network/IpAddressManagerImpl.java |  967 ++++++++-------
 .../com/cloud/network/NetworkServiceImpl.java   |  605 ++++-----
 .../cloud/network/NetworkUsageManagerImpl.java  |   50 +-
 .../cloud/network/PortProfileManagerImpl.java   |   39 +-
 .../network/StorageNetworkManagerImpl.java      |  169 +--
 .../cloud/network/as/AutoScaleManagerImpl.java  |  191 +--
 .../network/firewall/FirewallManagerImpl.java   |   93 +-
 .../cloud/network/guru/DirectNetworkGuru.java   |  122 +-
 .../network/guru/DirectPodBasedNetworkGuru.java |  116 +-
 .../cloud/network/guru/GuestNetworkGuru.java    |   17 +-
 .../cloud/network/guru/PublicNetworkGuru.java   |   20 +-
 .../lb/LoadBalancingRulesManagerImpl.java       |  395 +++---
 .../VirtualNetworkApplianceManagerImpl.java     |  347 +++---
 .../cloud/network/rules/RulesManagerImpl.java   |  228 ++--
 .../security/SecurityGroupManagerImpl.java      |  526 ++++----
 .../network/vpc/NetworkACLManagerImpl.java      |   40 +-
 .../com/cloud/network/vpc/VpcManagerImpl.java   |  635 +++++-----
 .../network/vpn/RemoteAccessVpnManagerImpl.java |  224 ++--
 .../com/cloud/projects/ProjectManagerImpl.java  |  367 +++---
 .../com/cloud/resource/ResourceManagerImpl.java |  297 +++--
 .../resourcelimit/ResourceLimitManagerImpl.java |  336 ++---
 .../cloud/server/ConfigurationServerImpl.java   |  554 +++++----
 .../com/cloud/server/ManagementServerImpl.java  |  101 +-
 server/src/com/cloud/server/StatsCollector.java |  247 ++--
 .../com/cloud/servlet/CloudStartupServlet.java  |    3 +-
 .../com/cloud/servlet/ConsoleProxyServlet.java  |    3 +-
 .../com/cloud/storage/StorageManagerImpl.java   |   62 +-
 .../com/cloud/storage/VolumeApiServiceImpl.java |  144 ++-
 .../cloud/tags/TaggedResourceManagerImpl.java   |  110 +-
 .../com/cloud/template/TemplateManagerImpl.java |  100 +-
 server/src/com/cloud/test/DatabaseConfig.java   |   68 +-
 server/src/com/cloud/test/IPRangeConfig.java    |   15 +-
 server/src/com/cloud/test/PodZoneConfig.java    |    7 +-
 .../src/com/cloud/usage/UsageServiceImpl.java   |   10 +-
 .../src/com/cloud/user/AccountManagerImpl.java  |  190 +--
 .../src/com/cloud/user/DomainManagerImpl.java   |   70 +-
 .../cloud/uuididentity/dao/IdentityDaoImpl.java |   13 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  681 +++++-----
 .../vm/snapshot/VMSnapshotManagerImpl.java      |   46 +-
 .../affinity/AffinityGroupServiceImpl.java      |  107 +-
 .../lb/ApplicationLoadBalancerManagerImpl.java  |   51 +-
 .../GlobalLoadBalancingRulesServiceImpl.java    |  219 ++--
 .../configuration/ConfigurationManagerTest.java |   20 +-
 .../cloud/network/CreatePrivateNetworkTest.java |    6 +-
 .../network/DedicateGuestVlanRangesTest.java    |   18 +-
 .../network/UpdatePhysicalNetworkTest.java      |    5 +-
 ...GlobalLoadBalancingRulesServiceImplTest.java |   28 +-
 usage/src/com/cloud/usage/UsageManagerImpl.java |   16 +-
 .../src/com/cloud/usage/UsageSanityChecker.java |    4 +-
 .../cloud/utils/exception/ExceptionUtil.java    |   12 +
 232 files changed, 8415 insertions(+), 7792 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/api/src/com/cloud/exception/ConcurrentOperationException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/ConcurrentOperationException.java b/api/src/com/cloud/exception/ConcurrentOperationException.java
index cfe6ba3..018dba5 100644
--- a/api/src/com/cloud/exception/ConcurrentOperationException.java
+++ b/api/src/com/cloud/exception/ConcurrentOperationException.java
@@ -17,8 +17,9 @@
 package com.cloud.exception;
 
 import com.cloud.utils.SerialVersionUID;
+import com.cloud.utils.exception.CloudRuntimeException;
 
-public class ConcurrentOperationException extends CloudException {
+public class ConcurrentOperationException extends CloudRuntimeException {
 
     private static final long serialVersionUID = SerialVersionUID.ConcurrentOperationException;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/BucketPolicyDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/BucketPolicyDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/BucketPolicyDaoImpl.java
index dd354a3..00486cb 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/BucketPolicyDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/BucketPolicyDaoImpl.java
@@ -26,7 +26,7 @@ import com.cloud.bridge.model.BucketPolicyVO;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={BucketPolicyDao.class})
@@ -42,7 +42,7 @@ public class BucketPolicyDaoImpl extends GenericDaoBase<BucketPolicyVO, Long> im
     public BucketPolicyVO getByName( String bucketName ) {
         SearchBuilder <BucketPolicyVO> searchByBucket = createSearchBuilder();
         searchByBucket.and("BucketName", searchByBucket.entity().getBucketName(), SearchCriteria.Op.EQ);
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         try {
             txn.start();
             SearchCriteria<BucketPolicyVO> sc = searchByBucket.create();
@@ -59,7 +59,7 @@ public class BucketPolicyDaoImpl extends GenericDaoBase<BucketPolicyVO, Long> im
     public void deletePolicy( String bucketName ) {
         SearchBuilder <BucketPolicyVO> deleteByBucket = createSearchBuilder();
         deleteByBucket.and("BucketName", deleteByBucket.entity().getBucketName(), SearchCriteria.Op.EQ);
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         try {
             txn.start();
             SearchCriteria<BucketPolicyVO> sc = deleteByBucket.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/CloudStackAccountDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackAccountDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackAccountDaoImpl.java
index 8fbc7c8..75a693e 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackAccountDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackAccountDaoImpl.java
@@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={CloudStackAccountDao.class})
@@ -34,7 +35,7 @@ public class CloudStackAccountDaoImpl extends GenericDaoBase<CloudStackAccountVO
     public String getDefaultZoneId(String accountId) {
         
         SearchBuilder<CloudStackAccountVO> SearchByUUID = createSearchBuilder();
-        Transaction txn = Transaction.open(Transaction.CLOUD_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
         try {
             txn.start();
             SearchByUUID.and("uuid", SearchByUUID.entity().getUuid(),

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java
index bc77ea1..644dcdc 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackConfigurationDaoImpl.java
@@ -27,6 +27,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={CloudStackConfigurationDao.class})
@@ -42,7 +43,7 @@ public class CloudStackConfigurationDaoImpl extends GenericDaoBase<CloudStackCon
     @DB
     public String getConfigValue(String name) {
         NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ);
-        Transaction txn = Transaction.open("cloud", Transaction.CLOUD_DB, true);
+        TransactionLegacy txn = TransactionLegacy.open("cloud", TransactionLegacy.CLOUD_DB, true);
         try {
             txn.start();
             SearchCriteria<CloudStackConfigurationVO> sc = NameSearch.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
index 8021eb6..cb8d129 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackSvcOfferingDaoImpl.java
@@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={CloudStackSvcOfferingDao.class})
@@ -42,7 +43,7 @@ public class CloudStackSvcOfferingDaoImpl extends GenericDaoBase<CloudStackServi
         SearchBuilder <CloudStackServiceOfferingVO> searchByName = createSearchBuilder();
         searchByName.and("name", searchByName.entity().getName(), SearchCriteria.Op.EQ);
         searchByName.done();
-        Transaction txn = Transaction.open(Transaction.CLOUD_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
         try {
             txn.start();
             SearchCriteria<CloudStackServiceOfferingVO> sc = searchByName.create();
@@ -61,7 +62,7 @@ public class CloudStackSvcOfferingDaoImpl extends GenericDaoBase<CloudStackServi
         SearchBuilder <CloudStackServiceOfferingVO> searchByID = createSearchBuilder();
         searchByID.and("uuid", searchByID.entity().getUuid(), SearchCriteria.Op.EQ);
         searchByID.done();
-        Transaction txn = Transaction.open(Transaction.CLOUD_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
         try {
             txn.start();
             SearchCriteria<CloudStackServiceOfferingVO> sc = searchByID.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java
index f7e1da6..7fe1dab 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/CloudStackUserDaoImpl.java
@@ -26,6 +26,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.crypt.DBEncryptionUtil;
 
 @Component
@@ -43,7 +44,7 @@ public class CloudStackUserDaoImpl extends GenericDaoBase<CloudStackUserVO, Stri
         SearchBuilder <CloudStackUserVO> searchByAccessKey = createSearchBuilder();
         searchByAccessKey.and("apiKey", searchByAccessKey.entity().getApiKey(), SearchCriteria.Op.EQ);
         searchByAccessKey.done();
-        Transaction txn = Transaction.open(Transaction.CLOUD_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
         try {
             txn.start();
             SearchCriteria<CloudStackUserVO> sc = searchByAccessKey.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/MHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/MHostDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/MHostDaoImpl.java
index 2223254..b52fcaf 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/MHostDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/MHostDaoImpl.java
@@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={MHostDao.class})
@@ -38,7 +39,7 @@ public class MHostDaoImpl extends GenericDaoBase<MHostVO, Long> implements MHost
 	@Override
 	public MHostVO getByHostKey(String hostKey) {
 	    NameSearch.and("MHostKey", NameSearch.entity().getHostKey(), SearchCriteria.Op.EQ);
-	    Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+	    TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
 	    try {
 		txn.start();
 		SearchCriteria<MHostVO> sc = NameSearch.create();
@@ -52,7 +53,7 @@ public class MHostDaoImpl extends GenericDaoBase<MHostVO, Long> implements MHost
 
     @Override
     public void updateHeartBeat(MHostVO mhost) {
-        Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
         try {
             txn.start();
             update(mhost.getId(), mhost);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/MHostMountDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/MHostMountDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/MHostMountDaoImpl.java
index 8b99f48..8a7153a 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/MHostMountDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/MHostMountDaoImpl.java
@@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={MHostMountDao.class})
@@ -37,7 +38,7 @@ public class MHostMountDaoImpl extends GenericDaoBase<MHostMountVO, Long> implem
 	public MHostMountVO getHostMount(long mHostId, long sHostId) { 
 	    SearchByMHostID.and("MHostID", SearchByMHostID.entity().getmHostID(), SearchCriteria.Op.EQ);
 	    SearchByMHostID.and("SHostID", SearchByMHostID.entity().getsHostID(), SearchCriteria.Op.EQ);
-	    Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	    try {
 		txn.start();
 		SearchCriteria<MHostMountVO> sc = SearchByMHostID.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/MultiPartPartsDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/MultiPartPartsDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/MultiPartPartsDaoImpl.java
index 6f31495..f1472e6 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/MultiPartPartsDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/MultiPartPartsDaoImpl.java
@@ -28,6 +28,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={MultiPartPartsDao.class})
@@ -42,7 +43,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
         ByUploadID.and("partNumber", ByUploadID.entity().getPartNumber(), SearchCriteria.Op.LT);
         Filter filter = new Filter(MultiPartPartsVO.class, "partNumber", Boolean.TRUE, null, null);
         
-        Transaction txn = Transaction.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
         try {
             txn.start();
             SearchCriteria<MultiPartPartsVO> sc = ByUploadID.create();
@@ -61,7 +62,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
         SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
         byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
         byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.GT);
-        Transaction txn = Transaction.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
         try {
             txn.start();
             SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
@@ -82,7 +83,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
         SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
         byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
         byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.EQ);
-        Transaction txn = Transaction.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
         try {
             txn.start();
             SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();
@@ -102,7 +103,7 @@ public class MultiPartPartsDaoImpl extends GenericDaoBase<MultiPartPartsVO, Long
         SearchBuilder<MultiPartPartsVO> byUploadID = createSearchBuilder();
         byUploadID.and("UploadID", byUploadID.entity().getUploadid(), SearchCriteria.Op.EQ);
         byUploadID.and("partNumber", byUploadID.entity().getPartNumber(), SearchCriteria.Op.EQ);
-        Transaction txn = Transaction.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
         try {
             txn.start();
             SearchCriteria<MultiPartPartsVO> sc = byUploadID.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/MultiPartUploadsDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/MultiPartUploadsDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/MultiPartUploadsDaoImpl.java
index 0f76e80..41133a0 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/MultiPartUploadsDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/MultiPartUploadsDaoImpl.java
@@ -33,6 +33,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={MultiPartUploadsDao.class})
@@ -42,9 +43,9 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
     public OrderedPair<String,String> multipartExits( int uploadId ) {
         MultiPartUploadsVO uploadvo = null;
         
-        Transaction txn = null; 
+        TransactionLegacy txn = null; 
         try {
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             uploadvo = findById(new Long(uploadId));
             if (null != uploadvo)
                 return new OrderedPair<String,String>(uploadvo.getAccessKey(), uploadvo.getNameKey());
@@ -58,9 +59,9 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
     @Override
     public void deleteUpload(int uploadId) {
         
-        Transaction txn = null; 
+        TransactionLegacy txn = null; 
         try {
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             remove(new Long(uploadId));
             txn.commit();
         }finally {
@@ -70,10 +71,10 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
     
     @Override
     public String getAtrributeValue(String attribute, int uploadid) {
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         MultiPartUploadsVO uploadvo = null;
         try {
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             uploadvo = findById(new Long(uploadid));
             if (null != uploadvo) {
                 if ( attribute.equalsIgnoreCase("AccessKey") )
@@ -105,7 +106,7 @@ public class MultiPartUploadsDaoImpl extends GenericDaoBase<MultiPartUploadsVO,
        Filter filter = new Filter(MultiPartUploadsVO.class, "nameKey", Boolean.TRUE, null, null);
        filter.addOrderBy(MultiPartUploadsVO.class, "createTime", Boolean.TRUE);
        
-       Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+       TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
        try {
            txn.start();
            SearchCriteria<MultiPartUploadsVO> sc = byBucket.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/MultipartLoadDao.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/MultipartLoadDao.java b/awsapi/src/com/cloud/bridge/persist/dao/MultipartLoadDao.java
index c1a69dc..4e6ff3d 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/MultipartLoadDao.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/MultipartLoadDao.java
@@ -34,6 +34,7 @@ import com.cloud.bridge.service.core.s3.S3MultipartPart;
 import com.cloud.bridge.service.core.s3.S3MultipartUpload;
 import com.cloud.bridge.util.OrderedPair;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 public class MultipartLoadDao {
     public static final Logger logger = Logger.getLogger(MultipartLoadDao.class);
@@ -94,9 +95,9 @@ public class MultipartLoadDao {
      */
     public int initiateUpload( String accessKey, String bucketName, String key, String cannedAccess, S3MetaDataEntry[] meta ) {
         int uploadId = -1;
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         try {
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             Date tod = new Date();
             MultiPartUploadsVO uploadVO = new MultiPartUploadsVO(accessKey,
                     bucketName, key, cannedAccess, tod);
@@ -315,9 +316,9 @@ public class MultipartLoadDao {
     private void saveMultipartMeta( int uploadId, S3MetaDataEntry[] meta ) {
         if (null == meta) return;
 
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         try {
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             for( int i=0; i < meta.length; i++ ) 
             {
                 S3MetaDataEntry entry = meta[i];

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/MultipartMetaDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/MultipartMetaDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/MultipartMetaDaoImpl.java
index 7ab9359..fec0a2c 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/MultipartMetaDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/MultipartMetaDaoImpl.java
@@ -27,6 +27,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={MultipartMetaDao.class})
@@ -37,7 +38,7 @@ public class MultipartMetaDaoImpl extends GenericDaoBase<MultipartMetaVO, Long>
         SearchBuilder <MultipartMetaVO> searchByUID = createSearchBuilder();
         searchByUID.and("UploadID", searchByUID.entity().getUploadID(), SearchCriteria.Op.EQ);
         searchByUID.done();
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         try {
             txn.start();
             SearchCriteria<MultipartMetaVO> sc = searchByUID.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/OfferingDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/OfferingDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/OfferingDaoImpl.java
index ea7d264..963f108 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/OfferingDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/OfferingDaoImpl.java
@@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={OfferingDao.class})
@@ -39,7 +40,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
 	
 	@Override
 	public int getOfferingCount() {
-       Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         try {
             txn.start();
             return listAll().size();
@@ -56,7 +57,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
        SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
        searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
        searchByAmazon.done();
-       Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+       TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
        try {
            txn.start();
            SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
@@ -74,7 +75,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
 	       SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
 	       searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
 	       searchByAmazon.done();
-	       Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	       TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	       try {
 	           txn.start();
 	           SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
@@ -93,7 +94,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
         searchByAmazon.and("CloudStackOffering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
         searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getCloudstackOffering() , SearchCriteria.Op.EQ);
         searchByAmazon.done();
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         OfferingBundleVO offering = null;
         try {
             txn.start();
@@ -122,7 +123,7 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
 	    SearchBuilder <OfferingBundleVO> searchByAmazon = createSearchBuilder();
         searchByAmazon.and("AmazonEC2Offering", searchByAmazon.entity().getAmazonOffering() , SearchCriteria.Op.EQ);
         searchByAmazon.done();
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         try {
             txn.start();
             SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/SAclDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/SAclDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/SAclDaoImpl.java
index d88660e..d4b4c90 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/SAclDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/SAclDaoImpl.java
@@ -32,6 +32,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={SAclDao.class})
@@ -46,7 +47,7 @@ public class SAclDaoImpl extends GenericDaoBase<SAclVO, Long> implements SAclDao
 	    SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
 	    SearchByTarget.done();
 	    Filter filter = new Filter(SAclVO.class, "grantOrder", Boolean.TRUE, null, null);
-	    Transaction txn = Transaction.open( Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open( TransactionLegacy.AWSAPI_DB);
 	    try {
 		txn.start();
 		SearchCriteria<SAclVO> sc = SearchByTarget.create();
@@ -66,7 +67,7 @@ public class SAclDaoImpl extends GenericDaoBase<SAclVO, Long> implements SAclDao
 	    SearchByAcl.and("TargetID", SearchByAcl.entity().getTargetId(), SearchCriteria.Op.EQ);
 	    SearchByAcl.and("GranteeCanonicalID", SearchByAcl.entity().getGranteeCanonicalId(), SearchCriteria.Op.EQ);
 	    Filter filter = new Filter(SAclVO.class, "grantOrder", Boolean.TRUE, null, null);
-	    Transaction txn = Transaction.open( Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open( TransactionLegacy.AWSAPI_DB);
 	    try {
     		txn.start();
     		SearchCriteria<SAclVO> sc = SearchByAcl.create();
@@ -85,7 +86,7 @@ public class SAclDaoImpl extends GenericDaoBase<SAclVO, Long> implements SAclDao
 	    SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
 	    SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
 
-	    Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	    try {
 		txn.start();
 		SearchCriteria<SAclVO> sc = SearchByTarget.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/SBucketDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/SBucketDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/SBucketDaoImpl.java
index 817c682..552281d 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/SBucketDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/SBucketDaoImpl.java
@@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={SBucketDao.class})
@@ -42,7 +43,7 @@ public class SBucketDaoImpl extends GenericDaoBase<SBucketVO, Long> implements S
 	    SearchBuilder<SBucketVO> SearchByName = createSearchBuilder();
 	    SearchByName.and("Name", SearchByName.entity().getName(), SearchCriteria.Op.EQ);
 	    //Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
-	    Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+	    TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
 	    try {
 		txn.start();
 		SearchCriteria<SBucketVO> sc = SearchByName.create();
@@ -59,7 +60,7 @@ public class SBucketDaoImpl extends GenericDaoBase<SBucketVO, Long> implements S
 	    SearchBuilder<SBucketVO> ByCanonicalID = createSearchBuilder();
 	    ByCanonicalID.and("OwnerCanonicalID", ByCanonicalID.entity().getOwnerCanonicalId(), SearchCriteria.Op.EQ);
 	    Filter filter = new Filter(SBucketVO.class, "createTime", Boolean.TRUE, null, null);
-	    Transaction txn = Transaction.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+	    TransactionLegacy txn = TransactionLegacy.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
 	    try {
             txn.start();
             SearchCriteria<SBucketVO> sc = ByCanonicalID.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/SHostDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/SHostDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/SHostDaoImpl.java
index 9b6b535..5d2e9b9 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/SHostDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/SHostDaoImpl.java
@@ -25,6 +25,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={SHostDao.class})
@@ -36,7 +37,7 @@ public class SHostDaoImpl extends GenericDaoBase<SHostVO, Long> implements SHost
 	    SearchBuilder <SHostVO> HostSearch = createSearchBuilder();
 	    HostSearch.and("Host", HostSearch.entity().getHost(), SearchCriteria.Op.EQ);
 	    HostSearch.done();
-	    Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	    try {
     		txn.start();
     		SearchCriteria<SHostVO> sc = HostSearch.create();
@@ -55,7 +56,7 @@ public class SHostDaoImpl extends GenericDaoBase<SHostVO, Long> implements SHost
 	    LocalStorageHostSearch.and("MHostID", LocalStorageHostSearch.entity().getMhostid(), SearchCriteria.Op.EQ);
 	    LocalStorageHostSearch.and("ExportRoot", LocalStorageHostSearch.entity().getExportRoot(), SearchCriteria.Op.EQ);
 	    LocalStorageHostSearch.done();
-	    Transaction txn = Transaction.currentTxn();
+	    TransactionLegacy txn = TransactionLegacy.currentTxn();
 	    try {
             txn.start();
             SearchCriteria<SHostVO> sc = LocalStorageHostSearch.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/SMetaDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/SMetaDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/SMetaDaoImpl.java
index 8fdc949..95355b9 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/SMetaDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/SMetaDaoImpl.java
@@ -28,6 +28,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={SMetaDao.class})
@@ -41,7 +42,7 @@ public class SMetaDaoImpl extends GenericDaoBase<SMetaVO, Long> implements SMeta
 	    SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
 	    SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
 	    SearchByTarget.done();
-	    Transaction txn = Transaction.open( Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open( TransactionLegacy.AWSAPI_DB);
 	    try {
             txn.start();
             SearchCriteria<SMetaVO> sc = SearchByTarget.create();
@@ -71,7 +72,7 @@ public class SMetaDaoImpl extends GenericDaoBase<SMetaVO, Long> implements SMeta
 	    SearchBuilder <SMetaVO> SearchByTarget = createSearchBuilder();
 	    SearchByTarget.and("Target", SearchByTarget.entity().getTarget(), SearchCriteria.Op.EQ);
 	    SearchByTarget.and("TargetID", SearchByTarget.entity().getTargetId(), SearchCriteria.Op.EQ);
-	    Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	    try {
 		txn.start();
 		SearchCriteria<SMetaVO> sc = SearchByTarget.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/SObjectDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/SObjectDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/SObjectDaoImpl.java
index 6d23757..e6370fe 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/SObjectDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/SObjectDaoImpl.java
@@ -33,6 +33,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={SObjectDao.class})
@@ -47,7 +48,7 @@ public class SObjectDaoImpl extends GenericDaoBase<SObjectVO, Long> implements S
         SearchBuilder<SObjectVO> SearchByName = createSearchBuilder();
         SearchByName.and("SBucketID", SearchByName.entity().getBucketID() , SearchCriteria.Op.EQ);
         SearchByName.and("NameKey", SearchByName.entity().getNameKey() , SearchCriteria.Op.EQ);
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         try {
             txn.start();
             SearchCriteria<SObjectVO> sc = SearchByName.create();
@@ -76,7 +77,7 @@ public class SObjectDaoImpl extends GenericDaoBase<SObjectVO, Long> implements S
 
         SearchByBucket.and("SBucketID", SearchByBucket.entity().getBucketID(), SearchCriteria.Op.EQ);
         SearchByBucket.and("DeletionMark", SearchByBucket.entity().getDeletionMark(), SearchCriteria.Op.NULL);		
-        Transaction txn = Transaction.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
         try {
             txn.start();
             SearchCriteria<SObjectVO> sc = SearchByBucket.create();
@@ -100,7 +101,7 @@ public class SObjectDaoImpl extends GenericDaoBase<SObjectVO, Long> implements S
         List<SObjectVO> objects = new ArrayList<SObjectVO>();
         getAllBuckets.and("SBucketID", getAllBuckets.entity().getBucketID(), SearchCriteria.Op.EQ);
 
-        Transaction txn = Transaction.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.currentTxn();  // Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
         try {
             txn.start();
             SearchCriteria<SObjectVO> sc = getAllBuckets.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/SObjectItemDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/SObjectItemDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/SObjectItemDaoImpl.java
index 57140c4..294b32d 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/SObjectItemDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/SObjectItemDaoImpl.java
@@ -27,6 +27,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={SObjectItemDao.class})
@@ -39,7 +40,7 @@ public class SObjectItemDaoImpl extends GenericDaoBase<SObjectItemVO, Long> impl
 	@Override
 	public SObjectItemVO getByObjectIdNullVersion(long id) {
 	    
-	    Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	    SearchBuilder <SObjectItemVO> SearchByID = createSearchBuilder();
 	    SearchByID.and("ID", SearchByID.entity().getId(), SearchCriteria.Op.EQ);
 	    
@@ -56,7 +57,7 @@ public class SObjectItemDaoImpl extends GenericDaoBase<SObjectItemVO, Long> impl
 	@Override
     public List<SObjectItemVO> getItems(long sobjectID) {
 
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         SearchBuilder<SObjectItemVO> SearchBySobjectID = createSearchBuilder();
         SearchBySobjectID.and("SObjectID", SearchBySobjectID.entity().getId(), SearchCriteria.Op.EQ);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/persist/dao/UserCredentialsDaoImpl.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/persist/dao/UserCredentialsDaoImpl.java b/awsapi/src/com/cloud/bridge/persist/dao/UserCredentialsDaoImpl.java
index c45886f..b60a717 100644
--- a/awsapi/src/com/cloud/bridge/persist/dao/UserCredentialsDaoImpl.java
+++ b/awsapi/src/com/cloud/bridge/persist/dao/UserCredentialsDaoImpl.java
@@ -29,6 +29,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 @Local(value={UserCredentialsDao.class})
@@ -41,7 +42,7 @@ public class UserCredentialsDaoImpl extends GenericDaoBase<UserCredentialsVO, Lo
 	@Override
 	public UserCredentialsVO getByAccessKey( String cloudAccessKey ) {
 	        SearchBuilder<UserCredentialsVO> SearchByAccessKey = createSearchBuilder();
-	        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	    try {
             txn.start();
             SearchByAccessKey.and("AccessKey", SearchByAccessKey.entity()
@@ -60,7 +61,7 @@ public class UserCredentialsDaoImpl extends GenericDaoBase<UserCredentialsVO, Lo
 	public UserCredentialsVO getByCertUniqueId( String certId ) {
 	    SearchBuilder<UserCredentialsVO> SearchByCertID = createSearchBuilder();
 	    SearchByCertID.and("CertUniqueId", SearchByCertID.entity().getCertUniqueId(), SearchCriteria.Op.EQ);
-	    Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+	    TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 	    try {
             txn.start();
             SearchCriteria<UserCredentialsVO> sc = SearchByCertID.create();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
index 50ac26f..1ef04a4 100644
--- a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
+++ b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java
@@ -161,6 +161,7 @@ import com.cloud.bridge.util.ConfigurationHelper;
 import com.cloud.bridge.util.EC2RestAuth;
 import com.cloud.stack.models.CloudStackAccount;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component("EC2RestServlet")
 public class EC2RestServlet extends HttpServlet {
@@ -377,7 +378,7 @@ public class EC2RestServlet extends HttpServlet {
     private void setUserKeys( HttpServletRequest request, HttpServletResponse response ) {
         String[] accessKey = null;
         String[] secretKey = null;
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         try {
             // -> all these parameters are required
             accessKey = request.getParameterValues( "accesskey" );
@@ -398,7 +399,7 @@ public class EC2RestServlet extends HttpServlet {
             return;
         }
         try {
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             txn.start();
             // -> use the keys to see if the account actually exists
             ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
@@ -434,7 +435,7 @@ public class EC2RestServlet extends HttpServlet {
      */
     private void setCertificate( HttpServletRequest request, HttpServletResponse response ) 
             throws Exception { 
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         try {
             // [A] Pull the cert and cloud AccessKey from the request
             String[] certificate = request.getParameterValues( "cert" );
@@ -470,7 +471,7 @@ public class EC2RestServlet extends HttpServlet {
             // [C] Associate the cert's uniqueId with the Cloud API keys
             String uniqueId = AuthenticationUtils.X509CertUniqueId( userCert );
             logger.debug( "SetCertificate, uniqueId: " + uniqueId );
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             txn.start();
             UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
             user.setCertUniqueId(uniqueId);
@@ -505,7 +506,7 @@ public class EC2RestServlet extends HttpServlet {
      */
     private void deleteCertificate( HttpServletRequest request, HttpServletResponse response ) 
             throws Exception {
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         try {
             String [] accessKey = request.getParameterValues( "AWSAccessKeyId" );
             if ( null == accessKey || 0 == accessKey.length ) { 
@@ -527,7 +528,7 @@ public class EC2RestServlet extends HttpServlet {
                 /*	     	     UserCredentialsDao credentialDao = new UserCredentialsDao();
 	     	     credentialDao.setCertificateId( accessKey[0], null );
 
-                 */	     	     txn = Transaction.open(Transaction.AWSAPI_DB);
+                 */	     	     txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
                  UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
                  user.setCertUniqueId(null);
                  ucDao.update(user.getId(), user);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/service/S3RestServlet.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/S3RestServlet.java b/awsapi/src/com/cloud/bridge/service/S3RestServlet.java
index 7e69fd6..192e1a2 100644
--- a/awsapi/src/com/cloud/bridge/service/S3RestServlet.java
+++ b/awsapi/src/com/cloud/bridge/service/S3RestServlet.java
@@ -67,6 +67,7 @@ import com.cloud.bridge.util.RestAuth;
 import com.cloud.bridge.util.S3SoapAuth;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 public class S3RestServlet extends HttpServlet {
     private static final long serialVersionUID = -6168996266762804877L;
     public static final String ENABLE_S3_API="enable.s3.api";
@@ -139,7 +140,7 @@ public class S3RestServlet extends HttpServlet {
      */
     private void processRequest( HttpServletRequest request, HttpServletResponse response, String method ) 
     {
-        Transaction txn = Transaction.open("cloudbridge", Transaction.AWSAPI_DB, true);
+        TransactionLegacy txn = TransactionLegacy.open("cloudbridge", TransactionLegacy.AWSAPI_DB, true);
         try {
             logRequest(request);
 
@@ -274,7 +275,7 @@ public class S3RestServlet extends HttpServlet {
             // -> use the keys to see if the account actually exists
             //ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
             //UserCredentialsDaoImpl credentialDao = new UserCredentialsDao();
-            Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+            TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             txn.start();
             UserCredentialsVO user = new UserCredentialsVO(accessKey[0], secretKey[0]);
             user = ucDao.persist(user);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/service/controller/s3/S3BucketAction.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/controller/s3/S3BucketAction.java b/awsapi/src/com/cloud/bridge/service/controller/s3/S3BucketAction.java
index c98de34..4d7c41a 100644
--- a/awsapi/src/com/cloud/bridge/service/controller/s3/S3BucketAction.java
+++ b/awsapi/src/com/cloud/bridge/service/controller/s3/S3BucketAction.java
@@ -94,6 +94,7 @@ import com.cloud.bridge.util.XSerializer;
 import com.cloud.bridge.util.XSerializerXmlAdapter;
 import com.cloud.bridge.util.XmlHelper;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 
 public class S3BucketAction implements ServletAction {
@@ -371,7 +372,7 @@ public class S3BucketAction implements ServletAction {
             response.setStatus(403);
             return;
         }			
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         // [B] Place the policy into the database over writting an existing policy
         try {
             // -> first make sure that the policy is valid by parsing it

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java b/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java
index 2623efe..0854741 100644
--- a/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java
+++ b/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java
@@ -62,6 +62,7 @@ import com.cloud.bridge.util.OrderedPair;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component
 public class ServiceProvider extends ManagerBase {
@@ -90,7 +91,7 @@ public class ServiceProvider extends ManagerBase {
 
     protected ServiceProvider() throws IOException {
         // register service implementation object
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         txn.close();
     }
 
@@ -183,7 +184,7 @@ public class ServiceProvider extends ManagerBase {
 
     public UserInfo getUserInfo(String accessKey) {
         UserInfo info = new UserInfo();
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         try {
             txn.start();
             UserCredentialsVO cloudKeys = ucDao.getByAccessKey( accessKey ); 
@@ -253,7 +254,7 @@ public class ServiceProvider extends ManagerBase {
 
         multipartDir = properties.getProperty("storage.multipartDir");
 
-        Transaction txn1 = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn1 = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         timer.schedule(getHeartbeatTask(), HEARTBEAT_INTERVAL, HEARTBEAT_INTERVAL);
         txn1.close();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
----------------------------------------------------------------------
diff --git a/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java b/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
index 7beb012..05e87d7 100644
--- a/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
+++ b/awsapi/src/com/cloud/bridge/service/core/s3/S3Engine.java
@@ -86,6 +86,7 @@ import com.cloud.bridge.util.StringHelper;
 import com.cloud.bridge.util.Triple;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 /**
  * The CRUD control actions to be invoked from S3BucketAction or S3ObjectAction.
@@ -195,7 +196,7 @@ public class S3Engine {
         String cannedAccessPolicy = request.getCannedAccess();
         String bucketName = request.getBucketName();
         response.setBucketName( bucketName );
-        Transaction txn= null;
+        TransactionLegacy txn= null;
         verifyBucketName( bucketName, false );
 
         S3PolicyContext context = new S3PolicyContext( PolicyActions.CreateBucket,  bucketName );
@@ -205,7 +206,7 @@ public class S3Engine {
         OrderedPair<SHostVO, String> shost_storagelocation_pair = null;
         boolean success = false;
         try {
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
 
             if (bucketDao.getByName(request.getBucketName()) != null)
                 throw new ObjectAlreadyExistsException("Bucket already exists");
@@ -257,10 +258,10 @@ public class S3Engine {
         String bucketName = request.getBucketName();
         SBucketVO sbucket   = bucketDao.getByName(bucketName);
 
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         if ( sbucket != null ) 
         {	
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             txn.start();
             S3PolicyContext context = new S3PolicyContext( PolicyActions.DeleteBucket, bucketName );
             switch( verifyPolicy( context ))
@@ -699,7 +700,7 @@ public class S3Engine {
         if (null != version)
             httpResp.addHeader("x-amz-version-id", version);
         httpResp.flushBuffer();
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         // [C] Re-assemble the object from its uploaded file parts
         try {
             // explicit transaction control to avoid holding transaction during
@@ -752,11 +753,11 @@ public class S3Engine {
         S3BucketAdapter bucketAdapter = getStorageHostBucketAdapter(host_storagelocation_pair.getFirst());
         String itemFileName = object_objectitem_pair.getSecond().getStoredPath();
         InputStream is = null;
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         try {
             // explicit transaction control to avoid holding transaction during file-copy process
 
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             txn.start();
             is = request.getDataInputStream();
             String md5Checksum = bucketAdapter.saveObject(is, host_storagelocation_pair.getSecond(), bucket.getName(), itemFileName);
@@ -813,11 +814,11 @@ public class S3Engine {
         S3BucketAdapter bucketAdapter =  getStorageHostBucketAdapter(host_storagelocation_pair.getFirst());
         String itemFileName = object_objectitem_pair.getSecond().getStoredPath();
         InputStream is = null;
-        Transaction txn = null;
+        TransactionLegacy txn = null;
         try {
             // explicit transaction control to avoid holding transaction during file-copy process
 
-            txn = Transaction.open(Transaction.AWSAPI_DB);
+            txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             txn.start();
 
             is = request.getInputStream();
@@ -1505,7 +1506,7 @@ public class S3Engine {
         context.setEvalParam( ConditionKeys.Acl, cannedAccessPolicy);
 
         verifyAccess( context, "SBucket", bucket.getId(), SAcl.PERMISSION_WRITE );  // TODO - check this validates plain POSTs
-        Transaction txn = Transaction.open(Transaction.AWSAPI_DB);
+        TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
         txn.start();
 
         // [B] If versioning is off them we over write a null object item
@@ -1554,7 +1555,7 @@ public class S3Engine {
         } 
         else 
         {    
-            Transaction txn1 = Transaction.open(Transaction.AWSAPI_DB);
+            TransactionLegacy txn1 = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB);
             txn1.start();
             // -> there is no object nor an object item
             object = new SObjectVO();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
index 6804dc1..3e684cc 100755
--- a/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/agent/manager/AgentManagerImpl.java
@@ -97,6 +97,7 @@ import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.EntityManager;
 import com.cloud.utils.db.QueryBuilder;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
@@ -355,7 +356,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
     @DB
     protected boolean noDbTxn() {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         return !txn.dbTxnStarted();
     }
 
@@ -1252,7 +1253,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
 
         @Override
         protected void doTask(final Task task) throws Exception {
-            Transaction txn = Transaction.open(Transaction.CLOUD_DB);
+            TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
             try {
                 final Type type = task.getType();
                 if (type == Task.Type.DATA) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
index 07fa73c..204a28e 100755
--- a/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/agent/manager/ClusteredAgentManagerImpl.java
@@ -43,6 +43,8 @@ import javax.naming.ConfigurationException;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 
+import net.sf.ehcache.transaction.local.TransactionListener;
+
 import org.apache.cloudstack.framework.config.ConfigDepot;
 import org.apache.cloudstack.framework.config.ConfigKey;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
@@ -85,6 +87,7 @@ import com.cloud.serializer.GsonHelper;
 import com.cloud.utils.DateUtil;
 import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.QueryBuilder;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
@@ -591,7 +594,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
 
         @Override
         protected void doTask(final Task task) throws Exception {
-            Transaction txn = Transaction.open(Transaction.CLOUD_DB);
+            TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
             try {
                 if (task.getType() != Task.Type.DATA) {
                     super.doTask(task);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 8bf419f..51310da 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -36,7 +36,6 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
-
 import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
@@ -165,6 +164,10 @@ import com.cloud.utils.db.DB;
 import com.cloud.utils.db.EntityManager;
 import com.cloud.utils.db.GlobalLock;
 import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionCallback;
+import com.cloud.utils.db.TransactionCallbackNoReturn;
+import com.cloud.utils.db.TransactionCallbackWithException;
+import com.cloud.utils.db.TransactionStatus;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.exception.ExecutionException;
 import com.cloud.utils.fsm.NoTransitionException;
@@ -311,12 +314,12 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
 
     @Override
     @DB
-    public void allocate(String vmInstanceName, VirtualMachineTemplate template, ServiceOffering serviceOffering, Pair<? extends DiskOffering, Long> rootDiskOffering,
-        LinkedHashMap<? extends DiskOffering, Long> dataDiskOfferings, LinkedHashMap<? extends Network, ? extends NicProfile> auxiliaryNetworks, DeploymentPlan plan,
+    public void allocate(String vmInstanceName, final VirtualMachineTemplate template, ServiceOffering serviceOffering, final Pair<? extends DiskOffering, Long> rootDiskOffering,
+        LinkedHashMap<? extends DiskOffering, Long> dataDiskOfferings, final LinkedHashMap<? extends Network, ? extends NicProfile> auxiliaryNetworks, DeploymentPlan plan,
         HypervisorType hyperType) throws InsufficientCapacityException {
 
         VMInstanceVO vm = _vmDao.findVMByInstanceName(vmInstanceName);
-        Account owner = _entityMgr.findById(Account.class, vm.getAccountId());
+        final Account owner = _entityMgr.findById(Account.class, vm.getAccountId());
 
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Allocating entries for VM: " + vm);
@@ -327,46 +330,48 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
             vm.setPodId(plan.getPodId());
         }
         assert (plan.getClusterId() == null && plan.getPoolId() == null) : "We currently don't support cluster and pool preset yet";
-        vm = _vmDao.persist(vm);
-
-        VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm, template, serviceOffering, null, null);
-
-        Transaction txn = Transaction.currentTxn();
-        txn.start();
-
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Allocating nics for " + vm);
-        }
-
-        try {
-            _networkMgr.allocate(vmProfile, auxiliaryNetworks);
-        } catch (ConcurrentOperationException e) {
-            throw new CloudRuntimeException("Concurrent operation while trying to allocate resources for the VM", e);
-        }
+        final VMInstanceVO vmFinal = _vmDao.persist(vm);
+        final LinkedHashMap<? extends DiskOffering, Long> dataDiskOfferingsFinal = dataDiskOfferings == null ? 
+                new LinkedHashMap<DiskOffering, Long>() : dataDiskOfferings;
 
-        if (dataDiskOfferings == null) {
-            dataDiskOfferings = new LinkedHashMap<DiskOffering, Long>(0);
-        }
 
-        if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Allocating disks for " + vm);
-        }
+        final VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vmFinal, template, serviceOffering, null, null);
 
-        if (template.getFormat() == ImageFormat.ISO) {
-            volumeMgr.allocateRawVolume(Type.ROOT, "ROOT-" + vm.getId(), rootDiskOffering.first(), rootDiskOffering.second(), vm, template, owner);
-        } else if (template.getFormat() == ImageFormat.BAREMETAL) {
-            // Do nothing
-        } else {
-            volumeMgr.allocateTemplatedVolume(Type.ROOT, "ROOT-" + vm.getId(), rootDiskOffering.first(), template, vm, owner);
-        }
-
-        for (Map.Entry<? extends DiskOffering, Long> offering : dataDiskOfferings.entrySet()) {
-            volumeMgr.allocateRawVolume(Type.DATADISK, "DATA-" + vm.getId(), offering.getKey(), offering.getValue(), vm, template, owner);
-        }
+        Transaction.executeWithException(new TransactionCallbackWithException<Object>() {
+            @Override
+            public Object doInTransaction(TransactionStatus status) throws InsufficientCapacityException {
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Allocating nics for " + vmFinal);
+                }
+        
+                try {
+                    _networkMgr.allocate(vmProfile, auxiliaryNetworks);
+                } catch (ConcurrentOperationException e) {
+                    throw new CloudRuntimeException("Concurrent operation while trying to allocate resources for the VM", e);
+                }
+        
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Allocating disks for " + vmFinal);
+                }
+        
+                if (template.getFormat() == ImageFormat.ISO) {
+                    volumeMgr.allocateRawVolume(Type.ROOT, "ROOT-" + vmFinal.getId(), rootDiskOffering.first(), rootDiskOffering.second(), vmFinal, template, owner);
+                } else if (template.getFormat() == ImageFormat.BAREMETAL) {
+                    // Do nothing
+                } else {
+                    volumeMgr.allocateTemplatedVolume(Type.ROOT, "ROOT-" + vmFinal.getId(), rootDiskOffering.first(), template, vmFinal, owner);
+                }
+        
+                for (Map.Entry<? extends DiskOffering, Long> offering : dataDiskOfferingsFinal.entrySet()) {
+                    volumeMgr.allocateRawVolume(Type.DATADISK, "DATA-" + vmFinal.getId(), offering.getKey(), offering.getValue(), vmFinal, template, owner);
+                }
+                
+                return null;
+            }
+        }, InsufficientCapacityException.class);
 
-        txn.commit();
         if (s_logger.isDebugEnabled()) {
-            s_logger.debug("Allocation completed for VM: " + vm);
+            s_logger.debug("Allocation completed for VM: " + vmFinal);
         }
     }
 
@@ -551,37 +556,41 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
     }
 
     @DB
-    protected Ternary<VMInstanceVO, ReservationContext, ItWorkVO> changeToStartState(VirtualMachineGuru vmGuru, VMInstanceVO vm, User caller, Account account)
+    protected Ternary<VMInstanceVO, ReservationContext, ItWorkVO> changeToStartState(VirtualMachineGuru vmGuru, final VMInstanceVO vm, final User caller, final Account account)
         throws ConcurrentOperationException {
         long vmId = vm.getId();
 
         ItWorkVO work = new ItWorkVO(UUID.randomUUID().toString(), _nodeId, State.Starting, vm.getType(), vm.getId());
         int retry = VmOpLockStateRetry.value();
         while (retry-- != 0) {
-            Transaction txn = Transaction.currentTxn();
-            Ternary<VMInstanceVO, ReservationContext, ItWorkVO> result = null;
-            txn.start();
             try {
-                Journal journal = new Journal.LogJournal("Creating " + vm, s_logger);
-                work = _workDao.persist(work);
-                ReservationContextImpl context = new ReservationContextImpl(work.getId(), journal, caller, account);
+                final ItWorkVO workFinal = work;
+                Ternary<VMInstanceVO, ReservationContext, ItWorkVO> result = 
+                        Transaction.executeWithException(new TransactionCallbackWithException<Ternary<VMInstanceVO, ReservationContext, ItWorkVO>>() {
+                    @Override
+                    public Ternary<VMInstanceVO, ReservationContext, ItWorkVO> doInTransaction(TransactionStatus status) throws NoTransitionException {
+                        Journal journal = new Journal.LogJournal("Creating " + vm, s_logger);
+                        ItWorkVO work = _workDao.persist(workFinal);
+                        ReservationContextImpl context = new ReservationContextImpl(work.getId(), journal, caller, account);
+
+                        if (stateTransitTo(vm, Event.StartRequested, null, work.getId())) {
+                            if (s_logger.isDebugEnabled()) {
+                                s_logger.debug("Successfully transitioned to start state for " + vm + " reservation id = " + work.getId());
+                            }
+                            return new Ternary<VMInstanceVO, ReservationContext, ItWorkVO>(vm, context, work);
+                        }
 
-                if (stateTransitTo(vm, Event.StartRequested, null, work.getId())) {
-                    if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("Successfully transitioned to start state for " + vm + " reservation id = " + work.getId());
+                        return new Ternary<VMInstanceVO, ReservationContext, ItWorkVO>(null, null, work);
                     }
-                    result = new Ternary<VMInstanceVO, ReservationContext, ItWorkVO>(vm, context, work);
-                    txn.commit();
+                }, NoTransitionException.class);
+                
+                work = result.third();
+                if (result.first() != null)
                     return result;
-                }
             } catch (NoTransitionException e) {
                 if (s_logger.isDebugEnabled()) {
                     s_logger.debug("Unable to transition into Starting state due to " + e.getMessage());
                 }
-            } finally {
-                if (result == null) {
-                    txn.rollback();
-                }
             }
 
             VMInstanceVO instance = _vmDao.findById(vmId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java
index 2ace8a0..4338548 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Component;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 
 @Component(value="EngineDcDetailsDao")
 @Local(value=DcDetailsDao.class)
@@ -83,7 +83,7 @@ public class DcDetailsDaoImpl extends GenericDaoBase<DcDetailVO, Long> implement
 
     @Override
     public void persist(long dcId, Map<String, String> details) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         SearchCriteria<DcDetailVO> sc = DcSearch.create();
         sc.setParameters("dcId", dcId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java
index e7eea6c..4251baf 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java
@@ -45,7 +45,7 @@ import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Func;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 import com.cloud.utils.exception.CloudRuntimeException;
 
@@ -162,7 +162,7 @@ public class EngineClusterDaoImpl extends GenericDaoBase<EngineClusterVO, Long>
 
     @Override
     public Map<Long, List<Long>> getPodClusterIdMap(List<Long> clusterIds){
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         PreparedStatement pstmt = null;
         Map<Long, List<Long>> result = new HashMap<Long, List<Long>>();
 
@@ -243,7 +243,7 @@ public class EngineClusterDaoImpl extends GenericDaoBase<EngineClusterVO, Long>
 
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         EngineClusterVO cluster = createForUpdate();
         cluster.setName(null);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f62e28c1/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java
index 5d8ef8d..de71053 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java
@@ -40,7 +40,7 @@ import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.SearchBuilder;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SequenceFetcher;
-import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.db.UpdateBuilder;
 import com.cloud.utils.net.NetUtils;
 
@@ -216,7 +216,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
 
     @Override @DB
     public boolean update(Long zoneId, EngineDataCenterVO zone) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         boolean persisted = super.update(zoneId, zone);
         if (!persisted) {
@@ -281,7 +281,7 @@ public class EngineDataCenterDaoImpl extends GenericDaoBase<EngineDataCenterVO,
 
     @Override
     public boolean remove(Long id) {
-        Transaction txn = Transaction.currentTxn();
+        TransactionLegacy txn = TransactionLegacy.currentTxn();
         txn.start();
         EngineDataCenterVO zone = createForUpdate();
         zone.setName(null);


Mime
View raw message