You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Maarten Kesselaers (JIRA)" <ji...@apache.org> on 2016/10/05 12:23:20 UTC

[jira] [Commented] (METAMODEL-1121) How to set socket timeout while connecting with the SQL SERVER database using Apache Meta-model

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

Maarten Kesselaers commented on METAMODEL-1121:
-----------------------------------------------

As I found out in the code, the default LoginTimeOut is set to 0 which is infinite.
Using setLoginTimeout is indeed the right method for this problem.

> How to set socket timeout while connecting with the SQL SERVER database using Apache Meta-model 
> ------------------------------------------------------------------------------------------------
>
>                 Key: METAMODEL-1121
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1121
>             Project: Apache MetaModel
>          Issue Type: Bug
>    Affects Versions: 4.5.4
>         Environment: linux, maven project, SQL SERVER 2008 R2
>            Reporter: Ashish Pancholi
>              Labels: newbie
>             Fix For: 4.5.5
>
>
> I am using the latest version of Apache Meta-model and trying to connect with SQL Server using
> {code} 
> DriverManager.getConnection(String url,
>         String user, String password) throws SQLException
> {code}
>  but it stuck for 6 hours now therefore I need to set a socket time out. I saw a method 
> {code}
> public static void setLoginTimeout(int seconds) {
>         loginTimeout = seconds;
> }
> {code}
> Does it for the setting a socket time out? Please help. Thanks in advance. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)