Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JEE Persistence doubt  RSS feed

 
Adolfo Eloy
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks,

I'd like to know if all JEE applications must use jta-datasource/non-jta-datasource transaction type instead of to use RESOURCE_LOCAL.
When I try to use JBoss I can't deploy my app with RESOURCE_LOCAL but with Tomcat I have no errors.

The following message shows what JBoss returns when I try to start my application server.

---------------------------------------------------------------------------------------------------------------------------------------
DEPLOYMENTS IN ERROR:
Deployment "persistence.unit:unitName=#webjpa" is in error due to the following reason(s):
java.lang.RuntimeException: Specification violation [EJB3 JPA 6.2.1.2] -
You have not defined a jta-data-source for a JTA enabled persistence context named: webjpa
---------------------------------------------------------------------------------------------------------------------------------------

Thanks
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most JPA providers will actually run just fine in non-managed mode inside a Java EE container.
In this case, however, the container seems to be short-circuiting it and completely disallowing it from happening.
This is a problem with the JBoss container, not the JPA persistence provider.

Note: The error is incorrect. It is not a spec violation; it is simply not defined by the spec at all.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!