@onyii5119
I've just tested this:
tomee.xml:
<Resource id="My Test Datasource" type="DataSource">
JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
JdbcUrl jdbc:derby:/opt/databases/test_db;create=true
JtaManaged true
</Resource>
persistence.xml:
<persistence-unit name="test" transaction-type="JTA">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>My Test Datasource</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema"/>
</properties>
</persistence-unit>
HelloEJB:
@PersistenceContext(unitName = "test")
private EntityManager em;
It's working for me.
--
View this message in context:
http://openejb.979440.n4.nabble.com/tomee-ejb-annotation-not-injecting-tp4656726p4656792.html
Sent from the OpenEJB User mailing list archive at Nabble.com.