Hi,
I have a project scenario in which there are two wars communicating using
thrift.
Thrift code is auto-generated in Java on Windows 7 which creates a service
SampleService.java
The relevant code block is as follows :
THttpClient thc = new THttpClient(WAR2Url, httpClent);
thc.setCustomHeader("Connection", "keep-alive");
TProtocol protocol = new TBinaryProtocol(thc);
SampleService.Client client = new SampleService.Client(protocol);
As you can observe, finally the Thrift generated client is used for
communication.
Now, the new requirements define that the two WARs be merged into one.
The approach that we thought of is changing the code to the following to
prevent too many code changes and still keep interoperability for using HTTP if
required later :
TTransport tt = new TMemoryBuffer(1024);
TProtocol protocol = new TBinaryProtocol(tt);
SampleService.Client client = new SampleService.Client(protocol);
However, though the data seems to be written to the buffer, it does not seem to
be read properly. Also, we wonder how efficient it would be to use this in real
time environments where the load on the server would be large.
We are open for any other way that this can be implemented. Any help would be
really appreciated.
Thanks a lot!
Regards,
Gaurav Sakhardande | Software Engineer | Platform Solutions
[email protected]<mailto:[email protected]>
| Cell : +91 9552027729
Persistent Systems Ltd. | Hinjewadi, Pune - 411 057 | Partners in Innovation |
www.persistentsys.com
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the
property of Persistent Systems Ltd. It is intended only for the use of the
individual or entity to which it is addressed. If you are not the intended
recipient, you are not authorized to read, retain, copy, print, distribute or
use this message. If you have received this communication in error, please
notify the sender and delete all copies of this message. Persistent Systems
Ltd. does not accept any liability for virus infected mails.