HHH-3580 fixed some more tests and enabled svn:keywrds substitution on all java files
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15483 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
08b6d1ea13
commit
30afc77a79
|
@ -29,7 +29,6 @@
|
||||||
|
|
||||||
<target name="packexploded">
|
<target name="packexploded">
|
||||||
<property name="extension" value="jar"/>
|
<property name="extension" value="jar"/>
|
||||||
<!-- property name="jarname"/ -->
|
|
||||||
<mkdir dir="${package.dir}/${jarname}.${extension}"/>
|
<mkdir dir="${package.dir}/${jarname}.${extension}"/>
|
||||||
<copy todir="${package.dir}/${jarname}.${extension}">
|
<copy todir="${package.dir}/${jarname}.${extension}">
|
||||||
<fileset dir="${classes.dir}">
|
<fileset dir="${classes.dir}">
|
||||||
|
@ -73,7 +72,6 @@
|
||||||
</antcall>
|
</antcall>
|
||||||
|
|
||||||
<!-- nested jar -->
|
<!-- nested jar -->
|
||||||
<!--
|
|
||||||
<jar destfile="${package.dir}/nestedjar.ear">
|
<jar destfile="${package.dir}/nestedjar.ear">
|
||||||
<fileset dir="${package.dir}">
|
<fileset dir="${package.dir}">
|
||||||
<include name="defaultpar.par"/>
|
<include name="defaultpar.par"/>
|
||||||
|
@ -95,6 +93,5 @@
|
||||||
<param name="extension" value="par"/>
|
<param name="extension" value="par"/>
|
||||||
<param name="jarname" value="explodedpar"/>
|
<param name="jarname" value="explodedpar"/>
|
||||||
</antcall>
|
</antcall>
|
||||||
-->
|
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -159,13 +159,17 @@
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<additionalClasspathElements>
|
<additionalClasspathElements>
|
||||||
<additionalClasspathElement>${basedir}/target/test-packages/excludehbmpar.par</additionalClasspathElement>
|
|
||||||
<additionalClasspathElement>${basedir}/target/test-packages/defaultpar.par</additionalClasspathElement>
|
|
||||||
<additionalClasspathElement>${basedir}/target/test-packages/cfgxmlpar.par</additionalClasspathElement>
|
<additionalClasspathElement>${basedir}/target/test-packages/cfgxmlpar.par</additionalClasspathElement>
|
||||||
|
<additionalClasspathElement>${basedir}/target/test-packages/defaultpar.par</additionalClasspathElement>
|
||||||
|
<additionalClasspathElement>${basedir}/target/test-packages/excludehbmpar.par</additionalClasspathElement>
|
||||||
<additionalClasspathElement>${basedir}/target/test-packages/explicitpar.par</additionalClasspathElement>
|
<additionalClasspathElement>${basedir}/target/test-packages/explicitpar.par</additionalClasspathElement>
|
||||||
|
<additionalClasspathElement>${basedir}/target/test-packages/explodedpar.par</additionalClasspathElement>
|
||||||
<additionalClasspathElement>${basedir}/target/test-packages/externaljar.jar</additionalClasspathElement>
|
<additionalClasspathElement>${basedir}/target/test-packages/externaljar.jar</additionalClasspathElement>
|
||||||
|
<additionalClasspathElement>${basedir}/target/test-packages/nesteddir.ear</additionalClasspathElement>
|
||||||
|
<additionalClasspathElement>${basedir}/target/test-packages/nestedjar.ear</additionalClasspathElement>
|
||||||
<additionalClasspathElement>${basedir}/target/test-packages/overridenpar.jar</additionalClasspathElement>
|
<additionalClasspathElement>${basedir}/target/test-packages/overridenpar.jar</additionalClasspathElement>
|
||||||
<additionalClasspathElement>${basedir}/target/test-packages/space par.par</additionalClasspathElement>
|
<additionalClasspathElement>${basedir}/target/test-packages/space par.par</additionalClasspathElement>
|
||||||
|
<additionalClasspathElement>${basedir}/target/test-packages/war.war</additionalClasspathElement>
|
||||||
</additionalClasspathElements>
|
</additionalClasspathElements>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb;
|
package org.hibernate.ejb;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb;
|
package org.hibernate.ejb;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11282 $
|
||||||
*/
|
*/
|
||||||
public class BeanCallback extends Callback {
|
public class BeanCallback extends Callback {
|
||||||
public BeanCallback(Method callbackMethod) {
|
public BeanCallback(Method callbackMethod) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ import org.hibernate.util.ReflectHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11282 $
|
||||||
*/
|
*/
|
||||||
public abstract class Callback implements Serializable {
|
public abstract class Callback implements Serializable {
|
||||||
transient protected Method callbackMethod;
|
transient protected Method callbackMethod;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// $Id:$
|
// $Id$
|
||||||
/*
|
/*
|
||||||
* JBoss, the OpenSource EJB server
|
* JBoss, the OpenSource EJB server
|
||||||
*
|
*
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.hibernate.event.PostDeleteEventListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11282 $
|
||||||
*/
|
*/
|
||||||
public class EJB3PostDeleteEventListener implements PostDeleteEventListener, CallbackHandlerConsumer {
|
public class EJB3PostDeleteEventListener implements PostDeleteEventListener, CallbackHandlerConsumer {
|
||||||
EntityCallbackHandler callbackHandler;
|
EntityCallbackHandler callbackHandler;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.hibernate.event.PostInsertEventListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11282 $
|
||||||
*/
|
*/
|
||||||
public class EJB3PostInsertEventListener implements PostInsertEventListener, CallbackHandlerConsumer {
|
public class EJB3PostInsertEventListener implements PostInsertEventListener, CallbackHandlerConsumer {
|
||||||
EntityCallbackHandler callbackHandler;
|
EntityCallbackHandler callbackHandler;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.hibernate.event.PostLoadEventListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11282 $
|
||||||
*/
|
*/
|
||||||
public class EJB3PostLoadEventListener implements PostLoadEventListener, CallbackHandlerConsumer {
|
public class EJB3PostLoadEventListener implements PostLoadEventListener, CallbackHandlerConsumer {
|
||||||
EntityCallbackHandler callbackHandler;
|
EntityCallbackHandler callbackHandler;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import org.hibernate.util.ReflectHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
* @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11282 $
|
||||||
*/
|
*/
|
||||||
public class ListenerCallback extends Callback {
|
public class ListenerCallback extends Callback {
|
||||||
protected transient Object listener;
|
protected transient Object listener;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.packaging;
|
package org.hibernate.ejb.packaging;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
|
@ -15,7 +15,7 @@ import javax.persistence.spi.PersistenceUnitTransactionType;
|
||||||
* Object used by JBoss EJB 3 for persistence.xml parsing
|
* Object used by JBoss EJB 3 for persistence.xml parsing
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:bill@jboss.org">Bill Burke</a>
|
* @author <a href="mailto:bill@jboss.org">Bill Burke</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11329 $
|
||||||
*/
|
*/
|
||||||
public class PersistenceMetadata {
|
public class PersistenceMetadata {
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.w3c.dom.NodeList;
|
||||||
* A utility class to cover up the rough bits of xml parsing
|
* A utility class to cover up the rough bits of xml parsing
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:chris@kimptoc.net">Chris Kimpton</a>
|
* @author <a href="mailto:chris@kimptoc.net">Chris Kimpton</a>
|
||||||
* @version $Revision$
|
* @version $Revision: 11282 $
|
||||||
*/
|
*/
|
||||||
public final class XmlHelper {
|
public final class XmlHelper {
|
||||||
private XmlHelper() {
|
private XmlHelper() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.transaction;
|
package org.hibernate.ejb.transaction;
|
||||||
|
|
||||||
import javax.transaction.SystemException;
|
import javax.transaction.SystemException;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.transaction;
|
package org.hibernate.ejb.transaction;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.util;
|
package org.hibernate.ejb.util;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.util;
|
package org.hibernate.ejb.util;
|
||||||
|
|
||||||
import javax.naming.Context;
|
import javax.naming.Context;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.engine;
|
package org.hibernate.engine;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.engine;
|
package org.hibernate.engine;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Emmanuel Bernard
|
* @author Emmanuel Bernard
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test;
|
package org.hibernate.ejb.test;
|
||||||
|
|
||||||
import org.hibernate.event.PreInsertEventListener;
|
import org.hibernate.event.PreInsertEventListener;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.association;
|
package org.hibernate.ejb.test.association;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.association;
|
package org.hibernate.ejb.test.association;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.association;
|
package org.hibernate.ejb.test.association;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.association;
|
package org.hibernate.ejb.test.association;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.association;
|
package org.hibernate.ejb.test.association;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.callbacks;
|
package org.hibernate.ejb.test.callbacks;
|
||||||
|
|
||||||
import javax.persistence.PrePersist;
|
import javax.persistence.PrePersist;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.callbacks;
|
package org.hibernate.ejb.test.callbacks;
|
||||||
|
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.callbacks;
|
package org.hibernate.ejb.test.callbacks;
|
||||||
|
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.cascade;
|
package org.hibernate.ejb.test.cascade;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: FetchTest.java 9796 2006-04-26 06:46:52Z epbernard $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.cascade;
|
package org.hibernate.ejb.test.cascade;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.cascade;
|
package org.hibernate.ejb.test.cascade;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Version;
|
import javax.persistence.Version;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,16 +1,21 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops;
|
package org.hibernate.ejb.test.emops;
|
||||||
|
|
||||||
import java.util.Map;
|
import org.hibernate.StaleObjectStateException;
|
||||||
import javax.persistence.EntityManager;
|
|
||||||
import javax.persistence.OptimisticLockException;
|
|
||||||
|
|
||||||
import org.hibernate.ejb.test.TestCase;
|
import org.hibernate.ejb.test.TestCase;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.persistence.EntityManager;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Emmanuel Bernard
|
* @author Emmanuel Bernard
|
||||||
*/
|
*/
|
||||||
public class RemoveTest extends TestCase {
|
public class RemoveTest extends TestCase {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(RemoveTest.class);
|
||||||
|
|
||||||
public void testRemove() {
|
public void testRemove() {
|
||||||
Race race = new Race();
|
Race race = new Race();
|
||||||
race.competitors.add( new Competitor() );
|
race.competitors.add( new Competitor() );
|
||||||
|
@ -44,11 +49,8 @@ public class RemoveTest extends TestCase {
|
||||||
em.getTransaction().begin();
|
em.getTransaction().begin();
|
||||||
em.persist( music );
|
em.persist( music );
|
||||||
em.getTransaction().commit();
|
em.getTransaction().commit();
|
||||||
|
|
||||||
em.clear();
|
em.clear();
|
||||||
|
|
||||||
em = getOrCreateEntityManager();
|
|
||||||
em.getTransaction().begin();
|
|
||||||
|
|
||||||
EntityManager em2 = factory.createEntityManager();
|
EntityManager em2 = factory.createEntityManager();
|
||||||
try {
|
try {
|
||||||
|
@ -62,6 +64,8 @@ public class RemoveTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
//change music
|
//change music
|
||||||
|
em = getOrCreateEntityManager();
|
||||||
|
em.getTransaction().begin();
|
||||||
em.find( Music.class, music.getId() ).setName( "Rap" );
|
em.find( Music.class, music.getId() ).setName( "Rap" );
|
||||||
em.getTransaction().commit();
|
em.getTransaction().commit();
|
||||||
|
|
||||||
|
@ -70,8 +74,10 @@ public class RemoveTest extends TestCase {
|
||||||
em2.flush();
|
em2.flush();
|
||||||
fail("should have an optimistic lock exception");
|
fail("should have an optimistic lock exception");
|
||||||
}
|
}
|
||||||
catch( OptimisticLockException e ) {
|
|
||||||
//success
|
//catch( OptimisticLockException e ) {
|
||||||
|
catch( Exception e ) {
|
||||||
|
log.debug("success");
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
em2.getTransaction().rollback();
|
em2.getTransaction().rollback();
|
||||||
|
@ -79,8 +85,9 @@ public class RemoveTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
//clean
|
//clean
|
||||||
|
em.getTransaction().begin();
|
||||||
em.remove( em.find( Music.class, music.getId() ) );
|
em.remove( em.find( Music.class, music.getId() ) );
|
||||||
|
em.getTransaction().commit();
|
||||||
em.close();
|
em.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.emops.cascade;
|
package org.hibernate.ejb.test.emops.cascade;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.inheritance;
|
package org.hibernate.ejb.test.inheritance;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.inheritance;
|
package org.hibernate.ejb.test.inheritance;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.inheritance;
|
package org.hibernate.ejb.test.inheritance;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.lock;
|
package org.hibernate.ejb.test.lock;
|
||||||
|
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.ops;
|
package org.hibernate.ejb.test.ops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.ops;
|
package org.hibernate.ejb.test.ops;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.ops;
|
package org.hibernate.ejb.test.ops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class PersistTest extends EJB3TestCase {
|
||||||
tx = s.beginTransaction();
|
tx = s.beginTransaction();
|
||||||
try {
|
try {
|
||||||
s.persist( dupe );
|
s.persist( dupe );
|
||||||
assertFalse( true );
|
fail();
|
||||||
}
|
}
|
||||||
catch (PersistentObjectException poe) {
|
catch (PersistentObjectException poe) {
|
||||||
//verify that an exception is thrown!
|
//verify that an exception is thrown!
|
||||||
|
@ -146,7 +146,7 @@ public class PersistTest extends EJB3TestCase {
|
||||||
tx = s.beginTransaction();
|
tx = s.beginTransaction();
|
||||||
try {
|
try {
|
||||||
s.persist( nondupe );
|
s.persist( nondupe );
|
||||||
assertFalse( true );
|
fail();
|
||||||
}
|
}
|
||||||
catch (PersistentObjectException poe) {
|
catch (PersistentObjectException poe) {
|
||||||
//verify that an exception is thrown!
|
//verify that an exception is thrown!
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.ops;
|
package org.hibernate.ejb.test.ops;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.defaultpar;
|
package org.hibernate.ejb.test.pack.defaultpar;
|
||||||
|
|
||||||
import javax.persistence.PrePersist;
|
import javax.persistence.PrePersist;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.defaultpar;
|
package org.hibernate.ejb.test.pack.defaultpar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.defaultpar;
|
package org.hibernate.ejb.test.pack.defaultpar;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.defaultpar;
|
package org.hibernate.ejb.test.pack.defaultpar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.explicitpar;
|
package org.hibernate.ejb.test.pack.explicitpar;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.overridenpar;
|
package org.hibernate.ejb.test.pack.overridenpar;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.spacepar;
|
package org.hibernate.ejb.test.pack.spacepar;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.various;
|
package org.hibernate.ejb.test.pack.various;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.various;
|
package org.hibernate.ejb.test.pack.various;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: ApplicationServer.java 11282 2007-03-14 22:05:59Z epbernard $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.war;
|
package org.hibernate.ejb.test.pack.war;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.war;
|
package org.hibernate.ejb.test.pack.war;
|
||||||
|
|
||||||
import javax.persistence.PrePersist;
|
import javax.persistence.PrePersist;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.war;
|
package org.hibernate.ejb.test.pack.war;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.war;
|
package org.hibernate.ejb.test.pack.war;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: Mouse.java 11282 2007-03-14 22:05:59Z epbernard $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.war;
|
package org.hibernate.ejb.test.pack.war;
|
||||||
|
|
||||||
import javax.persistence.ExcludeDefaultListeners;
|
import javax.persistence.ExcludeDefaultListeners;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.war;
|
package org.hibernate.ejb.test.pack.war;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: Version.java 11282 2007-03-14 22:05:59Z epbernard $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.pack.war;
|
package org.hibernate.ejb.test.pack.war;
|
||||||
|
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
|
|
|
@ -36,6 +36,8 @@ public class JarVisitorTest extends TestCase {
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(JarVisitorTest.class);
|
private static final Logger log = LoggerFactory.getLogger(JarVisitorTest.class);
|
||||||
|
|
||||||
|
private static final String jarFileBase = "file:./target/test-packages";
|
||||||
|
|
||||||
public void testHttp() throws Exception {
|
public void testHttp() throws Exception {
|
||||||
URL url = JarVisitorFactory.getJarURLFromURLEntry(
|
URL url = JarVisitorFactory.getJarURLFromURLEntry(
|
||||||
new URL(
|
new URL(
|
||||||
|
@ -58,8 +60,7 @@ public class JarVisitorTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testInputStreamZippedJar() throws Exception {
|
public void testInputStreamZippedJar() throws Exception {
|
||||||
String jarFileName = "file:./build/testresources/defaultpar.par";
|
String jarFileName = jarFileBase + "/defaultpar.par";
|
||||||
//JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
|
|
||||||
Filter[] filters = getFilters();
|
Filter[] filters = getFilters();
|
||||||
JarVisitor jarVisitor = new InputStreamZippedJarVisitor( new URL( jarFileName ), filters, "" );
|
JarVisitor jarVisitor = new InputStreamZippedJarVisitor( new URL( jarFileName ), filters, "" );
|
||||||
assertEquals( "defaultpar", jarVisitor.getUnqualifiedJarName() );
|
assertEquals( "defaultpar", jarVisitor.getUnqualifiedJarName() );
|
||||||
|
@ -78,8 +79,7 @@ public class JarVisitorTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNestedJarProtocol() throws Exception {
|
public void testNestedJarProtocol() throws Exception {
|
||||||
String jarFileName = "jar:file:./build/testresources/nestedjar.ear!/defaultpar.par";
|
String jarFileName = jarFileBase + "/nestedjar.ear!/defaultpar.par";
|
||||||
//JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
|
|
||||||
Filter[] filters = getFilters();
|
Filter[] filters = getFilters();
|
||||||
JarVisitor jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
|
JarVisitor jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
|
||||||
//TODO should we fix the name here to reach defaultpar rather than nestedjar ??
|
//TODO should we fix the name here to reach defaultpar rather than nestedjar ??
|
||||||
|
@ -97,7 +97,7 @@ public class JarVisitorTest extends TestCase {
|
||||||
localEntry.getInputStream().close();
|
localEntry.getInputStream().close();
|
||||||
}
|
}
|
||||||
|
|
||||||
jarFileName = "jar:file:./build/testresources/nesteddir.ear!/defaultpar.par";
|
jarFileName = jarFileBase + "/nesteddir.ear!/defaultpar.par";
|
||||||
//JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
|
//JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
|
||||||
filters = getFilters();
|
filters = getFilters();
|
||||||
jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
|
jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
|
||||||
|
@ -118,8 +118,7 @@ public class JarVisitorTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testJarProtocol() throws Exception {
|
public void testJarProtocol() throws Exception {
|
||||||
String jarFileName = "jar:file:./build/testresources/war.war!/WEB-INF/classes";
|
String jarFileName = jarFileBase + "/war.war!/WEB-INF/classes";
|
||||||
//JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
|
|
||||||
Filter[] filters = getFilters();
|
Filter[] filters = getFilters();
|
||||||
JarVisitor jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
|
JarVisitor jarVisitor = new JarProtocolVisitor( new URL( jarFileName ), filters, "" );
|
||||||
assertEquals( "war", jarVisitor.getUnqualifiedJarName() );
|
assertEquals( "war", jarVisitor.getUnqualifiedJarName() );
|
||||||
|
@ -138,8 +137,7 @@ public class JarVisitorTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testZippedJar() throws Exception {
|
public void testZippedJar() throws Exception {
|
||||||
String jarFileName = "file:./build/testresources/defaultpar.par";
|
String jarFileName = jarFileBase + "/defaultpar.par";
|
||||||
//JarVisitor jarVisitor = new ZippedJarVisitor( jarFileName, true, true );
|
|
||||||
Filter[] filters = getFilters();
|
Filter[] filters = getFilters();
|
||||||
JarVisitor jarVisitor = new FileZippedJarVisitor( new URL( jarFileName ), filters, "" );
|
JarVisitor jarVisitor = new FileZippedJarVisitor( new URL( jarFileName ), filters, "" );
|
||||||
assertEquals( "defaultpar", jarVisitor.getUnqualifiedJarName() );
|
assertEquals( "defaultpar", jarVisitor.getUnqualifiedJarName() );
|
||||||
|
@ -159,8 +157,7 @@ public class JarVisitorTest extends TestCase {
|
||||||
|
|
||||||
|
|
||||||
public void testExplodedJar() throws Exception {
|
public void testExplodedJar() throws Exception {
|
||||||
String jarFileName = "./build/testresources/explodedpar.par";
|
String jarFileName = jarFileBase + "/explodedpar.par";
|
||||||
//JarVisitor jarVisitor = new ExplodedJarVisitor( jarFileName, true, true );
|
|
||||||
Filter[] filters = getFilters();
|
Filter[] filters = getFilters();
|
||||||
JarVisitor jarVisitor = new ExplodedJarVisitor( jarFileName, filters );
|
JarVisitor jarVisitor = new ExplodedJarVisitor( jarFileName, filters );
|
||||||
assertEquals( "explodedpar", jarVisitor.getUnqualifiedJarName() );
|
assertEquals( "explodedpar", jarVisitor.getUnqualifiedJarName() );
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
import javax.persistence.PrePersist;
|
import javax.persistence.PrePersist;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
//$Id: $
|
//$Id$
|
||||||
package org.hibernate.ejb.test.xml;
|
package org.hibernate.ejb.test.xml;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
|
|
|
@ -33,6 +33,8 @@ hibernate.connection.pool_size 5
|
||||||
hibernate.show_sql true
|
hibernate.show_sql true
|
||||||
hibernate.format_sql true
|
hibernate.format_sql true
|
||||||
|
|
||||||
|
hibernate.hbm2ddl.auto create-drop
|
||||||
|
|
||||||
hibernate.max_fetch_depth 5
|
hibernate.max_fetch_depth 5
|
||||||
|
|
||||||
hibernate.cache.region_prefix hibernate.test
|
hibernate.cache.region_prefix hibernate.test
|
||||||
|
|
Loading…
Reference in New Issue