Hibernate SVN: r11359 - branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-29 08:35:51 -0400 (Thu, 29 Mar 2007)
New Revision: 11359
Modified:
branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/LegacyTestCase.java
Log:
test suite fixes : postgresql (boolean handling)
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/LegacyTestCase.java
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/LegacyTestCase.java 2007-03-29 01:45:07 UTC (rev 11358)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/legacy/LegacyTestCase.java 2007-03-29 12:35:51 UTC (rev 11359)
@@ -5,6 +5,7 @@
import org.hibernate.hql.classic.ClassicQueryTranslatorFactory;
import org.hibernate.util.StringHelper;
import org.hibernate.junit.functional.FunctionalTestCase;
+import org.hibernate.dialect.Dialect;
/**
* @author Steve Ebersole
@@ -32,14 +33,25 @@
super.configure( cfg );
if ( !useAntlrParser ) {
cfg.setProperty( Environment.QUERY_TRANSLATOR, ClassicQueryTranslatorFactory.class.getName() );
- String subs = cfg.getProperties().getProperty( Environment.QUERY_SUBSTITUTIONS );
- if ( StringHelper.isEmpty( subs ) ) {
- subs = "true=1, false=0";
+ try {
+ String dialectTrueRepresentation = Dialect.getDialect().toBooleanValueString( true );
+ // if this call succeeds, then the dialect is saying to represent true/false as int values...
+ Integer.parseInt( dialectTrueRepresentation );
+ String subs = cfg.getProperties().getProperty( Environment.QUERY_SUBSTITUTIONS );
+ if ( subs == null ) {
+ subs = "";
+ }
+ if ( StringHelper.isEmpty( subs ) ) {
+ subs = "true=1, false=0";
+ }
+ else {
+ subs += ", true=1, false=0";
+ }
+ cfg.getProperties().setProperty( Environment.QUERY_SUBSTITUTIONS, subs );
}
- else {
- subs += ", true=1, false=0";
+ catch( NumberFormatException nfe ) {
+ // the Integer#parseInt call failed...
}
- cfg.getProperties().setProperty( Environment.QUERY_SUBSTITUTIONS, subs );
}
}
}
17 years, 1 month
Hibernate SVN: r11358 - in trunk/HibernateExt/entitymanager: doc/reference/en and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-03-28 21:45:07 -0400 (Wed, 28 Mar 2007)
New Revision: 11358
Modified:
trunk/HibernateExt/entitymanager/build.xml
trunk/HibernateExt/entitymanager/changelog.txt
trunk/HibernateExt/entitymanager/doc/reference/en/master.xml
trunk/HibernateExt/entitymanager/readme.txt
Log:
Release EM 3.3.1
Modified: trunk/HibernateExt/entitymanager/build.xml
===================================================================
--- trunk/HibernateExt/entitymanager/build.xml 2007-03-29 01:42:35 UTC (rev 11357)
+++ trunk/HibernateExt/entitymanager/build.xml 2007-03-29 01:45:07 UTC (rev 11358)
@@ -16,7 +16,7 @@
<!-- Name of project and version, used to create filenames -->
<property name="Name" value="Hibernate EntityManager"/>
<property name="name" value="hibernate-entitymanager"/>
- <property name="version" value="3.3.0.GA"/>
+ <property name="version" value="3.3.1.GA"/>
<property name="javadoc.packagenames" value="org.hibernate.ejb.*"/>
<property name="jdbc.dir" value="jdbc"/>
<property name="copy.test" value="true"/>
Modified: trunk/HibernateExt/entitymanager/changelog.txt
===================================================================
--- trunk/HibernateExt/entitymanager/changelog.txt 2007-03-29 01:42:35 UTC (rev 11357)
+++ trunk/HibernateExt/entitymanager/changelog.txt 2007-03-29 01:45:07 UTC (rev 11358)
@@ -1,6 +1,15 @@
Hibernate EntityManager Changelog
==================================
+3.3.1.GA (28-03-2007)
+---------------------
+
+** Bug
+ * [EJB-280] - java.lang.NoSuchMethodError: Hibernate EM 3.3.0 breaks Jboss Embedded EJB3 due to method signature change
+ * [EJB-281] - Version 3.3.0 is not compatible with JBoss AS 4.0.5
+ * [EJB-282] - ORM.xml ignored when excludeUnlistedClass = true in container mode (EJB 3.0, Spring)
+
+
3.3.0.GA (19-03-2007)
---------------------
Modified: trunk/HibernateExt/entitymanager/doc/reference/en/master.xml
===================================================================
--- trunk/HibernateExt/entitymanager/doc/reference/en/master.xml 2007-03-29 01:42:35 UTC (rev 11357)
+++ trunk/HibernateExt/entitymanager/doc/reference/en/master.xml 2007-03-29 01:45:07 UTC (rev 11358)
@@ -16,7 +16,7 @@
<subtitle>User guide</subtitle>
- <releaseinfo>3.3.0.GA</releaseinfo>
+ <releaseinfo>3.3.1.GA</releaseinfo>
<mediaobject>
<imageobject>
Modified: trunk/HibernateExt/entitymanager/readme.txt
===================================================================
--- trunk/HibernateExt/entitymanager/readme.txt 2007-03-29 01:42:35 UTC (rev 11357)
+++ trunk/HibernateExt/entitymanager/readme.txt 2007-03-29 01:45:07 UTC (rev 11358)
@@ -1,6 +1,6 @@
Hibernate EntityManager
==================================================
-Version: 3.3.0.GA, 19.03.2007
+Version: 3.3.1.GA, 28.03.2007
THIS RELEASE OF HIBERNATE ENTITYMANAGER REQUIRES HIBERNATE CORE 3.2.0.GA (and above)
17 years, 1 month
Hibernate SVN: r11357 - branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-28 21:42:35 -0400 (Wed, 28 Mar 2007)
New Revision: 11357
Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Column.java
Log:
HHH-2528 : bug
Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Column.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Column.java 2007-03-28 19:44:27 UTC (rev 11356)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/mapping/Column.java 2007-03-29 01:42:35 UTC (rev 11357)
@@ -65,10 +65,6 @@
quoted=true;
this.name=name.substring( 1, name.length()-1 );
}
- else if(Dialect.getDialect().getKeywords().contains(name)) {
- quoted=true;
- this.name = name;
- }
else {
this.name = name;
}
17 years, 1 month
Hibernate SVN: r11356 - trunk/Hibernate3/test/org/hibernate/test/component/basic.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-28 15:44:27 -0400 (Wed, 28 Mar 2007)
New Revision: 11356
Modified:
trunk/Hibernate3/test/org/hibernate/test/component/basic/User.hbm.xml
Log:
testsuite fixes
Modified: trunk/Hibernate3/test/org/hibernate/test/component/basic/User.hbm.xml
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/component/basic/User.hbm.xml 2007-03-28 18:20:54 UTC (rev 11355)
+++ trunk/Hibernate3/test/org/hibernate/test/component/basic/User.hbm.xml 2007-03-28 19:44:27 UTC (rev 11356)
@@ -7,7 +7,7 @@
-->
-<hibernate-mapping package="org.hibernate.test.component">
+<hibernate-mapping package="org.hibernate.test.component.basic">
<class name="User" table="T_USER">
<id name="userName"/>
17 years, 1 month
Hibernate SVN: r11355 - trunk/HibernateExt/search/src/test/org/hibernate/search/test/session.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2007-03-28 14:20:54 -0400 (Wed, 28 Mar 2007)
New Revision: 11355
Added:
trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/DelegationWrapper.java
trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/SessionTest.java
Log:
Mote test on Session wrappers
Added: trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/DelegationWrapper.java
===================================================================
--- trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/DelegationWrapper.java (rev 0)
+++ trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/DelegationWrapper.java 2007-03-28 18:20:54 UTC (rev 11355)
@@ -0,0 +1,34 @@
+//$Id: $
+package org.hibernate.search.test.session;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationHandler;
+import java.io.Serializable;
+
+import org.hibernate.Session;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class DelegationWrapper implements InvocationHandler, Serializable {
+ Object realSession;
+
+ public DelegationWrapper(Session session) {
+ this.realSession = session;
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ try {
+ return method.invoke( realSession, args );
+ }
+ catch (InvocationTargetException e) {
+ if ( e.getTargetException() instanceof RuntimeException ) {
+ throw (RuntimeException) e.getTargetException();
+ }
+ else {
+ throw e;
+ }
+ }
+ }
+}
Added: trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/SessionTest.java
===================================================================
--- trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/SessionTest.java (rev 0)
+++ trunk/HibernateExt/search/src/test/org/hibernate/search/test/session/SessionTest.java 2007-03-28 18:20:54 UTC (rev 11355)
@@ -0,0 +1,46 @@
+//$Id: $
+package org.hibernate.search.test.session;
+
+import java.lang.reflect.Proxy;
+
+import org.hibernate.search.test.SearchTestCase;
+import org.hibernate.search.Search;
+import org.hibernate.search.FullTextSession;
+import org.hibernate.Session;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class SessionTest extends SearchTestCase {
+
+ private static final Class[] SESS_PROXY_INTERFACES = new Class[] {
+ org.hibernate.classic.Session.class,
+ org.hibernate.engine.SessionImplementor.class,
+ org.hibernate.jdbc.JDBCContext.Context.class,
+ org.hibernate.event.EventSource.class
+ };
+
+ public void testSessionWrapper() throws Exception {
+ Session s = openSession( );
+ DelegationWrapper wrapper = new DelegationWrapper( s );
+ Session wrapped = (Session) Proxy.newProxyInstance(
+ org.hibernate.classic.Session.class.getClassLoader(),
+ SESS_PROXY_INTERFACES,
+ wrapper
+ );
+ try {
+ FullTextSession fts = Search.createFullTextSession( wrapped );
+ }
+ catch( ClassCastException e ) {
+ e.printStackTrace( );
+ fail(e.toString());
+ }
+ wrapped.close();
+ }
+
+ protected Class[] getMappings() {
+ return new Class[] {
+ Email.class
+ };
+ }
+}
17 years, 1 month
Hibernate SVN: r11354 - trunk/Hibernate3/src/org/hibernate/persister/entity.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-28 12:03:51 -0400 (Wed, 28 Mar 2007)
New Revision: 11354
Modified:
trunk/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java
Log:
HHH-2469 : rowid
Modified: trunk/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-03-28 16:03:40 UTC (rev 11353)
+++ trunk/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-03-28 16:03:51 UTC (rev 11354)
@@ -300,9 +300,9 @@
if ( sqlUpdateByRowIdString == null ) {
throw new AssertionFailure( "no update by row id" );
}
- String[] result = new String[getTableSpan()];
+ String[] result = new String[getTableSpan() + 1];
result[0] = sqlUpdateByRowIdString;
- System.arraycopy( sqlUpdateStrings, 1, result, 1, getTableSpan() );
+ System.arraycopy( sqlUpdateStrings, 0, result, 1, getTableSpan() );
return result;
}
17 years, 1 month
Hibernate SVN: r11353 - in trunk/Hibernate3/test/org/hibernate: test/rowid and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-28 12:03:40 -0400 (Wed, 28 Mar 2007)
New Revision: 11353
Modified:
trunk/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java
trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java
trunk/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java
trunk/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java
Log:
testsuite fixes
Modified: trunk/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java 2007-03-28 16:03:29 UTC (rev 11352)
+++ trunk/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java 2007-03-28 16:03:40 UTC (rev 11353)
@@ -9,6 +9,7 @@
import org.hibernate.cfg.Environment;
import org.hibernate.cfg.Mappings;
import org.hibernate.SessionFactory;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.SimpleValue;
@@ -84,7 +85,7 @@
this.configuration = configuration;
this.sessionFactory = sessionFactory;
- settings.afterSessionFactoryBuilt();
+ settings.afterSessionFactoryBuilt( ( SessionFactoryImplementor ) sessionFactory );
}
private void applyMappings(Configuration configuration) {
@@ -125,11 +126,6 @@
}
}
- protected void afterSessionFactoryBuilt() {
- // for subclasses to override in order to perform extra "stuff" only
- // when SF (re)built...
- }
-
public void rebuild() {
if ( !allowRebuild ) {
return;
@@ -139,7 +135,7 @@
sessionFactory = null;
}
sessionFactory = configuration.buildSessionFactory();
- afterSessionFactoryBuilt();
+ settings.afterSessionFactoryBuilt( ( SessionFactoryImplementor ) sessionFactory );
}
public void complete() {
@@ -158,7 +154,7 @@
public void configure(Configuration cfg);
public boolean overrideCacheStrategy();
public String getCacheConcurrencyStrategy();
- public void afterSessionFactoryBuilt();
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi);
public void afterConfigurationBuilt(Mappings mappings, Dialect dialect);
public boolean appliesTo(Dialect dialect);
}
Modified: trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java 2007-03-28 16:03:29 UTC (rev 11352)
+++ trunk/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java 2007-03-28 16:03:40 UTC (rev 11353)
@@ -213,7 +213,7 @@
return "nonstrict-read-write";
}
- public void afterSessionFactoryBuilt() {
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi) {
}
public void afterConfigurationBuilt(Mappings mappings, Dialect dialect) {
Modified: trunk/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java 2007-03-28 16:03:29 UTC (rev 11352)
+++ trunk/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java 2007-03-28 16:03:40 UTC (rev 11353)
@@ -9,6 +9,7 @@
import org.hibernate.Session;
import org.hibernate.Transaction;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.dialect.Oracle9Dialect;
import org.hibernate.dialect.Dialect;
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
@@ -43,23 +44,33 @@
return false;
}
- public void afterSessionFactoryBuilt() {
- super.afterSessionFactoryBuilt();
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi) {
+ super.afterSessionFactoryBuilt( sfi );
+ Session session = null;
try {
- Session s = openSession();
- Statement st = s.connection().createStatement();
+ session = sfi.openSession();
+ Statement st = session.connection().createStatement();
try {
st.execute( "drop table Point");
}
- catch( Throwable t ) {
+ catch( Throwable ignore ) {
// ignore
}
st.execute("create table Point (\"x\" number(19,2) not null, \"y\" number(19,2) not null, description varchar2(255) )");
- s.close();
}
catch ( SQLException e ) {
throw new RuntimeException( "Unable to build actual schema : " + e.getMessage() );
}
+ finally {
+ if ( session != null ) {
+ try {
+ session.close();
+ }
+ catch( Throwable ignore ) {
+ // ignore
+ }
+ }
+ }
}
public void testRowId() {
Modified: trunk/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java
===================================================================
--- trunk/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java 2007-03-28 16:03:29 UTC (rev 11352)
+++ trunk/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java 2007-03-28 16:03:40 UTC (rev 11353)
@@ -8,6 +8,7 @@
import org.hibernate.HibernateException;
import org.hibernate.Session;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.HSQLDialect;
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
@@ -41,22 +42,29 @@
return false;
}
-
- public void afterSessionFactoryBuilt() {
- super.afterSessionFactoryBuilt();
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi) {
+ super.afterSessionFactoryBuilt( sfi );
+ Session session = null;
try {
- Session session = openSession();
- Connection conn = session.connection();
- Statement stat = conn.createStatement();
+ session = sfi.openSession();
+ Statement stat = session.connection().createStatement();
stat.execute("CREATE SCHEMA sb AUTHORIZATION DBA ");
stat.execute(" CREATE SCHEMA sa AUTHORIZATION DBA ");
stat.execute(" CREATE TABLE \"SA\".\"Team\" (test INTEGER) ");
stat.close();
- conn.close();
}
catch ( SQLException e ) {
throw new RuntimeException( "could not prepare additional schemas" );
}
+ finally {
+ if ( session != null ) {
+ try {
+ session.close();
+ }
+ catch( Throwable ignore ) {
+ }
+ }
+ }
}
protected void prepareTest() throws Exception {
17 years, 1 month
Hibernate SVN: r11352 - branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-28 12:03:29 -0400 (Wed, 28 Mar 2007)
New Revision: 11352
Modified:
branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java
Log:
HHH-2469 : rowid
Modified: branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java
===================================================================
--- branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-03-28 16:03:18 UTC (rev 11351)
+++ branches/Branch_3_2/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java 2007-03-28 16:03:29 UTC (rev 11352)
@@ -300,9 +300,9 @@
if ( sqlUpdateByRowIdString == null ) {
throw new AssertionFailure( "no update by row id" );
}
- String[] result = new String[getTableSpan()];
+ String[] result = new String[getTableSpan() + 1];
result[0] = sqlUpdateByRowIdString;
- System.arraycopy( sqlUpdateStrings, 1, result, 1, getTableSpan() );
+ System.arraycopy( sqlUpdateStrings, 0, result, 1, getTableSpan() );
return result;
}
17 years, 1 month
Hibernate SVN: r11351 - in branches/Branch_3_2/Hibernate3/test/org/hibernate: test/rowid and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-28 12:03:18 -0400 (Wed, 28 Mar 2007)
New Revision: 11351
Modified:
branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java
branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java
branches/Branch_3_2/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java
branches/Branch_3_2/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java
Log:
testsuite fixes
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java 2007-03-28 15:38:03 UTC (rev 11350)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/ExecutionEnvironment.java 2007-03-28 16:03:18 UTC (rev 11351)
@@ -9,6 +9,7 @@
import org.hibernate.cfg.Environment;
import org.hibernate.cfg.Mappings;
import org.hibernate.SessionFactory;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.SimpleValue;
@@ -84,7 +85,7 @@
this.configuration = configuration;
this.sessionFactory = sessionFactory;
- settings.afterSessionFactoryBuilt();
+ settings.afterSessionFactoryBuilt( ( SessionFactoryImplementor ) sessionFactory );
}
private void applyMappings(Configuration configuration) {
@@ -125,11 +126,6 @@
}
}
- protected void afterSessionFactoryBuilt() {
- // for subclasses to override in order to perform extra "stuff" only
- // when SF (re)built...
- }
-
public void rebuild() {
if ( !allowRebuild ) {
return;
@@ -139,7 +135,7 @@
sessionFactory = null;
}
sessionFactory = configuration.buildSessionFactory();
- afterSessionFactoryBuilt();
+ settings.afterSessionFactoryBuilt( ( SessionFactoryImplementor ) sessionFactory );
}
public void complete() {
@@ -158,7 +154,7 @@
public void configure(Configuration cfg);
public boolean overrideCacheStrategy();
public String getCacheConcurrencyStrategy();
- public void afterSessionFactoryBuilt();
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi);
public void afterConfigurationBuilt(Mappings mappings, Dialect dialect);
public boolean appliesTo(Dialect dialect);
}
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java 2007-03-28 15:38:03 UTC (rev 11350)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/junit/functional/FunctionalTestCase.java 2007-03-28 16:03:18 UTC (rev 11351)
@@ -213,7 +213,7 @@
return "nonstrict-read-write";
}
- public void afterSessionFactoryBuilt() {
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi) {
}
public void afterConfigurationBuilt(Mappings mappings, Dialect dialect) {
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java 2007-03-28 15:38:03 UTC (rev 11350)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/rowid/RowIdTest.java 2007-03-28 16:03:18 UTC (rev 11351)
@@ -9,6 +9,7 @@
import org.hibernate.Session;
import org.hibernate.Transaction;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.dialect.Oracle9Dialect;
import org.hibernate.dialect.Dialect;
import org.hibernate.junit.functional.FunctionalTestClassTestSuite;
@@ -43,23 +44,33 @@
return false;
}
- public void afterSessionFactoryBuilt() {
- super.afterSessionFactoryBuilt();
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi) {
+ super.afterSessionFactoryBuilt( sfi );
+ Session session = null;
try {
- Session s = openSession();
- Statement st = s.connection().createStatement();
+ session = sfi.openSession();
+ Statement st = session.connection().createStatement();
try {
st.execute( "drop table Point");
}
- catch( Throwable t ) {
+ catch( Throwable ignore ) {
// ignore
}
st.execute("create table Point (\"x\" number(19,2) not null, \"y\" number(19,2) not null, description varchar2(255) )");
- s.close();
}
catch ( SQLException e ) {
throw new RuntimeException( "Unable to build actual schema : " + e.getMessage() );
}
+ finally {
+ if ( session != null ) {
+ try {
+ session.close();
+ }
+ catch( Throwable ignore ) {
+ // ignore
+ }
+ }
+ }
}
public void testRowId() {
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java 2007-03-28 15:38:03 UTC (rev 11350)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/tool/TestSchemaTools.java 2007-03-28 16:03:18 UTC (rev 11351)
@@ -8,6 +8,7 @@
import org.hibernate.HibernateException;
import org.hibernate.Session;
+import org.hibernate.engine.SessionFactoryImplementor;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.HSQLDialect;
import org.hibernate.junit.functional.DatabaseSpecificFunctionalTestCase;
@@ -41,22 +42,29 @@
return false;
}
-
- public void afterSessionFactoryBuilt() {
- super.afterSessionFactoryBuilt();
+ public void afterSessionFactoryBuilt(SessionFactoryImplementor sfi) {
+ super.afterSessionFactoryBuilt( sfi );
+ Session session = null;
try {
- Session session = openSession();
- Connection conn = session.connection();
- Statement stat = conn.createStatement();
+ session = sfi.openSession();
+ Statement stat = session.connection().createStatement();
stat.execute("CREATE SCHEMA sb AUTHORIZATION DBA ");
stat.execute(" CREATE SCHEMA sa AUTHORIZATION DBA ");
stat.execute(" CREATE TABLE \"SA\".\"Team\" (test INTEGER) ");
stat.close();
- conn.close();
}
catch ( SQLException e ) {
throw new RuntimeException( "could not prepare additional schemas" );
}
+ finally {
+ if ( session != null ) {
+ try {
+ session.close();
+ }
+ catch( Throwable ignore ) {
+ }
+ }
+ }
}
protected void prepareTest() throws Exception {
17 years, 1 month
Hibernate SVN: r11350 - branches/Branch_3_2/Hibernate3/test/org/hibernate/test/component/cascading/toone.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2007-03-28 11:38:03 -0400 (Wed, 28 Mar 2007)
New Revision: 11350
Modified:
branches/Branch_3_2/Hibernate3/test/org/hibernate/test/component/cascading/toone/Mappings.hbm.xml
Log:
grrr : user is keyword...
Modified: branches/Branch_3_2/Hibernate3/test/org/hibernate/test/component/cascading/toone/Mappings.hbm.xml
===================================================================
--- branches/Branch_3_2/Hibernate3/test/org/hibernate/test/component/cascading/toone/Mappings.hbm.xml 2007-03-28 15:37:21 UTC (rev 11349)
+++ branches/Branch_3_2/Hibernate3/test/org/hibernate/test/component/cascading/toone/Mappings.hbm.xml 2007-03-28 15:38:03 UTC (rev 11350)
@@ -5,14 +5,14 @@
<hibernate-mapping package="org.hibernate.test.component.cascading.toone">
- <class name="Document" >
+ <class name="Document" table="COMP_CASC_TO1_DOC">
<id name="id" type="long" column="ID">
<generator class="increment"/>
</id>
<many-to-one name="owner" class="User" cascade="persist,merge,delete"/>
</class>
- <class name="User" >
+ <class name="User" table="COMP_CASC_TO1_USER">
<id name="id" type="long" column="ID">
<generator class="increment"/>
</id>
@@ -21,7 +21,7 @@
</component>
</class>
- <class name="Address">
+ <class name="Address" table="COMP_CASC_TO1_ADDR">
<id name="id" type="long" column="ID">
<generator class="increment"/>
</id>
17 years, 1 month