added maven embedded deployment with mvn tomee:run

This commit is contained in:
Athou
2013-03-22 19:43:19 +01:00
parent bb3431a510
commit c6ec3c9517
5 changed files with 75 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package com.commafeed.backend.dao;
import java.io.Serializable;
import java.util.List;
import javax.annotation.PostConstruct;
@@ -13,9 +14,8 @@ import com.google.common.reflect.TypeToken;
import com.uaihebert.factory.EasyCriteriaFactory;
import com.uaihebert.model.EasyCriteria;
@SuppressWarnings("serial")
public abstract class GenericDAO<T, K> {
public abstract class GenericDAO<T, K> implements Serializable {
private TypeToken<T> type = new TypeToken<T>(getClass()) {
};

View File

@@ -2,6 +2,7 @@ package com.commafeed.backend.dao;
import java.util.List;
import javax.ejb.Stateless;
import javax.inject.Inject;
import com.commafeed.backend.security.PasswordEncryptionService;
@@ -9,6 +10,7 @@ import com.commafeed.frontend.utils.ModelFactory.MF;
import com.commafeed.model.User;
import com.google.common.collect.Iterables;
@Stateless
public class UserService extends GenericDAO<User, Long> {
@Inject

View File

@@ -7,6 +7,7 @@
<persistence-unit name="primary">
<jta-data-source>${jpa.datasource.name}</jta-data-source>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="false" />
<property name="toplink.ddl-generation" value="drop-and-create-tables"/>