• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JEE Persistence doubt

 
Ranch Hand
Posts: 146
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 304
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic