[
http://jira.jboss.com/jira/browse/EJBTHREE-791?page=comments#action_12367025 ]
Nicolas Leroux commented on EJBTHREE-791:
-----------------------------------------
Hi, the problem is not to default to JTA or not. The problem is that it is quite
impossible to use the RESOURCE_LOCAL transaction type.
I completely agree with the fact that it should default to JTA.
However, if you define:
{code}
<persistence-unit transaction-type="RESOURCE_LOCAL">
</persistence-unit>
{code}
I think you should be able to use it as such.
The problem comes from this bit of code:
{code}
if ("RESOURCE_LOCAL".equals(xml.getTransactionType()))
{code{
it should be:
{code}
if (PersistenceUnitTransactionType.RESOURCE_LOCAL.equals(xml.getTransactionType()))
{code}
Deployment fail on non JTA persistence unit
-------------------------------------------
Key: EJBTHREE-791
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-791
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - FD
Reporter: Emmanuel Bernard
Attachments: EJBTHREE-791.patch, EJBTHREE-791.patch, EJBTHREE-791.patch,
EJBTHREE-791.patch
<persistence-unit>
<!-- no jta-datasource defined -->
</persistence-unt>
and
<persistence-unit transaction-type="RESOURCE_LOCAL">
<!-- no jta-datasource defined -->
</persistence-unt>
Seems to fail with
WARN [ServiceController] Problem starting service
persistence.units:ear=jblogApp.ear,jar=jblogBeans.jar,unitName=jblog
java.lang.RuntimeException: You have not defined a jta-data-source for a JTA enabled
persistence context named: jblog
(2) should work
(1) is very much expected from a usability POV. basically, if no jta-datasource is
defined, we should expect a default transaction-type of RESOURCE_LOCAL
Note that you might want to let the persistence provider test such compatibility issues,
since it has more contextual information than the container (ie knows the meaning of the
proprietary properties)
Max can you confirm that my description match your bug.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira