The recent discussion on the user's list on JPA integration is quite
interesting. The question is whether Tapestry should automatically add
entities found anywhere on the classpath to the EntityManagers. Here is the
link to the discussion:

http://markmail.org/message/wb3iu3adpotbephh

Currently it works as:

1) if there is only a single persistence unit configured, only entities from
app's entities package are automatically added to the EntityManager. This
conforms to behavior of the Hibenrate library and works out of the box.
However, this conflicts with the JPA specification in some way. JPA
specification says that <exclude-unlisted-classes> controls whether
auto-scanning should be done or not. Currently, this element is ignored in
Tapestry.

2) If multiple persistence units are configured, no auto-scanning happens.
None of the entities is added to any EntityManager. When discovering an
entity class on the classpath, Tapestry can't know to which EntityManager it
belongs. It also doesn't make sense to add all the entities to all the
EntityManagers. So, when using multiple persistence unit, the user needs to
add the entities explicitly.

Any feedback? Ideas?

-- 
Best regards,

Igor Drobiazko
http://tapestry5.de

Reply via email to