i converted your project to maven and use this config file:
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<Resource id="app" type="javax.sql.DataSource">
JdbcUrl = jdbc:hsqldb:mem:app
</Resource>
<Resource id="portal" type="javax.sql.DataSource">
JdbcUrl = jdbc:hsqldb:mem:portal
</Resource>
</tomee>
and it worked great with the following eclipselink:
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.3.0</version>
</dependency>
Side note: ant netbeans project don't build without netbeans
*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*
2013/6/4 Dmitrijs Litajevs <[email protected]>
> I don't do integration tests yet.
> But i setuped a sample ant project.
> If i use open ejb everything seems to be correct.
> If i use eclipselink(2.2 or 2.5) then I read from the same database.
>
>
> On Tue, Jun 4, 2013 at 9:56 AM, Romain Manni-Bucau
> <[email protected]>wrote:
>
>> Hmm looks fine, can you reproduce the issue with a unit test?
>> Le 4 juin 2013 08:00, "vhubuo" <[email protected]> a écrit :
>>
>> > tomee.xml
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <tomee>
>> >
>> >
>> >
>> >
>> > <Resource id="portal-jta" type="javax.sql.DataSource">
>> > # configure the pool
>> > DataSourceCreator = tomcat
>> >
>> > # it is a jta datasource
>> > JtaManaged = true
>> >
>> > # tomcat pool configuration
>> > driverClassName = org.postgresql.Driver
>> > url = jdbc:postgresql://192.168.10.161:5432/portal
>> > username = portal
>> > password = azm
>> > validationQuery = SELECT 1
>> > jmxEnabled = true # specific to tomcat pooling
>> > stringtype = unspecified
>> > </Resource>
>> > <Resource id="db-jta" type="javax.sql.DataSource">
>> > # configure the pool
>> > DataSourceCreator = tomcat
>> >
>> > # it is a jta datasource
>> > JtaManaged = true
>> >
>> > # tomcat pool configuration
>> > driverClassName = org.postgresql.Driver
>> > url = jdbc:postgresql://192.168.10.161:5432/app
>> > username = app
>> > password = azm
>> > validationQuery = SELECT 1
>> > jmxEnabled = true # specific to tomcat pooling
>> > stringtype = unspecified
>> > </Resource>
>> > </tomee>
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://openejb.979440.n4.nabble.com/Eclipse-link-loads-only-first-datasource-from-persistence-xml-tp4663432p4663451.html
>> > Sent from the OpenEJB User mailing list archive at Nabble.com.
>> >
>>
>
>