diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 433becfbe6c..a5ab90e078c 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -1270,6 +1270,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian return _routerDao.persist(router); } + @Override public DomainRouterVO findById(long id) { return _routerDao.findById(id); } diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 3740342115f..1e3c01a52d3 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2296,7 +2296,6 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, owner, diskOfferingId, diskSize, networkList, null, group, userData, sshKeyPair, hypervisor, caller); } - @DB @ActionEvent(eventType = EventTypes.EVENT_VM_CREATE, eventDescription = "deploying Vm", create = true) protected UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, String hostName, String displayName, Account owner, Long diskOfferingId, Long diskSize, List networkList, List securityGroupIdList, String group, String userData, String sshKeyPair, HypervisorType hypervisor, Account caller) throws InsufficientCapacityException, ResourceUnavailableException, ConcurrentOperationException, StorageUnavailableException, ResourceAllocationException { diff --git a/utils/src/com/cloud/utils/db/GenericDaoBase.java b/utils/src/com/cloud/utils/db/GenericDaoBase.java index 351f6a0d081..8108edff585 100755 --- a/utils/src/com/cloud/utils/db/GenericDaoBase.java +++ b/utils/src/com/cloud/utils/db/GenericDaoBase.java @@ -875,7 +875,7 @@ public abstract class GenericDaoBase implements Gene return lockRow(id, null); } - @Override + @Override @DB(txn=false) public T lockRow(ID id, Boolean lock) { return findById(id, false, lock); } diff --git a/utils/src/com/cloud/utils/db/Transaction.java b/utils/src/com/cloud/utils/db/Transaction.java index d060d0595eb..4e60c059f23 100755 --- a/utils/src/com/cloud/utils/db/Transaction.java +++ b/utils/src/com/cloud/utils/db/Transaction.java @@ -94,7 +94,7 @@ public class Transaction { Transaction txn = tls.get(); assert txn != null : "No Transaction on stack. Did you mark the method with @DB?"; - assert checkAnnotation(3, txn) : "Did you even read the guide to use Transaction...IOW...other people's code? Try method can't be private. What about @DB? hmmm... could that be it? " + txn.toString(); + assert checkAnnotation(3, txn) : "Did you even read the guide to use Transaction...IOW...other people's code? Try method can't be private. What about @DB? hmmm... could that be it? " + txn; return txn; } @@ -354,7 +354,7 @@ public class Transaction { if (_stmt != null) { try { if (s_stmtLogger.isTraceEnabled()) { - s_stmtLogger.trace("Closing: " + _stmt.toString()); + s_stmtLogger.trace("Closing: " + _stmt); } try { ResultSet rs = _stmt.getResultSet(); @@ -366,7 +366,7 @@ public class Transaction { } _stmt.close(); } catch (final SQLException e) { - s_stmtLogger.trace("Unable to close statement: " + _stmt.toString()); + s_stmtLogger.trace("Unable to close statement: " + _stmt); } finally { _stmt = null; } @@ -721,7 +721,7 @@ public class Transaction { } else if (item.type == STATEMENT) { try { if (s_stmtLogger.isTraceEnabled()) { - s_stmtLogger.trace("Closing: " + ref.toString()); + s_stmtLogger.trace("Closing: " + ref); } Statement stmt = (Statement)ref; try { @@ -734,7 +734,7 @@ public class Transaction { } stmt.close(); } catch (final SQLException e) { - s_stmtLogger.trace("Unable to close statement: " + item.toString()); + s_stmtLogger.trace("Unable to close statement: " + item); } } else if (item.type == ATTACHMENT) { TransactionAttachment att = (TransactionAttachment)item.ref; @@ -783,7 +783,7 @@ public class Transaction { _conn.rollback(sp); } } catch (SQLException e) { - s_logger.warn("Unable to rollback to savepoint " + sp.toString()); + s_logger.warn("Unable to rollback to savepoint " + sp); } if (!hasTxnInStack()) { @@ -899,7 +899,7 @@ public class Transaction { @Override public String toString() { - return type + "-" + (ref != null ? ref.toString() : ""); + return type + "-" + ref; } }