HHH-4677 - just some import cleanups and addition of source headers. no code changes
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18567 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
ecbe5dd854
commit
7fa50f7a18
|
@ -1,3 +1,4 @@
|
|||
// $Id:$
|
||||
/*
|
||||
* Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
|
||||
* indicated by the @author tags or express copyright attribution
|
||||
|
@ -19,8 +20,6 @@
|
|||
* 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
package org.hibernate.ejb;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
|
@ -31,20 +30,20 @@ import java.io.InputStream;
|
|||
import java.io.ObjectOutput;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.HashSet;
|
||||
import java.lang.annotation.Annotation;
|
||||
import javax.naming.BinaryRefAddr;
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.Reference;
|
||||
|
@ -55,7 +54,6 @@ import javax.persistence.EntityManagerFactory;
|
|||
import javax.persistence.EntityNotFoundException;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.PersistenceException;
|
||||
import javax.persistence.ValidationMode;
|
||||
import javax.persistence.spi.PersistenceUnitInfo;
|
||||
import javax.persistence.spi.PersistenceUnitTransactionType;
|
||||
import javax.sql.DataSource;
|
||||
|
@ -63,6 +61,11 @@ import javax.sql.DataSource;
|
|||
import org.dom4j.DocumentException;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.SAXReader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.xml.sax.EntityResolver;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.Interceptor;
|
||||
import org.hibernate.MappingException;
|
||||
|
@ -77,12 +80,12 @@ import org.hibernate.cfg.SettingsFactory;
|
|||
import org.hibernate.cfg.annotations.reflection.XMLContext;
|
||||
import org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider;
|
||||
import org.hibernate.ejb.instrument.InterceptFieldClassFileTransformer;
|
||||
import org.hibernate.ejb.packaging.JarVisitorFactory;
|
||||
import org.hibernate.ejb.packaging.NamedInputStream;
|
||||
import org.hibernate.ejb.packaging.NativeScanner;
|
||||
import org.hibernate.ejb.packaging.PersistenceMetadata;
|
||||
import org.hibernate.ejb.packaging.PersistenceXmlLoader;
|
||||
import org.hibernate.ejb.packaging.JarVisitorFactory;
|
||||
import org.hibernate.ejb.packaging.Scanner;
|
||||
import org.hibernate.ejb.packaging.NativeScanner;
|
||||
import org.hibernate.ejb.transaction.JoinableCMTTransactionFactory;
|
||||
import org.hibernate.ejb.util.ConfigurationHelper;
|
||||
import org.hibernate.ejb.util.LogHelper;
|
||||
|
@ -98,10 +101,6 @@ import org.hibernate.util.CollectionHelper;
|
|||
import org.hibernate.util.ReflectHelper;
|
||||
import org.hibernate.util.StringHelper;
|
||||
import org.hibernate.util.XMLHelper;
|
||||
import org.xml.sax.EntityResolver;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Allow a fine tuned configuration of an EJB 3.0 EntityManagerFactory
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// $Id:$
|
||||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
|
@ -43,7 +44,6 @@ public class HibernatePersistence implements javax.persistence.spi.PersistencePr
|
|||
*/
|
||||
public static final String PROVIDER = "javax.persistence.provider";
|
||||
/**
|
||||
* <EFBFBD>
|
||||
* transaction type
|
||||
*/
|
||||
public static final String TRANSACTION_TYPE = "javax.persistence.transactionType";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// $Id:$
|
||||
/*
|
||||
* Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
|
||||
* indicated by the @author tags or express copyright attribution
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// $Id:$
|
||||
/*
|
||||
* Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
|
||||
* indicated by the @author tags or express copyright attribution
|
||||
|
@ -33,17 +34,14 @@ import javax.persistence.PersistenceException;
|
|||
import javax.persistence.spi.PersistenceUnitTransactionType;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.validation.SchemaFactory;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import javax.xml.validation.Schema;
|
||||
import javax.xml.validation.SchemaFactory;
|
||||
import javax.xml.validation.Validator;
|
||||
import javax.xml.validation.ValidatorHandler;
|
||||
|
||||
import org.hibernate.cfg.EJB3DTDEntityResolver;
|
||||
import org.hibernate.ejb.HibernatePersistence;
|
||||
import org.hibernate.ejb.util.ConfigurationHelper;
|
||||
import org.hibernate.util.StringHelper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
|
@ -52,11 +50,13 @@ import org.xml.sax.EntityResolver;
|
|||
import org.xml.sax.ErrorHandler;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXParseException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.hibernate.ejb.HibernatePersistence;
|
||||
import org.hibernate.ejb.util.ConfigurationHelper;
|
||||
import org.hibernate.util.StringHelper;
|
||||
|
||||
/**
|
||||
* Persistence.xml handler
|
||||
* Handler for persistence.xml files.
|
||||
*
|
||||
* @author <a href="mailto:bill@jboss.org">Bill Burke</a>
|
||||
* @author Emmanuel Bernard
|
||||
|
|
|
@ -1,4 +1,25 @@
|
|||
//$Id$
|
||||
/*
|
||||
* Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
|
||||
* indicated by the @author tags or express copyright attribution
|
||||
* statements applied by the authors. All third-party contributions are
|
||||
* distributed under license by Red Hat Middleware LLC.
|
||||
*
|
||||
* This copyrighted material is made available to anyone wishing to use, modify,
|
||||
* copy, or redistribute it subject to the terms and conditions of the GNU
|
||||
* Lesser General Public License, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this distribution; if not, write to:
|
||||
* Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
package org.hibernate.ejb.test.connection;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -17,7 +38,7 @@ public class DataSourceInjectionTest extends TestCase {
|
|||
sub.mkdir();
|
||||
PersistenceUnitInfoImpl info = new PersistenceUnitInfoImpl( sub.toURI().toURL(), new String[]{} );
|
||||
try {
|
||||
EntityManagerFactory emf = ( new HibernatePersistence() ).createContainerEntityManagerFactory( info, null );
|
||||
new HibernatePersistence().createContainerEntityManagerFactory( info, null );
|
||||
fail( "FakeDatasource should have been used" );
|
||||
}
|
||||
catch (FakeDataSourceException fde) {
|
||||
|
|
|
@ -1,15 +1,37 @@
|
|||
//$Id$
|
||||
/*
|
||||
* Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
|
||||
* indicated by the @author tags or express copyright attribution
|
||||
* statements applied by the authors. All third-party contributions are
|
||||
* distributed under license by Red Hat Middleware LLC.
|
||||
*
|
||||
* This copyrighted material is made available to anyone wishing to use, modify,
|
||||
* copy, or redistribute it subject to the terms and conditions of the GNU
|
||||
* Lesser General Public License, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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 Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this distribution; if not, write to:
|
||||
* Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
package org.hibernate.ejb.test.connection;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import javax.persistence.SharedCacheMode;
|
||||
import javax.persistence.ValidationMode;
|
||||
import javax.persistence.spi.ClassTransformer;
|
||||
import javax.persistence.spi.PersistenceUnitInfo;
|
||||
import javax.persistence.spi.PersistenceUnitTransactionType;
|
||||
import javax.persistence.SharedCacheMode;
|
||||
import javax.persistence.ValidationMode;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.hibernate.cfg.Environment;
|
||||
|
@ -29,9 +51,7 @@ public class PersistenceUnitInfoImpl implements PersistenceUnitInfo {
|
|||
|
||||
public PersistenceUnitInfoImpl(URL puRoot, String[] mappingFiles) {
|
||||
this.mappingFiles = new ArrayList<String>( mappingFiles.length );
|
||||
for ( String mappingFile : mappingFiles ) {
|
||||
this.mappingFiles.add( mappingFile );
|
||||
}
|
||||
this.mappingFiles.addAll( Arrays.asList( mappingFiles ) );
|
||||
this.puRoot = puRoot;
|
||||
}
|
||||
|
||||
|
@ -74,7 +94,7 @@ public class PersistenceUnitInfoImpl implements PersistenceUnitInfo {
|
|||
}
|
||||
|
||||
public String getPersistenceXMLSchemaVersion() {
|
||||
return null; //To change body of implemented methods use File | Settings | File Templates.
|
||||
return null;
|
||||
}
|
||||
|
||||
public ClassLoader getClassLoader() {
|
||||
|
@ -94,13 +114,11 @@ public class PersistenceUnitInfoImpl implements PersistenceUnitInfo {
|
|||
}
|
||||
|
||||
public SharedCacheMode getSharedCacheMode() {
|
||||
//FIXME
|
||||
return null; //To change body of implemented methods use File | Settings | File Templates.
|
||||
return null;
|
||||
}
|
||||
|
||||
public ValidationMode getValidationMode() {
|
||||
//FIXME
|
||||
return null; //To change body of implemented methods use File | Settings | File Templates.
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addTransformer(ClassTransformer transformer) {
|
||||
|
|
Loading…
Reference in New Issue