Re: web.xml data-source definition

2018-01-30 Thread Romain Manni-Bucau
See it this way: the server role is to wire the properties he has (properties and username, password, ...). Now no server will know it for all possible datasources. Extreme case is you implement your own datasource and call your username property "login". In that case, tomee doesnt know about this

Re: web.xml data-source definition

2018-01-30 Thread gilbertoca
Romain, The DataSourceFactory or other class should do this, no?! Because the application data source is setup correctly in the web.xml file: > > > > > java:app/gaceDS > > > > org.postgresql.ds.PGSimpleDataSource > > > >

Re: web.xml data-source definition

2018-01-30 Thread Romain Manni-Bucau
if you check the javadoc of your connection you will see that the username is set with setUser and not setUsername so you need to set the property "user" instead of using the built-in "username" property. Romain Manni-Bucau @rmannibucau | Blog

Re: web.xml data-source definition

2018-01-30 Thread gilbertoca
Romain Manni-Bucau wrote > Did you set properties properly? Yes [1] https://www.dropbox.com/s/4godaf0hu0234b9/web-xml-data-source.png?dl=0 [2] https://www.dropbox.com/s/rw0ttl950yzxxb7/DataSourceFactory-classname.png?dl=0 [3]

Re: web.xml data-source definition

2018-01-29 Thread Romain Manni-Bucau
Did you set properties properly? Le 29 janv. 2018 22:03, "gilbertoca" a écrit : > Using an simple[1] data-source definition I got this exception: > > > TomEE embedded started on localhost:8080 > > 17:58 [http-nio-8080-exec-1] INFO > >

Re: web.xml data-source definition

2018-01-29 Thread gilbertoca
Using an simple[1] data-source definition I got this exception: > TomEE embedded started on localhost:8080 > 17:58 [http-nio-8080-exec-1] INFO > o.a.s.s.m.AbstractValidatingSessionManager.enableSessionValidation 233 - > Enabling session validation scheduler... > jan 29, 2018 5:58:23 PM

Re: web.xml data-source definition

2018-01-29 Thread Romain Manni-Bucau
Le 29 janv. 2018 21:49, "gilbertoca" a écrit : Hi, It fails here: > CommonDataSource dataSource = (CommonDataSource) recipe.create(); > final boolean isDs = DataSource.class.isInstance(dataSource); Since org.postgresql.ds.PGConnectionPoolDataSource[1]

Re: web.xml data-source definition

2018-01-29 Thread gilbertoca
Hi, It fails here: > CommonDataSource dataSource = (CommonDataSource) recipe.create(); > final boolean isDs = DataSource.class.isInstance(dataSource); Since org.postgresql.ds.PGConnectionPoolDataSource[1] implements ConnectionPoolDataSource and not DataSource. How does

Re: web.xml data-source definition

2018-01-03 Thread Romain Manni-Bucau
Hi Did you check DataSourceFactory? From openejb core module Le 3 janv. 2018 20:39, "gilbertoca" a écrit : > Hello everyone, happy new year!! > > Take this discussion[1] as background, I would like to know where I can > find > the test about the definition of data-source