You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Mauro Chi <ma...@gmail.com> on 2021/11/24 18:06:05 UTC
Connection not availalable from datasource after some time
https://tomee.apache.org/datasource-config.html
please you know what properties i have to set into resource.xml for the
datasouce for have app all times some connection into pool available?
With my simple configuration already setted for username password , driver
and url i get after some time the web app not respond because connection
from pooli i think is not available.
I have to go into manager app and reload the application for get working.
So i Think i have to set some properties into declaration of datasource
like explained from
Tomee datadource configiration .
But i non know what propertie use for have connection available all times
someone connect to my web app
Thank you into Advance.
Mauro
Re: Connection not availalable from datasource after some time
Posted by naciu <na...@gmail.com>.
thanks a lot
Il Mer 24 Nov 2021, 19:42 Matthew Broadhead
<ma...@nbmlaw.co.uk.invalid> ha scritto:
> i always set datasources in tomee.xml so i don't know about
> WEB-INF/resources.xml. here is an examples of what i use. i have never
> had any connection issues
>
> <Resource id="books" type="javax.sql.DataSource">
> JdbcDriver com.mysql.jdbc.Driver
> JdbcUrl jdbc:mysql://localhost:3306/books
> UserName bookuser
> Password **********
> testOnReturn = true
> testWhileIdle = true
> timeBetweenEvictionRunsMillis = 2
> initialSize = 2
> minIdle = 2
> validationQuery = select 1
> </Resource>
>
> On 24/11/2021 19:06, Mauro Chi wrote:
> > https://tomee.apache.org/datasource-config.html
> >
> > please you know what properties i have to set into resource.xml for the
> > datasouce for have app all times some connection into pool available?
> >
> > With my simple configuration already setted for username password ,
> driver
> > and url i get after some time the web app not respond because connection
> > from pooli i think is not available.
> >
> > I have to go into manager app and reload the application for get working.
> >
> > So i Think i have to set some properties into declaration of datasource
> > like explained from
> > Tomee datadource configiration .
> >
> > But i non know what propertie use for have connection available all times
> > someone connect to my web app
> >
> > Thank you into Advance.
> > Mauro
> >
>
>
Re: Connection not availalable from datasource after some time
Posted by naciu <na...@gmail.com>.
I added the params but still after some time the app is hot available.
The connectiin to db is closed.
I have to reload the web app for get to work
.
http://mauro-hobby-java.it/backbone-jax-cellar/
Il Mer 24 Nov 2021, 19:42 Matthew Broadhead
<ma...@nbmlaw.co.uk.invalid> ha scritto:
> i always set datasources in tomee.xml so i don't know about
> WEB-INF/resources.xml. here is an examples of what i use. i have never
> had any connection issues
>
> <Resource id="books" type="javax.sql.DataSource">
> JdbcDriver com.mysql.jdbc.Driver
> JdbcUrl jdbc:mysql://localhost:3306/books
> UserName bookuser
> Password **********
> testOnReturn = true
> testWhileIdle = true
> timeBetweenEvictionRunsMillis = 2
> initialSize = 2
> minIdle = 2
> validationQuery = select 1
> </Resource>
>
> On 24/11/2021 19:06, Mauro Chi wrote:
> > https://tomee.apache.org/datasource-config.html
> >
> > please you know what properties i have to set into resource.xml for the
> > datasouce for have app all times some connection into pool available?
> >
> > With my simple configuration already setted for username password ,
> driver
> > and url i get after some time the web app not respond because connection
> > from pooli i think is not available.
> >
> > I have to go into manager app and reload the application for get working.
> >
> > So i Think i have to set some properties into declaration of datasource
> > like explained from
> > Tomee datadource configiration .
> >
> > But i non know what propertie use for have connection available all times
> > someone connect to my web app
> >
> > Thank you into Advance.
> > Mauro
> >
>
>
Re: Connection not availalable from datasource after some time
Posted by naciu <na...@gmail.com>.
I added this params into tomee.xml to resource datasource.
testOnReturn = true
testWhileIdle = true
timeBetweenEvictionRunsMillis = 2
initialSize = 2
minIdle = 2
validationQuery = select 1
But not works
Il Mer 24 Nov 2021, 19:42 Matthew Broadhead
<ma...@nbmlaw.co.uk.invalid> ha scritto:
> i always set datasources in tomee.xml so i don't know about
> WEB-INF/resources.xml. here is an examples of what i use. i have never
> had any connection issues
>
> <Resource id="books" type="javax.sql.DataSource">
> JdbcDriver com.mysql.jdbc.Driver
> JdbcUrl jdbc:mysql://localhost:3306/books
> UserName bookuser
> Password **********
> testOnReturn = true
> testWhileIdle = true
> timeBetweenEvictionRunsMillis = 2
> initialSize = 2
> minIdle = 2
> validationQuery = select 1
> </Resource>
>
> On 24/11/2021 19:06, Mauro Chi wrote:
> > https://tomee.apache.org/datasource-config.html
> >
> > please you know what properties i have to set into resource.xml for the
> > datasouce for have app all times some connection into pool available?
> >
> > With my simple configuration already setted for username password ,
> driver
> > and url i get after some time the web app not respond because connection
> > from pooli i think is not available.
> >
> > I have to go into manager app and reload the application for get working.
> >
> > So i Think i have to set some properties into declaration of datasource
> > like explained from
> > Tomee datadource configiration .
> >
> > But i non know what propertie use for have connection available all times
> > someone connect to my web app
> >
> > Thank you into Advance.
> > Mauro
> >
>
>
Re: Connection not availalable from datasource after some time
Posted by Matthew Broadhead <ma...@nbmlaw.co.uk.INVALID>.
i always set datasources in tomee.xml so i don't know about
WEB-INF/resources.xml. here is an examples of what i use. i have never
had any connection issues
<Resource id="books" type="javax.sql.DataSource">
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/books
UserName bookuser
Password **********
testOnReturn = true
testWhileIdle = true
timeBetweenEvictionRunsMillis = 2
initialSize = 2
minIdle = 2
validationQuery = select 1
</Resource>
On 24/11/2021 19:06, Mauro Chi wrote:
> https://tomee.apache.org/datasource-config.html
>
> please you know what properties i have to set into resource.xml for the
> datasouce for have app all times some connection into pool available?
>
> With my simple configuration already setted for username password , driver
> and url i get after some time the web app not respond because connection
> from pooli i think is not available.
>
> I have to go into manager app and reload the application for get working.
>
> So i Think i have to set some properties into declaration of datasource
> like explained from
> Tomee datadource configiration .
>
> But i non know what propertie use for have connection available all times
> someone connect to my web app
>
> Thank you into Advance.
> Mauro
>