Author: bleny Date: 2013-06-20 17:07:05 +0200 (Thu, 20 Jun 2013) New Revision: 247 Url: http://forge.codelutin.com/projects/franciaflex-magalie/repository/revisions... Log: update to last modifications of nuiton-jpa, use new NamingStrategy Removed: trunk/magalie-persistence/src/test/java/com/franciaflex/magalie/PersistenceTest.java Modified: trunk/magalie-persistence/pom.xml trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/JpaMagaliePersistenceContext.java trunk/magalie-persistence/src/main/resources/magalie.properties trunk/magalie-services/src/test/resources/log4j.properties trunk/magalie-web/src/main/webapp/WEB-INF/web.xml trunk/pom.xml Modified: trunk/magalie-persistence/pom.xml =================================================================== --- trunk/magalie-persistence/pom.xml 2013-06-12 08:58:57 UTC (rev 246) +++ trunk/magalie-persistence/pom.xml 2013-06-20 15:07:05 UTC (rev 247) @@ -25,6 +25,11 @@ </dependency> <dependency> + <groupId>org.nuiton.jpa</groupId> + <artifactId>nuiton-jpa-hibernate</artifactId> + </dependency> + + <dependency> <groupId>org.hibernate.javax.persistence</groupId> <artifactId>hibernate-jpa-2.0-api</artifactId> </dependency> @@ -178,7 +183,16 @@ </executions> <configuration> <target>SCRIPT</target> + <hibernateProperties>${maven.src.dir}/main/resources/magalie.properties</hibernateProperties> </configuration> + <dependencies> + <!-- for the oracle naming strategy --> + <dependency> + <groupId>org.nuiton.jpa</groupId> + <artifactId>nuiton-jpa-hibernate</artifactId> + <version>${nuitonJpaVersion}</version> + </dependency> + </dependencies> </plugin> </plugins> </build> Modified: trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/JpaMagaliePersistenceContext.java =================================================================== --- trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/JpaMagaliePersistenceContext.java 2013-06-12 08:58:57 UTC (rev 246) +++ trunk/magalie-persistence/src/main/java/com/franciaflex/magalie/persistence/JpaMagaliePersistenceContext.java 2013-06-20 15:07:05 UTC (rev 247) @@ -23,7 +23,7 @@ * #L% */ -import org.nuiton.jpa.api.hibernate.HibernateUtil; +import org.nuiton.jpa.hibernate.HibernateUtil; import javax.persistence.EntityManager; Modified: trunk/magalie-persistence/src/main/resources/magalie.properties =================================================================== --- trunk/magalie-persistence/src/main/resources/magalie.properties 2013-06-12 08:58:57 UTC (rev 246) +++ trunk/magalie-persistence/src/main/resources/magalie.properties 2013-06-20 15:07:05 UTC (rev 247) @@ -28,7 +28,8 @@ hibernate.hbm2ddl.auto=update hibernate.show_sql=false hibernate.format_sql=true -hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy +# hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy +hibernate.ejb.naming_strategy=org.nuiton.jpa.hibernate.OracleCompliantImprovedNamingStrategy hibernate.c3p0.min_size=3 hibernate.c3p0.max_size=5 Deleted: trunk/magalie-persistence/src/test/java/com/franciaflex/magalie/PersistenceTest.java =================================================================== --- trunk/magalie-persistence/src/test/java/com/franciaflex/magalie/PersistenceTest.java 2013-06-12 08:58:57 UTC (rev 246) +++ trunk/magalie-persistence/src/test/java/com/franciaflex/magalie/PersistenceTest.java 2013-06-20 15:07:05 UTC (rev 247) @@ -1,71 +0,0 @@ -package com.franciaflex.magalie; - -/* - * #%L - * MagaLiE :: Persistence - * $Id:$ - * $HeadURL:$ - * %% - * Copyright (C) 2013 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -import org.junit.Test; - -public class PersistenceTest { - - @Test - public void testName() throws Exception { - -// MagalieFixtures fixtures = new MagalieFixtures("fixtures"); -// -// Article article = fixtures.fixture("article2"); -// -// System.out.println(article); -// -// MagalieApplicationConfig applicationConfig = new MagalieApplicationConfig(); -// -// Map<String, Object> jpaParameters = applicationConfig.getJpaParameters(); -// -// EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("magaliePersistenceUnit", jpaParameters); -// -// EntityManager entityManager = entityManagerFactory.createEntityManager(); -// -// entityManager.getTransaction().begin(); -// -//// entityManager.persist(new MagalieUser()); -//// entityManager.persist(new Article()); -//// entityManager.persist(new StoredArticle()); -//// entityManager.persist(new Location()); -//// entityManager.persist(new RequestedArticle()); -// -//// entityManager.persist(new LocationError()); -//// entityManager.persist(new StorageMovement()); -// -// List<Location> storageMovements = fixtures.fixture("storageMovements"); -// -// for (Location location : storageMovements) { -// -// entityManager.persist(location); -// -// } -// -// entityManager.getTransaction().commit(); -// -// entityManager.close(); - - } -} Modified: trunk/magalie-services/src/test/resources/log4j.properties =================================================================== --- trunk/magalie-services/src/test/resources/log4j.properties 2013-06-12 08:58:57 UTC (rev 246) +++ trunk/magalie-services/src/test/resources/log4j.properties 2013-06-20 15:07:05 UTC (rev 247) @@ -29,4 +29,4 @@ # log4j.logger.com.franciaflex.magalie=TRACE # log4j.logger.org.hibernate.tool.hbm2ddl.SchemaExport=FATAL -# log4j.logger.org.nuiton.jpa.api.hibernate.HibernateUtil=DEBUG +# log4j.logger.org.nuiton.jpa.hibernate.HibernateUtil=DEBUG Modified: trunk/magalie-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/magalie-web/src/main/webapp/WEB-INF/web.xml 2013-06-12 08:58:57 UTC (rev 246) +++ trunk/magalie-web/src/main/webapp/WEB-INF/web.xml 2013-06-20 15:07:05 UTC (rev 247) @@ -28,7 +28,6 @@ <display-name>MagaLiE ${project.version}</display-name> - <!-- Set timeout to 10 hours, see EVO#271 --> <session-config> <session-timeout>600</session-timeout> </session-config> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2013-06-12 08:58:57 UTC (rev 246) +++ trunk/pom.xml 2013-06-20 15:07:05 UTC (rev 247) @@ -224,6 +224,12 @@ <artifactId>nuiton-jpa-api</artifactId> <version>${nuitonJpaVersion}</version> </dependency> + + <dependency> + <groupId>org.nuiton.jpa</groupId> + <artifactId>nuiton-jpa-hibernate</artifactId> + <version>${nuitonJpaVersion}</version> + </dependency> <dependency> <groupId>org.nuiton.jpa</groupId> @@ -339,7 +345,7 @@ <plugin> <groupId>de.juplo</groupId> <artifactId>hibernate4-maven-plugin</artifactId> - <version>1.0.1</version> + <version>1.0.2-SNAPSHOT</version> </plugin> </plugins>