[Hibernate-JIRA] Created: (HHH-3021) Document that application servers may ignore Hibernate connection properties
by James Roper (JIRA)
Document that application servers may ignore Hibernate connection properties
----------------------------------------------------------------------------
Key: HHH-3021
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3021
Project: Hibernate3
Issue Type: Improvement
Components: documentation
Reporter: James Roper
Priority: Trivial
I'd just like to suggest that it would be really helpful to put a note in the configuration section of the documentation stating that JEE application servers may ignore the hibernate connection properties. For example, JDBC datasources returned by Websphere AS as shareable resource refs ignore the transaction isolation level set on them (this makes sense, if one application modifies the isolation level of a connection, it could produce unexpected results in another application). This has nothing to do with Hibernate, except that it means that the hibernate.connection.isolation property will be ignored. It would just be nice to the Hibernate users if a note was put into the documentation mentioning this before they start trying to use the hibernate properties to configure connection specific properties.
--
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
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-1582) PostInsertListener + "post-commit-insert"
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582?page=c... ]
Emmanuel Bernard commented on HHH-1582:
---------------------------------------
javax.transaction.Synchronization
and o.h.Transaction.registerSynchronization()
> PostInsertListener + "post-commit-insert"
> -----------------------------------------
>
> Key: HHH-1582
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.1.2
> Reporter: Daniel Gredler
> Assignee: Emmanuel Bernard
> Fix For: 3.3
>
> Original Estimate: 3 hours
> Remaining Estimate: 3 hours
>
> I'm using a custom PostInsertEventListener mapped to the "post-commit-insert" event to process domain objects. However, PostInsertEventListener's onPostInsert(PostInsertEvent) is getting called even when the insert was not successful (ie, due to a unique constraint in the database or some such). It looks to me like Hibernate should either a) not invoke the event listener if the insert failed or b) provide state (perhaps in the form of a boolean indicating success/failure). Personally I'd rather the method not be called on failure, but there may be use cases out there for the second option.
> As an example, it looks like Hibernate's own LuceneEventListener will add a domain object to the index in onPostInsert(PostInsertEvent) even if the insert failed.
> Note that this problem also seems to exist in EntityDeleteAction and EntityUpdateAction (which would mean that Hibernate's LuceneEventListener removes domain objects from the Lucene index even if the delete fails!).
--
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
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-1582) PostInsertListener + "post-commit-insert"
by Darren Bell (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582?page=c... ]
Darren Bell commented on HHH-1582:
----------------------------------
Could you explain "Transaction synchronization" please.
> PostInsertListener + "post-commit-insert"
> -----------------------------------------
>
> Key: HHH-1582
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1582
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.1.2
> Reporter: Daniel Gredler
> Assignee: Emmanuel Bernard
> Fix For: 3.3
>
> Original Estimate: 3 hours
> Remaining Estimate: 3 hours
>
> I'm using a custom PostInsertEventListener mapped to the "post-commit-insert" event to process domain objects. However, PostInsertEventListener's onPostInsert(PostInsertEvent) is getting called even when the insert was not successful (ie, due to a unique constraint in the database or some such). It looks to me like Hibernate should either a) not invoke the event listener if the insert failed or b) provide state (perhaps in the form of a boolean indicating success/failure). Personally I'd rather the method not be called on failure, but there may be use cases out there for the second option.
> As an example, it looks like Hibernate's own LuceneEventListener will add a domain object to the index in onPostInsert(PostInsertEvent) even if the insert failed.
> Note that this problem also seems to exist in EntityDeleteAction and EntityUpdateAction (which would mean that Hibernate's LuceneEventListener removes domain objects from the Lucene index even if the delete fails!).
--
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
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-443) AssertionFailure occurs with listeners on models with many-to-many collection.
by Adrian Pillinger (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-443?page=co... ]
Adrian Pillinger commented on HHH-443:
--------------------------------------
We use a new session in the listener and still encounter this bug.
> AssertionFailure occurs with listeners on models with many-to-many collection.
> -------------------------------------------------------------------------------
>
> Key: HHH-443
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-443
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.2
> Environment: Hibernate version 3.0.2
> Oracle9i
> Reporter: Tom Kucharski
>
> The problem occurs when insert or update listener is created on hibernate session on model with many-to-many collection and listener is making some queries with this model.
> The listener is needed for checking data integrity , so I need to make some select clauses within this listener.
> That is my code from PreInsertEventListener.onPreInsert() method (some lines were removed for clearance) :
> //I set this on FlushMode.NEVER because StackOverflowError is thrown
> event.getSession().setFlushMode(FlushMode.NEVER);
> // Function below makes database query using criteria API
> String o = listener.validate(event.getEntity(),event.getSession());
> if (o != null) {
> // I don't know if this is correct, but why not?? I don't catch this exception in my code and I have auto_close_session and auto_flush_session on true
> throw new ConstraintViolationException(o,null,null);
> }
> // set to default settings
> event.getSession().setFlushMode(FlushMode.AUTO);
> That's exception from my WebLogic 8.1 server
> <2005-05-05 18:05:15 CEST> <Error> <org.hibernate.AssertionFailure> <000000> <an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)
> org.hibernate.AssertionFailure: collection was not processed by flush()
> at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:144)
> at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:305)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:678)
> at pl.softbank.cepik.modris.common.client.util.DefaultModrisClient.updateObject(DefaultModrisClient.java:196)
> at pl.softbank.cepik.modris.dict.common.client.CommonDictModrisClient.insert(CommonDictModrisClient.java:71)
--
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
18 years, 3 months