// Path: tcc-core/src/main/java/org/bytesoft/openjtcc/remote/RemoteTerminator.java
// public interface RemoteTerminator extends Prepareable, Committable, Rollbackable, Cleanupable {
// 
// 	public TerminalKey getTerminalKey();
// 
// 	public int hashCode();
// 
// 	public boolean equals(Object obj);
// 
// }
// 
// Path: tcc-core/src/main/java/org/bytesoft/openjtcc/supports/serialize/TerminatorInfo.java
// public class TerminatorInfo implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// 	private String application;
// 	private String endpoint;
// 	private XidImpl branchXid;
// 
// 	public String getApplication() {
// 		return application;
// 	}
// 
// 	public void setApplication(String application) {
// 		this.application = application;
// 	}
// 
// 	public String getEndpoint() {
// 		return endpoint;
// 	}
// 
// 	public void setEndpoint(String endpoint) {
// 		this.endpoint = endpoint;
// 	}
// 
// 	public XidImpl getBranchXid() {
// 		return branchXid;
// 	}
// 
// 	public void setBranchXid(XidImpl branchXid) {
// 		this.branchXid = branchXid;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		int hash = 31;
// 		hash += (this.application == null) ? 13 : this.application.hashCode();
// 		hash += (this.endpoint == null) ? 17 : this.endpoint.hashCode();
// 		hash += (this.branchXid == null) ? 19 : this.branchXid.hashCode();
// 		return hash;
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (obj == null) {
// 			return false;
// 		} else if (TerminatorInfo.class.isInstance(obj) == false) {
// 			return false;
// 		}
// 		TerminatorInfo that = (TerminatorInfo) obj;
// 		boolean appEquals = CommonUtils.equals(this.application, that.application);
// 		boolean endEquals = CommonUtils.equals(this.endpoint, that.endpoint);
// 		boolean xidEquals = CommonUtils.equals(this.branchXid, that.branchXid);
// 		return appEquals && endEquals && xidEquals;
// 	}
// }
// 
// Path: tcc-core/src/main/java/org/bytesoft/openjtcc/supports/serialize/TerminatorMarshaller.java
// public interface TerminatorMarshaller {
// 
// 	public TerminatorInfo marshallTerminator(RemoteTerminator terminator) throws IOException;
// 
// 	public RemoteTerminator unmarshallTerminator(TerminatorInfo info) throws IOException;
// 
// }


import java.io.IOException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import org.bytesoft.openjtcc.remote.RemoteTerminator;
import org.bytesoft.openjtcc.supports.dubbo.RemoteInvocationService;
import org.bytesoft.openjtcc.supports.dubbo.RemoteInvocationServiceMarshaller;
import org.bytesoft.openjtcc.supports.dubbo.internal.RemoteTerminatorHandler;
import org.bytesoft.openjtcc.supports.serialize.TerminatorInfo;
import org.bytesoft.openjtcc.supports.serialize.TerminatorMarshaller;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * Copyright 2014 yangming.liu<liuyangming@gmail.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.openjtcc.supports.marshall;



public class TerminatorMarshallerImpl implements TerminatorMarshaller, RemoteInvocationServiceMarshaller,
		ApplicationContextAware {
	private ApplicationContext applicationContext;

	@Override

// Path: tcc-core/src/main/java/org/bytesoft/openjtcc/remote/RemoteTerminator.java
// public interface RemoteTerminator extends Prepareable, Committable, Rollbackable, Cleanupable {
// 
// 	public TerminalKey getTerminalKey();
// 
// 	public int hashCode();
// 
// 	public boolean equals(Object obj);
// 
// }
// 
// Path: tcc-core/src/main/java/org/bytesoft/openjtcc/supports/serialize/TerminatorInfo.java
// public class TerminatorInfo implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// 	private String application;
// 	private String endpoint;
// 	private XidImpl branchXid;
// 
// 	public String getApplication() {
// 		return application;
// 	}
// 
// 	public void setApplication(String application) {
// 		this.application = application;
// 	}
// 
// 	public String getEndpoint() {
// 		return endpoint;
// 	}
// 
// 	public void setEndpoint(String endpoint) {
// 		this.endpoint = endpoint;
// 	}
// 
// 	public XidImpl getBranchXid() {
// 		return branchXid;
// 	}
// 
// 	public void setBranchXid(XidImpl branchXid) {
// 		this.branchXid = branchXid;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		int hash = 31;
// 		hash += (this.application == null) ? 13 : this.application.hashCode();
// 		hash += (this.endpoint == null) ? 17 : this.endpoint.hashCode();
// 		hash += (this.branchXid == null) ? 19 : this.branchXid.hashCode();
// 		return hash;
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (obj == null) {
// 			return false;
// 		} else if (TerminatorInfo.class.isInstance(obj) == false) {
// 			return false;
// 		}
// 		TerminatorInfo that = (TerminatorInfo) obj;
// 		boolean appEquals = CommonUtils.equals(this.application, that.application);
// 		boolean endEquals = CommonUtils.equals(this.endpoint, that.endpoint);
// 		boolean xidEquals = CommonUtils.equals(this.branchXid, that.branchXid);
// 		return appEquals && endEquals && xidEquals;
// 	}
// }
// 
// Path: tcc-core/src/main/java/org/bytesoft/openjtcc/supports/serialize/TerminatorMarshaller.java
// public interface TerminatorMarshaller {
// 
// 	public TerminatorInfo marshallTerminator(RemoteTerminator terminator) throws IOException;
// 
// 	public RemoteTerminator unmarshallTerminator(TerminatorInfo info) throws IOException;
// 
// }


// Path: tcc-supports/src/main/java/org/bytesoft/openjtcc/supports/marshall/TerminatorMarshallerImpl.java
import java.io.IOException;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import org.bytesoft.openjtcc.remote.RemoteTerminator;
import org.bytesoft.openjtcc.supports.dubbo.RemoteInvocationService;
import org.bytesoft.openjtcc.supports.dubbo.RemoteInvocationServiceMarshaller;
import org.bytesoft.openjtcc.supports.dubbo.internal.RemoteTerminatorHandler;
import org.bytesoft.openjtcc.supports.serialize.TerminatorInfo;
import org.bytesoft.openjtcc.supports.serialize.TerminatorMarshaller;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * Copyright 2014 yangming.liu<liuyangming@gmail.com>.
 *
 * This copyrighted material is made available to anyone wishing to use, modify,
 * copy, or redistribute it subject to the terms and conditions of the GNU
 * Lesser General Public License, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this distribution; if not, see <http://www.gnu.org/licenses/>.
 */
package org.bytesoft.openjtcc.supports.marshall;



public class TerminatorMarshallerImpl implements TerminatorMarshaller, RemoteInvocationServiceMarshaller,
		ApplicationContextAware {
	private ApplicationContext applicationContext;

	@Override

	public TerminatorInfo marshallTerminator(RemoteTerminator terminator) throws IOException {
