Skip to content

Commit

Permalink
#60 fix PU naming error
Browse files Browse the repository at this point in the history
  • Loading branch information
mincong-h committed Jun 21, 2016
1 parent 8a0438e commit 73decd1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/test/java/io/github/mincongh/session/BatchSession.java
Expand Up @@ -30,7 +30,7 @@ public class BatchSession {
// @Stateful bean is created and destroyed when the @Stateful bean is
// destroyed. Simply put, the data in the EntityManager is cached for the
// lifetime of the @Stateful bean
@PersistenceContext(unitName = "us-address", type = PersistenceContextType.EXTENDED)
@PersistenceContext(unitName = "jsr352", type = PersistenceContextType.EXTENDED)
private EntityManager entityManager;

public BatchSession() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/github/mincongh/session/IndexSession.java
Expand Up @@ -29,7 +29,7 @@ public class IndexSession {
// @Stateful bean is created and destroyed when the @Stateful bean is
// destroyed. Simply put, the data in the EntityManager is cached for the
// lifetime of the @Stateful bean
@PersistenceContext(unitName = "us-address", type = PersistenceContextType.EXTENDED)
@PersistenceContext(unitName = "jsr352", type = PersistenceContextType.EXTENDED)
private EntityManager entityManager;

private FullTextEntityManager fullTextEntityManager;
Expand Down
Expand Up @@ -32,7 +32,7 @@ public class SearchSession {
// @Stateful bean is created and destroyed when the @Stateful bean is
// destroyed. Simply put, the data in the EntityManager is cached for the
// lifetime of the @Stateful bean
@PersistenceContext(unitName = "us-address", type = PersistenceContextType.EXTENDED)
@PersistenceContext(unitName = "jsr352", type = PersistenceContextType.EXTENDED)
private EntityManager entityManager;

private FullTextEntityManager fullTextEntityManager;
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/META-INF/persistence.xml
Expand Up @@ -10,9 +10,9 @@
have to create EntityManagerFactory and then can create entity manager
from it.
-->
<persistence-unit name="us-address" transaction-type="JTA">
<persistence-unit name="jsr352" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:/MySqlDS-addresses</jta-data-source>
<jta-data-source>java:/MysqlDS</jta-data-source>
<class>io.github.mincongh.entity.Address</class>
<class>io.github.mincongh.entity.Stock</class>
<properties>
Expand Down

0 comments on commit 73decd1

Please sign in to comment.