ok sorry to have bothered the list. There was a second persistence.xml
lurking around. After cleaning my shit (and in the meantime cleaning my
pom) all started working the way I want. Thanks Romain for pointing me to
the right direction.

Ron

On Wed Nov 12 2014 at 3:21:01 PM Romain Manni-Bucau <
[email protected]> wrote:

> Hi
>
> are you sure you use the persistence.xml you think? setting provider
> you shouldn't have any issue.
>
> Site note: we have an openejb-core-eclipselink replacing openejb-core
> which comes with eclipselink out of the box
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-11-12 15:16 GMT+01:00 Ron Smits <[email protected]>:
> > I have a small application that uses eclipselink and sqlite. This works
> > perfectly except for the testing. I have no clue how to tell EJBContainer
> > to use eclipselink as provider. It is setup in persistence.xml:
> >
> > <persistence-unit name="evedb" transaction-type="JTA">
> >         <provider>org.eclipse.persistence.jpa.
> PersistenceProvider</provider>
> >         <class>org.ronsmits.eveasset.evedomain.BluePrint</class>
> >         <class>org.ronsmits.eveasset.evedomain.EveItem</class>
> >         <jta-data-source>evedb</jta-data-source>
> >         <properties>
> >             <property name="eclipselink.ddl-generation"
> value="create-tables"/>
> >             <property name="eclipselink.logging.file"
> value="/tmp/output.log"/>
> >             <property name="eclipselink.logging.logger"
> value="JavaLogger"/>
> >             <property name="eclipselink.logging.level" value="SEVERE"/>
> >         </properties>
> >     </persistence-unit>
> >
> > My resource for the database is:
> >
> > <resources>
> >     <Resource id="evedb" type="javax.sql.DataSource">
> >         jdbcDriver = org.sqlite.JDBC
> >         jdbcUrl = jdbc:sqlite:${db}
> >     </Resource>
> > </resources>
> >
> > (The ${db} gets filled in by maven)
> >
> > My test case starts with setting up the EJBContainer:
> >
> >     @Before
> >     public void setUp() throws NamingException {
> >         Properties p = new Properties();
> >         p.put("evedb", "new://Resource?type=DataSource");
> >         p.put("evedb.JdbcDriver", "org.sqlite.JDBC");
> >         p.put("evedb.JdbcUrl",
> > "jdbc:sqlite:/home/ron/Downloads/sqlite-latest.sqlite");
> >         container = EJBContainer.createEJBContainer(p);
> >         container.getContext().bind("inject", this);
> >     }
> >
> > The tests are not even run as EJBContainer tries to start the persistence
> > with openJPA instead of with eclipselink. Now I have seen that there is a
> > tomee-plume package nowadays but I can imagine this has a solution that I
> > am completely overlooking.
> >
> > Any help?
> >
> > Ron
> >
> > I Haven’t Lost My Mind - It’s Backed Up On Disk Somewhere
> >
>

Reply via email to