Le 29 janv. 2018 21:49, "gilbertoca" <gilbert...@gmail.com> a écrit :

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.



This is not supported for now, right. We should add a datasource facade to
an already pooled datasource.


How does DataSourceFactory know the definition origin (web.xml, annotation
or application.xml)?
In my case Tomee is not validating the web.xml schema definition for
class-name (which should be one of those interfaces I've mentioned).


Well, it is not a schema (xml) validation but a runtime validation. All
should be the same I think otherwise origin is set in properties/definition
normally.



Regards,
Gilberto

[1]
https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/ds/
PGConnectionPoolDataSource.html


Romain Manni-Bucau wrote
> Hi
>
> Did you check DataSourceFactory? From openejb core module
>
> Le 3 janv. 2018 20:39, "gilbertoca" &lt;

> gilbertoca@

> &gt; 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 in web.xml?
>> The javaee schema definition[2] explicitly states that classname should
>> be
>> an implementation of one of following interfaces:
>>  DataSource, XADataSource or ConnectionPoolDataSource
>>
>> Currently, in my case, TomEE only accepts org.postgresql.Driver.
>> I'm trying to investigate this but I'm a little lost in the tomee
>> repository.
>>
>> Regards,
>>
>> Gilberto
>>
>> [1] https://github.com/payara/Payara/issues/1584#issuecomment-350086108
>> [2]
>> http://www.oracle.com/webfolder/technetwork/jsc/xml/
ns/javaee/index.html#7
>>
>>
>>
>> --
>> 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

Reply via email to