Maybe Hibernate's as POS, maybe not. My point is Hibernate's not the
other serialization framework people want to use in the same project
as Thrift.

On Fri, Dec 5, 2014 at 10:27 AM, Matt Chambers <[email protected]> wrote:
>
> Hibernate is always in the way.
>
> Usually I just slap an HTTP Servlet up to serve my thrift services, then 
> people can use the thrift jquery client on top of my existing service 
> instance that is already being served out by another thrift server.
>
> public class ThriftServlet extends TServlet implements HttpRequestHandler {
>
>     @Autowired
>     public ThriftServlet(PlowRpcService.Iface service) {
>         super(new PlowRpcService.Processor<PlowRpcService.Iface>(service), 
> new TJSONProtocol.Factory());
>     }
>
>     @Override
>     public void handleRequest(HttpServletRequest req, HttpServletResponse rsp)
>             throws ServletException, IOException {
>         doPost(req, rsp);
>     }
> }
>
> -Matt
>
> On Dec 5, 2014, at 12:35 PM, Stuart Reynolds <[email protected]> wrote:
>
>> Thanks -- I know about RowMapper (and many other workarounds).
>> Hibernate is one of many serialization frameworks I work with (I'm
>> happy with it, for the most part, and go around it when it gets in the
>> way).
>>
>> We also have a REST interface, and would like JSON or XML
>> serialization of our business object. Here, again, I'd like to
>> serialize these objects as plain JSON (not thrift JSON which adds
>> considerable requirements on a REST client). Allowing Thrift exclusive
>> ownership of the object definitions is a hindrance.
>>
>> - Stuart
>>
>>
>> On Fri, Dec 5, 2014 at 8:25 AM, Matt Chambers <[email protected]> wrote:
>>> Correction
>>>
>>> public List<ProjectT> getAll() {
>>>        return jdbc.query("SELECT * FROM project", MAPPER);
>>> }
>>>
>>> On Dec 5, 2014, at 11:21 AM, Matt Chambers <[email protected]> wrote:
>>>
>>>> public List<ProjectT> getAll() {
>>>>      return jdbc.query("SELECT * FROM project");
>>>> }
>>>
>

Reply via email to