[ 
https://issues.apache.org/jira/browse/TAJO-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13919060#comment-13919060
 ] 

hyoungjunkim commented on TAJO-646:
-----------------------------------

TajoClient has its own a ConnectionPool for thread safety. But  in the previous 
implementation ServerCallable class calls  RpcConnectionPool.getPool() which is 
shared. In this patch I changed that ServerCallable's constructor has 
ConnectionPool parameter.
Please review this patch. Thanks

> TajoClient is blocked while main thread finished.
> -------------------------------------------------
>
>                 Key: TAJO-646
>                 URL: https://issues.apache.org/jira/browse/TAJO-646
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: hyoungjunkim
>            Assignee: hyoungjunkim
>         Attachments: TAJO-646.patch
>
>
> I tested Tajo JDBC Driver like bellow. After closing connection the TestCase 
> still running. 
> {code}
> public static void main(String[] args) throws Exception {
>       Class.forName("org.apache.tajo.jdbc.TajoDriver").newInstance();
>       Connection conn = DriverManager
>                       .getConnection("jdbc:tajo://127.0.0.1:26002");
>       Statement stmt = null;
>       ResultSet rs = null;
>       try {
>               stmt = conn.createStatement();
>               rs = stmt.executeQuery("select * from table1");
>               while (rs.next()) {
>                       System.out.println(rs.getString(1) + "," + 
> rs.getString(3));
>               }
>       } finally {
>               if (rs != null) rs.close();
>               if (stmt != null) stmt.close();
>               if (conn != null) conn.close();
>       }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to