[Hibernate-JIRA] Created: (HHH-4551) Query caching becomes very ineffective on conversations with extended sessions.
by Guenther Demetz (JIRA)
Query caching becomes very ineffective on conversations with extended sessions.
-------------------------------------------------------------------------------
Key: HHH-4551
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4551
Project: Hibernate Core
Issue Type: Improvement
Components: caching (L2)
Affects Versions: 3.3.2
Environment: 3.3.2 GA
Reporter: Guenther Demetz
Hibernate's query cache (hibernate.cache.use_query_cache) always takes the initial session timestamp
for storing the result-set timestamp.
---------------------------------------------
StandardQueryCache.java (put-method):
...
Long ts = new Long( session.getTimestamp() );
...
cacheable.add( ts );
---------------------------------------------
When extending a session for a whole conversation (Book "Java Persistence with Hibernate" chapter. 11.2.3), the sessions initial timestamp get's soon rather deferred to the time a new query result set is produced actually. Immagine a long conversation which lasts more than 5 minutes.
This leads to the effect, that often still valid result-set-cache entries are considered not up-to-date because of a flushed update action occured during the conversation.
Furthermore the new obtained query-resultset (note that this query now considers the last update!)
is subsequently again put in cache still with the original and outdated sessions-timestamp: That's for the birds !
Proposal:
Why not take the current timestamp instead?
For example calling:
Long ts = new Long( cacheRegion.nextTimestamp());
best regards
Guenther D.
--
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
14 years, 11 months
[Hibernate-JIRA] Created: (HHH-2578) redesign SessionFactory building
by Steve Ebersole (JIRA)
redesign SessionFactory building
--------------------------------
Key: HHH-2578
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2578
Project: Hibernate3
Issue Type: Improvement
Components: core
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Priority: Critical
Fix For: cfg-rework
Currently a SessionFactory is built by throwing a bunch of stuff into a Configuration object, stirring it, letting it come to a boil, and then pulling out the SessionFactory. In seriousness, there are a few problems with the way we currently operate within a Configuration and how we use it to build a SessionFactory:
The general issue that there is no "lifecycle" to when various pieces of information will be available. This is an important omission in a number of ways:
1) consider schema generation. currently we cannot even know the dialect when a lot of db object names are being determined. this would be nice because it would allow us to transparently handle table/column names which are also keywords/reserved-words in the dialect, for example.
2) static-ness of types and the type-mappings. Because we currently have nothing to which to scope them. Ideally a type instance would be aware of the SessionFactory to which it is bound. Instead, what we have now is to change API methods quite a lot of the time to add in the SessionFactory as a passed parameter whenever it is discovered that it is needed.
3) also, most (all?) of the "static" configuration parameters in Hibernate are currently required to be so because of their use from within these static types; thus scoping types would allow us to also scope those config parameters (things like bytecode-provider, use of binary streams, etc).
Ideally what I see happening is a scheme where users build a org.hibernate.cfg.Settings (or something similiar) instance themselves. Additionally they would apply metadata to a registry of some sort (lets call it MetadataRegistry for now). Then in order to build a SessionFactory, they would supply these two pieces of information (via ctor? via builder?). The important aspect though is that the information in MetadataRegistry would not be dealt with until that point in time, which would allow us to guarentee that resolving schema object names, types, etc would have access to the runtime Settings (and specifically the dialect)
--
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
14 years, 11 months
[Hibernate-JIRA] Created: (HBX-1183) Unable to install Hibernate tools from update site
by Igor Petruk (JIRA)
Unable to install Hibernate tools from update site
--------------------------------------------------
Key: HBX-1183
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1183
Project: Hibernate Tools
Issue Type: Bug
Reporter: Igor Petruk
here what is says:
{quote}
Cannot complete the install because one or more required items could not be found.
Software currently installed: Hibernate Tools 3.4.0.v20110215-1252-H31-GA (org.hibernate.eclipse.feature.feature.group 3.4.0.v20110215-1252-H31-GA)
Missing requirement: Hibernate 3.0 XML UI 3.4.0.v20110215-1252-H31-GA (org.jboss.tools.hibernate.xml.ui 3.4.0.v20110215-1252-H31-GA) requires 'bundle org.jboss.tools.common.model 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Hibernate Tools 3.4.0.v20110215-1252-H31-GA (org.hibernate.eclipse.feature.feature.group 3.4.0.v20110215-1252-H31-GA)
To: org.jboss.tools.hibernate.xml.ui [3.4.0.v20110215-1252-H31-GA]
{/quote}
--
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
14 years, 11 months