Should application deployment fail if there are multiple persistence
units defined and no unitName is specified? If not, which persistence
unit should be picked?
For example, given the below persistence.xml contents:
"
<persistence
<persistence-unit name="rightpu1">
</persistence-unit>
<persistence-unit name="otherrightpu2">
</persistence-unit>
</persistence>
"
And a persistence context:
"
@PersistenceContext EntityManager randompu;
"
Should "rightpu1" be used or "otherrightpu2"?
Should we have a standard pu property ("javax.persistence.default") that
allows the default pu to be specified for this case?
If the default pu property is not specified, should application
deployment fail for this case? Or should the application deployment
continue with whichever persistence unit the deployer happens to pick?
Scott