You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jake Farrell (JIRA)" <ji...@apache.org> on 2011/05/06 20:14:03 UTC

[jira] [Resolved] (THRIFT-1163) How can i use multi service in one program?

     [ https://issues.apache.org/jira/browse/THRIFT-1163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell resolved THRIFT-1163.
----------------------------------

    Resolution: Not A Problem
      Assignee: Jake Farrell

Please ask questions like this to the user or dev mailing list. You are able to have multiple service blocks within one definition file. The compiler will generate separate files for each service as shown below. 

gen-cpp/
|-- FirstService.cpp
|-- FirstService.h
|-- FirstService_server.skeleton.cpp
|-- SecondService.cpp
|-- SecondService.h
|-- SecondService_server.skeleton.cpp
|-- test_constants.cpp
|-- test_constants.h
|-- test_types.cpp
`-- test_types.h

gen-java/
|-- FirstService.java
`-- SecondService.java


> How can i use multi service in one program?
> -------------------------------------------
>
>                 Key: THRIFT-1163
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1163
>             Project: Thrift
>          Issue Type: Question
>          Components: C++ - Library
>    Affects Versions: 0.6.1
>            Reporter: qiutao
>            Assignee: Jake Farrell
>              Labels: features
>             Fix For: 0.6.1
>
>
> For example,i have two service like this:
> service FirstService
> {
> 	string hello()
> }
> service SecondService
> {
> 	string hello()
> }
> the generated code have two skeleton server file,how can i use them in one program?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira