[Hibernate-JIRA] Created: (HHH-5678) Entity Remains in L2 Cache After StaleObjectStateException
by j nadler (JIRA)
Entity Remains in L2 Cache After StaleObjectStateException
----------------------------------------------------------
Key: HHH-5678
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5678
Project: Hibernate Core
Issue Type: Bug
Components: caching (L2), core
Affects Versions: 3.5.6
Environment: Hibernate 3.5.6, problem has been reproduced on multiple databases (MySQL 5.1, Oracle 11g, SQL Server 2005, SQL Server 2008)
Reporter: j nadler
Priority: Critical
StaleObjectStateExceptions will happen, and the optimistic locking mechanism is a great benefit overall for our application. Unfortunately after this occurs, the invalid (version mismatch with DB) version of the entity can get 'stuck' in the L2 cache.
We could write application level code to handle this, but it's ugly and intrusive. The best solution is for Hibernate Core to evict from L2 whenever a StaleObjectStateException is thrown.
If you didn't want to change current behavior this could be configurable I guess. The default behavior should probably be 'evict'.
--
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] Commented: (HHH-1497) Allow interceptor for stateless session
by radhakrishna (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1497?page=c... ]
radhakrishna commented on HHH-1497:
-----------------------------------
We need to have an interceptor for stateless session especially when statelessSession is so powerful during bulk insert/updates.
> Allow interceptor for stateless session
> ---------------------------------------
>
> Key: HHH-1497
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1497
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1.2
> Reporter: Stephen Friedrich
> Priority: Minor
>
> I need a way to adjust the sql that is executed in a stateless session.
> Currently the constructor of StatelessSessionImpl() always uses an empty interceptor.
> Is it possible to change that, so that there is an overloaded form of the constructor that allows to pass an interceptor
> (and overloaded methods in the session factory)?
> Here's my use case:
> I am doing mass inserts to a table using a stateless session.
> DB is postgres with table partitioning for this table. Postgres implements partitioning using inherited tables. There is no fully automated way to redirect data to the appropriate table 'partition'. It is possible with postgres to define either rules or triggers that insert data to the correct inherited table.
> However that was way too slow for me (and besides there were problems with postgres reporting back an inserted row count of zero which made hibernate complain).
> I made the changes mentioned above to hibernate and it worked very well (almost ten times faster).
> See also http://forum.hibernate.org/viewtopic.php?p=2292072
--
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-2319) StatelessInterceptor
by Max Rydahl Andersen (JIRA)
StatelessInterceptor
--------------------
Key: HHH-2319
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2319
Project: Hibernate3
Type: New Feature
Components: core
Versions: 3.2.1
Reporter: Max Rydahl Andersen
It would make sense to have an Interceptor for StatelessSession to solve the following usecases:
Log/adjust SQL: onPrepareStatement
Proper entityname handling: instantiate/getEntity
Maybe also tx interaction: afterTransationBegin/beforeTransactionCompletion/afterTransactionCompletion
Technically it could be solved by just allowing to pass in a normal interceptor to a StatelessSession and just
document that the state oriented callbacks will not be called. Alternatively we can create a StatelessInterceptor that
only implement the releavant methods and wrap that instance into an internal Interceptor.
--
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: (HSEARCH-609) Able to annotate @AnalyzerDiscriminator to more than one field.
by Smallufo Huang (JIRA)
Able to annotate @AnalyzerDiscriminator to more than one field.
---------------------------------------------------------------
Key: HSEARCH-609
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-609
Project: Hibernate Search
Issue Type: Improvement
Components: analyzer
Affects Versions: 3.2.1
Environment: search 3.2.1 , core-3.5.6
Reporter: Smallufo Huang
Today , I found I cannot annotate more than one @AnalyzerDiscriminator in a class.
I feel it is very *not* intuitive. And it will make the Discriminator implementation more complicated. Because Discriminator will need to more judge *field* to decide correct analyzer , especially when the two fields are of different types.
{code:title=Sample1.java}
class Sample1
{
@Field
@AnalyzerDiscriminator(impl = LanguageDiscriminator.class)
private String title;
@Field
@AnalyzerDiscriminator(impl = AnotherDiscriminator.class)
private String content;
}
{code}
{code:title=Sample2.java}
class Sample2
{
@Field
@AnalyzerDiscriminator(impl = AnotherDiscriminator.class)
private String title;
}
{code}
See the two classes for example.
I cannot add two @AnalyzerDiscriminator in one class , and it throws {color:red}"Multiple AnalyzerDiscriminator defined in the same class hierarchy"{color} Exception.
So I have to combine LanguageDiscriminator and AnotherDiscriminator into one and use it in the 1st example. And judge Analyzer by field name : 'title' for language analyzer , and 'content' for another analyzer.
but I cannot re-use the *'CombinedDiscriminator'* to the 2nd example , because in 2nd example , the 'title' should apply AnotherDiscriminator , not LanguageDiscriminator in 1st example.
So I suggest , a class should be able to apply different Discriminators to different fields. And the Discriminator's methods should be :
{code}
public String getAnalyzerDefinitionName(Object value, Object entity) ; // remove field
{code}
It will be more flexible.
--
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: (HV-346) Improve some of the default debug/info messages
by Hardy Ferentschik (JIRA)
Improve some of the default debug/info messages
-----------------------------------------------
Key: HV-346
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-346
Project: Hibernate Validator
Issue Type: Improvement
Components: engine
Affects Versions: 4.1.0.Final
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
Fix For: 4.2.0
some of the default messages should be more verbose/descriptive.
{noformat}
util.Version Hibernate Validator 4.0.2.GA
engine.ResourceBundleMessageInterpolator ValidationMessages not found. Delegating to org.hibernate.validator.ValidationMessages
resolver.DefaultTraversableResolver Found javax.persistence.PersistenceUtil on classpath.
resolver.DefaultTraversableResolver Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
xml.ValidationXmlParser No META-INF/validation.xml found. Using annotation based configuration only
{noformat}
--
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