ramu11 commented on PR #27314: URL: https://github.com/apache/camel/pull/27314#issuecomment-6014908510
> Thanks @ramu11. [0826d7d](https://github.com/apache/camel/commit/0826d7d492050ae9ac48f53a632b582ccaeefdeb) and [2160447](https://github.com/apache/camel/commit/21604472195f8ad8e1654f38e5794ee5ce28d2e7) fix two things: > > * The streaming session is no longer closed twice. An `AtomicBoolean` guards both the on-completion callback and `stream.onClose`. This was gnodet-bot's finding. > * `statelessOperation` is now an enum. Lowercase `insert`/`upsert` still works, both at runtime and in catalog validation. > > The regenerated catalog `hibernate.json` and `HibernateEndpointBuilderFactory` are now current. `camel-hibernate` builds locally, its 34 tests pass, and the build leaves no uncommitted generated changes. > > Still open from my previous review: > > * **Import style:** `HibernateSessionContext` line 43 still uses `java.util.Objects` fully qualified (inline suggestion). > * **`h2-version`** is still redefined in `components/camel-hibernate/pom.xml`. The parent already defines it. > * **Docs:** please say that consumed rows are deleted by default (`consumeDelete=true`). Please also describe how the consumer and producer share a session, and the limits: filters, copied exchanges, and stateless operations, which open their own session. > * **Tests:** > > * a route-level test (hibernate consumer → hibernate producer on the same row) to show the self-deadlock is gone; > * a small test that completing the exchange _and_ closing the stream does not throw, to keep the new guard in place. > * **Pre-release dependencies:** Hibernate `8.0.0.Beta3` and Jakarta Persistence `4.0.0-M7` still need a dev@ decision, or Hibernate 8 GA. > * Croway's transaction questions are not answered yet. > * The commits still have no `Co-authored-by` trailer for the AI assistance. > > _Claude Code on behalf of davsclaus_ > > _This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying._ Thanks for the review. The following items have been addressed: - **Import style:** Updated `HibernateSessionContext` to use the regular `java.util.Objects` import. - **`h2-version`:** Removed the redundant version override from `components/camel-hibernate/pom.xml` so the parent-managed version is used. - **Docs:** Updated the Hibernate component documentation to cover the `consumeDelete=true` default, consumer → producer session reuse, and the relevant limitations around filters, copied exchanges, and stateless operations. - **Tests:** Added H2-backed coverage for `skipLocked` and route-level consumer → producer session reuse. Also added coverage for the streaming lifecycle/close guard. - **Generated files:** The catalog and Endpoint DSL are now regenerated and current. `statelessOperation` is represented as an enum while lowercase `insert`/`upsert` remain supported at runtime. - **Transaction handling:** Added validation for transacted exchanges, including rejection of resource-local `SessionFactory` usage and streaming within a transacted exchange. Consumer processing now rolls back when processing fails. For the remaining items: - **Pre-release dependencies:** This remains a project/release decision for dev@ or Hibernate 8 GA rather than a code change in this PR. - **Co-authored-by trailer:** Not applicable in this case. I am the sole author of the changes and personally reviewed and verified the implementation and tests, so I have not added a `Co-authored-by` trailer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
