|
100 | 100 | * Interoperability with Jakarta Config is reserved for future versions |
101 | 101 | * of Jakarta Data. |
102 | 102 | * </li> |
103 | | - * <li>If running in a Jakarta EE profile or platform and the entity annotations |
104 | | - * indicate a relational database and the value begins with {@code java:} and |
105 | | - * matches the name of a {@code jakarta.annotation.sql.DataSourceDefinition}, |
106 | | - * the JNDI name of a data source, or a resource reference to a data source, |
107 | | - * then the corresponding {@code javax.sql.DataSource} is used as the data store. |
108 | | - * If the same conditions are met but the value matches a persistence unit |
109 | | - * reference, then the corresponding {@code jakarta.persistence.PersistenceUnit} |
110 | | - * is used as the data store. |
| 103 | + * <li>In a Jakarta EE profile or platform environment, if the repository |
| 104 | + * implementation requires direct access to a {@code javax.sql.DataSource} |
| 105 | + * and if the value begins with {@code java:} and matches the name of a |
| 106 | + * {@code jakarta.annotation.sql.DataSourceDefinition}, the JNDI name of |
| 107 | + * a {@code DataSource}, or a resource reference to a {@code DataSource}, |
| 108 | + * then the corresponding {@code DataSource} obtained from JNDI is used. |
| 109 | + * </li> |
| 110 | + * <li>In a Jakarta EE profile or platform environment, if the repository |
| 111 | + * implementation requires direct access to a Jakarta Persistence |
| 112 | + * {@code jakarta.persistence.EntityManagerFactory} and if the value does |
| 113 | + * not begin with {@code java:} and matches the name of a persistence unit, |
| 114 | + * then the container-managed {@code EntityManagerFactory} for that |
| 115 | + * persistence unit is used, obtained as if it had been injected using the |
| 116 | + * {@code PersistenceUnit} annotation. Or, if the value does begin with |
| 117 | + * {@code java:} and matches the name of a persistence unit reference, |
| 118 | + * then the corresponding {@code EntityManagerFactory} obtained from JNDI |
| 119 | + * is used. |
111 | 120 | * </li> |
112 | 121 | * <li>Otherwise, the value serves as an identifier linking to vendor-specific |
113 | 122 | * configuration for the Jakarta Data provider to interpret in a vendor-specific |
|
0 commit comments