tags:

views:

110

answers:

1

Hi,

I am trying to use Seam to persist my jpa entities, when I reference an entity that is in a jar seam says unknown entity. I don't want to add all classes in persistence.xml I want seam to scan my jars and auto detect entities (as done by spring).

what I miss?

A: 

It actually depends a lot on the environment of your application.

If it's Java SE (for example war packaged application deployed on tomcat), your jars are not scanned for entities that compose your persistence unit. Those classes are seen as normal java classes, entity manager doesn't care about them that much... And you have to point them manually, or switch to Java EE and ear...

Michal
I am deploying a war to JBoss AS, and since I am using maven I cannot use jar-file property, have to list classes.
Noura