CLOUDSTACK-305. Everytime a SOAP call is made some transactions are rolled back because the transactions are not committed.

This commit is contained in:
Likitha Shetty 2013-06-24 14:02:19 +05:30
parent 383e4e7128
commit f00ebad1c5
7 changed files with 18 additions and 13 deletions

View File

@ -54,7 +54,8 @@ public class CloudStackConfigurationDaoImpl extends GenericDaoBase<CloudStackCon
}
return configItem.getValue();
}finally {
txn.commit();
txn.close();
}
}

View File

@ -50,6 +50,7 @@ public class CloudStackSvcOfferingDaoImpl extends GenericDaoBase<CloudStackServi
return findOneBy(sc);
}finally {
txn.commit();
txn.close();
}
@ -68,6 +69,7 @@ public class CloudStackSvcOfferingDaoImpl extends GenericDaoBase<CloudStackServi
return findOneBy(sc);
}finally {
txn.commit();
txn.close();
}

View File

@ -55,6 +55,7 @@ public class CloudStackUserDaoImpl extends GenericDaoBase<CloudStackUserVO, Stri
}
return cloudSecretKey;
} finally {
txn.commit();
txn.close();
}
}

View File

@ -44,10 +44,10 @@ public class MHostDaoImpl extends GenericDaoBase<MHostVO, Long> implements MHost
SearchCriteria<MHostVO> sc = NameSearch.create();
sc.setParameters("MHostKey", hostKey);
return findOneBy(sc);
}finally {
txn.close();
}
} finally {
txn.commit();
txn.close();
}
}
@Override

View File

@ -43,7 +43,8 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
try {
txn.start();
return listAll().size();
}finally {
} finally {
txn.commit();
txn.close();
}
@ -61,8 +62,8 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
sc.setParameters("AmazonEC2Offering", amazonEC2Offering);
return findOneBy(sc).getCloudstackOffering();
} finally {
txn.commit();
txn.close();
}
}
@ -79,8 +80,8 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
SearchCriteria<OfferingBundleVO> sc = searchByAmazon.create();
sc.setParameters("CloudStackOffering", cloudStackOffering);
return findOneBy(sc).getAmazonOffering();
} finally {
txn.commit();
txn.close();
}
}
@ -109,7 +110,6 @@ public class OfferingDaoImpl extends GenericDaoBase<OfferingBundleVO, Long> impl
offering = persist(offering);
else
update(offering.getID(), offering);
txn.commit();
} finally {
txn.close();

View File

@ -42,8 +42,8 @@ public class SHostDaoImpl extends GenericDaoBase<SHostVO, Long> implements SHost
SearchCriteria<SHostVO> sc = HostSearch.create();
sc.setParameters("Host", host);
return findOneBy(sc);
}finally {
} finally {
txn.commit();
txn.close();
}
@ -62,8 +62,8 @@ public class SHostDaoImpl extends GenericDaoBase<SHostVO, Long> implements SHost
sc.setParameters("MHostID", mhostId);
sc.setParameters("ExportRoot", storageRoot);
return findOneBy(sc);
}finally {
} finally {
txn.commit();
txn.close();
}
}

View File

@ -67,6 +67,7 @@ public class UserCredentialsDaoImpl extends GenericDaoBase<UserCredentialsVO, Lo
sc.setParameters("CertUniqueId", certId);
return findOneBy(sc);
}finally {
txn.commit();
txn.close();
}