[Hibernate-JIRA] Created: (HHH-5553) DbTimestamp uses local time for @Version field on Oracle 11g
by Chris Pheby (JIRA)
DbTimestamp uses local time for @Version field on Oracle 11g
------------------------------------------------------------
Key: HHH-5553
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5553
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0.Beta4, 3.6.0.Beta3, 3.5.5, 3.6.0.Beta2, 3.6.0.Beta1, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5.0-Final, 3.5.0-CR-2, 3.5.0-CR-1, 3.5.0-Beta-4, 3.5.0-Beta-3, 3.5.0-Beta-2, 3.5.0.Beta-1, 3.3.2
Environment: Oracle 10g2
Reporter: Chris Pheby
Attachments: dbtimestamp.patch
When you using DbTimestamp to use the database to seed the timestamp (for the @Version oplock field), this delegates to getCurrentTimestampSelectString().
On Oracle 10g this invokes "select systimestamp from dual". This returns the server's local time. This causes problems when crossing the cutoff between (for example) British Summer Time and UTC. The standard SQL function, current_timestamp (returned by getCurrentTimestampSQLFunctionName should be used instead. This always returns UTC time.
public String getCurrentTimestampSelectString() {
return "select systimestamp from dual"; // suggest changing to
// return "select " + getCurrentTimestampSQLFunctionName() + " from dual";
}
public String getCurrentTimestampSQLFunctionName() {
// the standard SQL function name is current_timestamp...
return "current_timestamp";
}
NB getCurrentTimestampSelectString() is only referenced from the DbTimestamp class
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[Hibernate-JIRA] Created: (HHH-5549) Add option for use of weak references in the session cache
by Archie Cobbs (JIRA)
Add option for use of weak references in the session cache
----------------------------------------------------------
Key: HHH-5549
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5549
Project: Hibernate Core
Issue Type: New Feature
Components: core
Affects Versions: 3.3.2
Reporter: Archie Cobbs
Hibernate's session cache requires manual action (i.e., evict() and/or clear()) to prevent it from growing without bound when iterating over a large set of entities. This was surprising to me the first time I encountered it, because most people's concept of a "cache" includes the idea of transparency, i.e., the cache is not apparent except in increased performance. Hibernate's cache, even within a read-only transaction, effectively has a built-in memory leak.
But anyway, this problem can be fixed easily. Suggest adding a new feature which would (optionally) allow the session cache to be configured to automatically evict unmodified objects that were no longer referenced.
The session cache would change to use two kinds of references to objects in the cache: normal strong references for objects that are new or modified in any way, and weak references for objects that have not been modified. Hibernate would have to switch a weakly referenced object into a strongly referenced one once it was modified.
This way, unmodified, weakly referenced objects would automatically fall out of the cache when they were no longer referenced by the application, and the "iterate over a large dataset" memory leak would be fixed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[Hibernate-JIRA] Created: (HHH-5541) Change from class to interface leads to IncompatibleClassChangeError (org.hibernate.stat.EntityStatistics and co.)
by Cédrik LIME (JIRA)
Change from class to interface leads to IncompatibleClassChangeError (org.hibernate.stat.EntityStatistics and co.)
------------------------------------------------------------------------------------------------------------------
Key: HHH-5541
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5541
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0.Beta4, 3.6.0.Beta3, 3.5.5, 3.6.0.Beta2, 3.6.0.Beta1, 3.5.4, 3.5.3, 3.5.2, 3.5.1, 3.5.0-Final
Reporter: Cédrik LIME
Hibernate 3.5.0 introduced a concurrent implementation for Statistics. Thus the classes of {{org.hibernate.stat.*}} became interfaces and lo and behold! a Java 5 concurrent implementation was born, and all rejoiced at this marvel.
But in the land of compiled binaries, some said that a {{java.lang.IncompatibleClassChangeError}} would rear its ugly head since where a Class was expected an Interface would appear, and so the current thread would stop its processing with an Error.
And it was said in the kingdom of Hibernate that documentation was forthcoming that everyone should re-compile their dependant 3rd-party libraries, whether one could access the 3rd-party sources or not.
In an ironic twist, now that Hibernate 3.6 depends on Java 5, we still have the non-concurrent implementation lying around unused...
All prose apart, this bug means I can not distribute a {{.jar}} that is compiled against Hibernate 3.1 and that works for all released Hibernate versions. I don't want impose my users the hassle to re-compile (even if I provide the source code), but I guess this 3.5.0 change leaves me no choice... This should at least be clearly documented.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months