I have a question i have an ear with an ejb and web module.

In ejb module i have a persistence.xml which i use for only my ejb's and in
my webapp i have another persistence.xml that i use only for persist data
in my webapp.

As you can see i persist data in ejb module and in the webapp thats why i
have 2 persistence.

But i have a problem, when i deploy the ear file in apps folder i always
get an error:

SEVERE: FAIL ... MyEJBBean: Persistence unit not found for
@PersistenceContext(name="entityManager", unitName="kx_webapp").  Available
units [kx_ejb]

I have 2 datasource (kx_webapp and kx_ejb) in my tomee.xml. Apparently my
webapp try to search the jta-data-source somewhere else instead of itself.

EJBModule -- persistence.xml with jta-data-source: kx_ejb
WebAPP    -- persistence.xml with jta-data-source: kx_webapp

What im doing wrong?

Thanks

Reply via email to