// Path: dubbo-sample/sample-api/src/main/java/com/bytesvc/ServiceException.java
// public class ServiceException extends Exception {
// 	private static final long serialVersionUID = 1L;
// 
// 	public ServiceException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// Path: dubbo-sample/sample-api/src/main/java/com/bytesvc/service/IAccountService.java
// public interface IAccountService {
// 
// 	public void increaseAmount(String accountId, double amount) throws ServiceException;
// 
// 	public void decreaseAmount(String accountId, double amount) throws ServiceException;
// 
// }


import org.bytesoft.compensable.Compensable;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.bytesvc.ServiceException;
import com.bytesvc.service.IAccountService;
package com.bytesvc.service.impl;



@Service("accountService")
@Compensable(interfaceClass = IAccountService.class, confirmableKey = "accountServiceConfirm", cancellableKey = "accountServiceCancel")
public class AccountServiceImpl implements IAccountService {

	@javax.annotation.Resource(name = "jdbcTemplate1")
	private JdbcTemplate jdbcTemplate;

// Path: dubbo-sample/sample-api/src/main/java/com/bytesvc/ServiceException.java
// public class ServiceException extends Exception {
// 	private static final long serialVersionUID = 1L;
// 
// 	public ServiceException(String message) {
// 		super(message);
// 	}
// 
// }
// 
// Path: dubbo-sample/sample-api/src/main/java/com/bytesvc/service/IAccountService.java
// public interface IAccountService {
// 
// 	public void increaseAmount(String accountId, double amount) throws ServiceException;
// 
// 	public void decreaseAmount(String accountId, double amount) throws ServiceException;
// 
// }


// Path: dubbo-sample/sample-consumer/src/main/java/com/bytesvc/service/impl/AccountServiceImpl.java
import org.bytesoft.compensable.Compensable;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.bytesvc.ServiceException;
import com.bytesvc.service.IAccountService;

package com.bytesvc.service.impl;



@Service("accountService")
@Compensable(interfaceClass = IAccountService.class, confirmableKey = "accountServiceConfirm", cancellableKey = "accountServiceCancel")
public class AccountServiceImpl implements IAccountService {

	@javax.annotation.Resource(name = "jdbcTemplate1")
	private JdbcTemplate jdbcTemplate;

	@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = ServiceException.class)