I added validationQuery to places you mentioned, but still experience same 
problem.

egistry.xml
Database configuration. E.g.,
</dbConfig>
<dbConfig name="WSO2Registry"> 
<url>jdbc:mysql://db.example.com:3306/registry_db?autoReconnect=true</url> 
<userName>user</userName> <password>password</password> 
<driverName>com.mysql.jdbc.Driver</driverName> <maxActive>50</maxActive> 
<maxWait>60000</maxWait> <minIdle>5</minIdle> <validationQuery>SELECT 
1</validationQuery>
</dbConfig>
user-mgt.xml
Configure user store. E.g.,
<Property 
name="url">jdbc:mysql://db.example.com:3306/userstore_db?autoReconnect=true</Property>
<Property name="userName">user</Property>
<Property name="password">password</Property>
<Property name="driverName">com.mysql.jdbc.Driver</Property>
<Property name="maxActive">50</Property>
<Property name="maxWait">60000</Property>
<Property name="minIdle">5</Property>
<Property 
name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>
<Property name="validationQuery">SELECT 1</Property>




________________________________
 From: Anjana Fernando <[email protected]>
To: [email protected] 
Sent: Wednesday, January 4, 2012 11:35 AM
Subject: Re: [Carbon-dev] First Request Fails Between Carbon Servers
 

Hi,

Yeah, as Hiranya mentioned, since we pool database connections, the connections 
that are kept will become stale after a long time of inactivity, so the 
solution would be to test the connection before actually using it, and 
re-create the connections if required. So for this, you simply have to provide 
the validation query in the data service in the data source configuration. The 
same have to be done in user-mgt.xml and also possibly in registry.xml for 
registry database configuration. The property name in user mgt would be 
"validationQuery", and also there have to be an element named "validationQuery" 
in registry.xml.

Cheers,
Anjana.


On Wed, Jan 4, 2012 at 2:34 PM, Hiranya Jayathilaka <[email protected]> wrote:

I think DB connections are becoming stale due to lack of activity. This can be 
avoided by specifying a validation query for the data sources. Anjana should 
know more details.
>
>
>Thanks,
>Hiranya
>
>
>
>On Wed, Jan 4, 2012 at 2:32 PM, Afkham Azeez <[email protected]> wrote:
>
>Did you host the webapp into the super-tenant? Please post the error.
>>
>>
>>On Wed, Jan 4, 2012 at 2:25 PM, metin d <[email protected]> wrote:
>>
>>We deployed a web application on AS, in some parts of web application there 
>>are calls to .dbs on DSS. If we don't use web application a while, then try 
>>to use it, first request to .dbs on DSS fails, but second and 
>>consecutive attempts work without any problem. We observe same situation 
>>during our requests to AuthenticationAdmin service .
>>>
>>>
>>>Do you have any idea about the source of this problem? 
>>>_______________________________________________
>>>Carbon-dev mailing list
>>>[email protected]
>>>http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>>
>>>
>>
>>
>>
>>-- 
>>Afkham Azeez
>>Director of Architecture; WSO2, Inc.; http://wso2.com
>>Member; Apache Software Foundation; http://www.apache.org/
>>
>>
>>email: [email protected]: +94 77 3320919
>>blog: http://blog.afkham.org
>>twitter: http://twitter.com/afkham_azeez
>>linked-in: http://lk.linkedin.com/in/afkhamazeez
>>
>>
>>
>>Lean . Enterprise . Middleware
>>
>>_______________________________________________
>>Carbon-dev mailing list
>>[email protected]
>>http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>
>
>
>-- 
>Hiranya Jayathilaka
>Associate Technical Lead;
>WSO2 Inc.;  http://wso2.org
>E-mail: [email protected];  Mobile: +94 77 633 3491
>Blog: http://techfeast-hiranya.blogspot.com
>
>_______________________________________________
>Carbon-dev mailing list
>[email protected]
>http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>


-- 
Anjana Fernando
Senior Software Engineer
WSO2 Inc. | http://wso2.com/
lean . enterprise . middleware

_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
_______________________________________________
Carbon-dev mailing list
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to