Subversion Repositories SmartDukaan

Rev

Rev 68 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68 Rev 193
Line 2... Line 2...
2
 
2
 
3
import in.shop2020.config.ConfigException;
3
import in.shop2020.config.ConfigException;
4
import in.shop2020.thrift.clients.config.ConfigClient;
4
import in.shop2020.thrift.clients.config.ConfigClient;
5
import in.shop2020.utils.Logger;
5
import in.shop2020.utils.Logger;
6
 
6
 
-
 
7
import org.apache.thrift.protocol.TBinaryProtocol;
7
import org.apache.thrift.protocol.TCompactProtocol;
8
import org.apache.thrift.protocol.TCompactProtocol;
8
import org.apache.thrift.protocol.TProtocol;
9
import org.apache.thrift.protocol.TProtocol;
9
import org.apache.thrift.transport.TFramedTransport;
10
import org.apache.thrift.transport.TFramedTransport;
10
import org.apache.thrift.transport.TSocket;
11
import org.apache.thrift.transport.TSocket;
11
import org.apache.thrift.transport.TTransport;
12
import org.apache.thrift.transport.TTransport;
Line 36... Line 37...
36
		Logger.log("Initializing socket infra ", this);
37
		Logger.log("Initializing socket infra ", this);
37
		
38
		
38
		socket = new TSocket(hostname, port);
39
		socket = new TSocket(hostname, port);
39
		socket.setTimeout(SOCKET_TIMEOUT);
40
		socket.setTimeout(SOCKET_TIMEOUT);
40
		transport = new TFramedTransport(socket);
41
		transport = new TFramedTransport(socket);
41
		protocol = new TCompactProtocol(transport);
42
		//protocol = new TCompactProtocol(transport);
-
 
43
		protocol = new TBinaryProtocol(transport);
42
	}
44
	}
43
	
45
	
44
	private String getHost(String key){
46
	private String getHost(String key){
45
		try {
47
		try {
46
			String host = ConfigClient.getClient().get(key);
48
			String host = ConfigClient.getClient().get(key);