Questions tagged [persistence-unit]

Persistence Unit is a logical grouping of user defined persistable classes (entity classes, embeddable classes and mapped superclasses) with related settings.

80 questions
0
votes
1 answer

Wildfly 8.2.0.Final: Misconfiguration because of example datasource or persistence.xml?

I have three datasources configured in my persistence.xml:
Bevor
  • 8,396
  • 15
  • 77
  • 141
0
votes
2 answers

Seam - Multiple Persistence Units

Does Seam support multiple persistence units in its configuration? Also, when would you want to have or need multiple persistence units? I am working on a generic component and right now, it only supports a single persistence unit which makes sense…
Walter White
0
votes
1 answer

Spring - two persistence units with different JPA providers

Is it possible to have two persistence units, one with Hibernate to work with some entities and another with EclipseLink to work with other entities in Spring framework?
0
votes
0 answers

Unable to build entity manager factory on Jelastic Enviroment

I have an webapp that work like a charm at localhost, but when I deploy in on a Tomcat 8 + Java 8 + Postgres 9.3 Jelastic Enviroment I get the following exception when trying to access the database: 2015-01-28 18:06:11 HibernatePersistence [WARN]…
Marcos J.C Kichel
  • 6,887
  • 8
  • 38
  • 78
0
votes
1 answer

JPA+hibernate+spring, 2 separate tables in same DB

I'm trying to write a single page app which will persist the current users into a database table(HSQL) and also a list of "stories"(just 1 liners) into a separate table (in same DB) I have 2 POJOs, User and Story. Then 2 dtos, 2 repositories etc but…
Phil
  • 494
  • 2
  • 21
0
votes
0 answers

Spring JPA and Sharing Entity Manager across multiple WARS and @Persistence Context thread safety

I read about about Persistence Context but not able to get a clear picture about my doubts which are as follows. 1. I have a DAO class which as a @PersistenceContext(unitName="") private EntityManager entityManager and from my Service method i am…
Art
  • 414
  • 7
  • 24
0
votes
1 answer

Packaging persistence.xml outside of jar with OpenJPA

So I'm using JPA (OpenJPA 2.3.0 implementation) in perhaps a rather unconventional way. I'm writing a piece of software that will maintain some personnel data and assign work to said personnel. What type of work it assigns is undefined - the user…
mtelewicz
  • 1
  • 1
0
votes
2 answers

use of EntityManagerFactory causing duplicate primary key exceptions

Hey guys, my goal is create an EntityManager using properties dependent on which database is in use. I've seen something like this done in all my Google searches(I made the code more basic for the purpose of this question): @PersistenceUnit private…
bradd
  • 13
  • 4
0
votes
1 answer

When/How does jdbc percistency enities get created

Question : When and how do the JDBC tables get created ? Cause the wierd thing is that i can't find any User tabel. I find it wierd that there is a tabel for the many-on-many relationship between User and Dish yet there is no User tabel to store the…
MrMe TumbsUp
  • 416
  • 1
  • 4
  • 17
0
votes
1 answer

Adding separate persistenceUnit still looks at broadleaf own entities and fails

I followed this tutorial and set off to add another persistence unit pointing to a separate database. It should not share broadleaf own entities. So... The core project now holds applicationContext.xml with these new beans: