Romain,
The DataSourceFactory or other class should do this, no?! Because the
application data source is setup correctly in the web.xml file:
>
> <data-source>
>
> <name>
> java:app/gaceDS
> </name>
>
> <class-name>
> org.postgresql.ds.PGSimpleDataSource
> </class-name>
>
> <url>
> jdbc:postgresql://srv-banco-dev:5433/teste
> </url>
>
> <user>
> gace_user
> </user>
>
> <password>
> gace_user
> </password>
>
> <property>
>
> <name>
> ${data-source.property-name}
> </name>
>
> <value>
> ${data-source.property-valor}
> </value>
>
> </property>
>
>
> <transactional>
> true
> </transactional>
>
> <isolation-level>
> TRANSACTION_READ_COMMITTED
> </isolation-level>
>
> <initial-pool-size>
> 2
> </initial-pool-size>
>
> <max-pool-size>
> 10
> </max-pool-size>
>
> <min-pool-size>
> 5
> </min-pool-size>
>
> <max-idle-time>
> 1800
> </max-idle-time>
>
> <max-statements>
> 0
> </max-statements>
>
> </data-source>
Romain Manni-Bucau wrote
> 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 <https://twitter.com/rmannibucau> | Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau>
>
> 2018-01-30 14:27 GMT+01:00 gilbertoca <
> 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]
>> https://www.dropbox.com/s/nghczwady03ym2v/DataSourceFactory-ds-
>> properties.png?dl=0
>>
>>
>>
>>
>>
>> --
>> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
>> f979441.html
>>
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html