Skip to content

Conversation

sebersole
Copy link
Member

@sebersole sebersole commented Aug 14, 2025

Invesigate proper support for certain events (AbstractDatabaseOperationEvent and friends) from StatelessSession.

hibernate/hibernate-reactive#394


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19737

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Aug 14, 2025

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [ecfa948, d4b8c5b]

› This message was automatically generated.

# Conflicts:
#	hibernate-core/src/main/java/org/hibernate/event/internal/DefaultLockEventListener.java
#	hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java
@sebersole sebersole changed the title EventSource - StatelessSession and Envers HHH-19737 - Support Envers with StatelessSession Aug 26, 2025
@@ -29,7 +29,7 @@
handlePostUpsert( event.getEntity(), event.getSession() );
}

private void handlePostUpsert(Object entity, EventSource source) {
private void handlePostUpsert(Object entity, SharedSessionContractImplementor source) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'entity' is never used.
@@ -29,7 +29,7 @@
handlePostUpsert( event.getEntity(), event.getSession() );
}

private void handlePostUpsert(Object entity, EventSource source) {
private void handlePostUpsert(Object entity, SharedSessionContractImplementor source) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'source' is never used.
revisionInfoGenerator.saveRevisionData( session, revisionData );
}
}
else if ( session instanceof StatelessSessionImplementor statelessSession ) {

Check notice

Code scanning / CodeQL

Unread local variable Note

Variable 'StatelessSessionImplementor statelessSession' is never read.
@@ -34,7 +33,7 @@
* @param currentRevisionData Revision log entity.
* @param vwu Performed work unit.
*/
public void entityChanged(Session session, Object currentRevisionData, AuditWorkUnit vwu) {
public void entityChanged(SharedSessionContractImplementor session, Object currentRevisionData, AuditWorkUnit vwu) {

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'session' is never used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant