You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "ramu11 (via GitHub)" <gi...@apache.org> on 2026/10/16 06:46:54 UTC

[PR] Camel 21873 hibernate [camel]

ramu11 opened a new pull request, #27935:
URL: https://github.com/apache/camel/pull/27935

   This PR replaces #27314.
   
   The original fork was accidentally deleted, causing the original PR to close. I recovered the original 25 commits and pushed them to my recreated fork.
   
   Original PR: https://github.com/apache/camel/pull/27314
   
   The changes and commit history have been preserved.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27935:
URL: https://github.com/apache/camel/pull/27935#issuecomment-6214227450

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `bom/camel-bom`
   - `catalog/camel-allcomponents`
   - `catalog/camel-catalog`
   - `components`
   - `components/camel-hibernate`
   - `core/camel-main`
   - `core/camel-util`
   - `docs`
   - `dsl/camel-componentdsl`
   - `dsl/camel-endpointdsl`
   - `dsl/camel-kamelet-main`
   - `parent`
   
   > :information_source: Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the `test-dependents` label to force testing all dependents.
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 584 of 707 tested, 0 compile-only — current: 583 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **584 affected modules** (current approach: 583).
   
   **Skip-tests mode would test 584 modules** (11 direct + 30 downstream), **skip tests for 0** (generated code, meta-modules)
   
   <details><summary>:warning: Modules only in Scalpel (1)</summary>
   
   - `camel-bom`
   
   </details>
   
   
   <details><summary>Modules Scalpel would test (584)</summary>
   
   - `archetypes` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-a2a` ← depends on affected reactor module org.apache.camel:camel-platform-http-vertx
   - `camel-activemq` ← depends on affected reactor module org.apache.camel:camel-test-infra-artemis
   - `camel-activemq6` ← depends on affected reactor module org.apache.camel:camel-test-infra-artemis
   - `camel-ai-observability` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ai-observability-api` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ai-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-ai-resource` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ai-tool` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-common` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-alibaba-eventbridge` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-fc` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-kms` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-mns` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-oss` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-ots` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-alibaba-sls` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-alibaba-sms` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-amqp` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-api` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-api-component-maven-plugin` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-arangodb` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-archetype-api-component` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-archetype-component` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-archetype-dataformat` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-archetype-java` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-archetype-main` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-as2` ← depends on affected reactor module org.apache.camel:camel-jetty
   - `camel-as2-api` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-as2-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-asn1` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-asterisk` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-atmosphere-websocket` ← depends on affected reactor module org.apache.camel:camel-test-infra-jetty
   - `camel-atom` ← depends on affected reactor module org.apache.camel:camel-test-infra-jetty
   - `camel-attachments` ← depends on affected reactor module org.apache.camel:camel-bean
   - `camel-avro` ← depends on affected reactor module org.apache.camel:camel-spring-xml
   - `camel-avro-rpc` ← depends on affected reactor module org.apache.camel:camel-spring-xml
   - `camel-avro-rpc-jetty` ← depends on affected reactor module org.apache.camel:camel-api
   - `camel-avro-rpc-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-avro-rpc-spi` ← downstream of org.apache.camel:camel-core-model
   - `camel-aws-bedrock` ← depends on affected reactor module org.apache.camel:camel-base64
   - `camel-aws-cloudtrail` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws-common` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-aws-config` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-aws-parameter-store` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-aws-secrets-manager` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws-security-hub` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-athena` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-comprehend` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-cw` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-ddb` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-ec2` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-ecs` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-eks` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-eventbridge` ← depends on affected reactor module org.apache.camel:camel-aws2-sqs
   - `camel-aws2-iam` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-kinesis` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-aws2-kms` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-aws2-lambda` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-mq` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-msk` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-polly` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-redshift` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-rekognition` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-s3` ← depends on affected reactor module org.apache.camel:camel-zip-deflater
   - `camel-aws2-s3-vectors` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-ses` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-sns` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-sqs` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-step-functions` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-sts` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-aws2-textract` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-timestream` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-aws2-transcribe` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-aws2-translate` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-azure-common` ← downstream of org.apache.camel:camel-core-model
   - `camel-azure-cosmosdb` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-azure-eventgrid` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-azure-eventhubs` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-azure-files` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-azure-functions` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-azure-key-vault` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-azure-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-azure-schema-registry` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-azure-servicebus` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-azure-storage-blob` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-azure-storage-datalake` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-azure-storage-queue` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-barcode` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-base` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-base-engine` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-base64` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-bean` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-bean-validator` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-beanio` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-bindy` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-bom` ← own pom bom/camel-bom/pom.xml changed
   - `camel-bonita` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-box` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-box-api` ← depends on affected reactor module org.apache.camel:camel-api
   - `camel-box-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-braintree` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-browse` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-caffeine` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-camunda` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cassandraql` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-catalog-common` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-cbor` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-chatscript` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-chunk` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cli-connector` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cli-debug` ← depends on affected reactor module org.apache.camel:camel-cli-connector
   - `camel-clickhouse` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-clickup` ← depends on affected reactor module org.apache.camel:camel-netty-http
   - `camel-cloudevents` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cluster` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-cm-sms` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-coap` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cometd` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-console` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-consul` ← depends on affected reactor module org.apache.camel:camel-spring-main
   - `camel-controlbus` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-core` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-core-all` ← depends on affected reactor module org.apache.camel:camel-xml-jaxp
   - `camel-core-catalog` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-core-engine` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-core-languages` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-core-model` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-core-processor` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-core-reifier` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-core-xml` ← depends on affected reactor module org.apache.camel:camel-core-engine
   - `camel-couchbase` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-couchdb` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cron` ← depends on affected reactor module org.apache.camel:camel-timer
   - `camel-crypto` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-crypto-pgp` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-csv` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-cxf-common` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cxf-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-cxf-rest` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-cxf-soap` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-cxf-spring-common` ← depends on affected reactor module org.apache.camel:camel-http-base
   - `camel-cxf-spring-rest` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-cxf-spring-soap` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-cxf-spring-transport` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cxf-transport` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-cyberark-vault` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dapr` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dataformat` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-dataset` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-datasonnet` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-dataweave` ← downstream of org.apache.camel:camel-core-model
   - `camel-debezium-common` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-debezium-common-parent` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-debezium-db2` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-debezium-maven-plugin` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-debezium-mongodb` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-debezium-mysql` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-debezium-oracle` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-debezium-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-debezium-postgres` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-debezium-sqlserver` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-debug` ← depends on affected reactor module org.apache.camel:camel-xml-io
   - `camel-dependencies` ← downstream of org.apache.camel:sync-properties-maven-plugin
   - `camel-dfdl` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dhis2` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dhis2-api` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dhis2-parent` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-diagram` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-direct` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-disruptor` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-djl` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dns` ← depends on affected reactor module org.apache.camel:camel-log
   - `camel-docker` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-docling` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-drill` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dropbox` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dsl-modeline` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dsl-support` ← depends on affected reactor module org.apache.camel:camel-core-model
   - `camel-duckdb` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-dynamic-router` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-ehcache` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-eip-documentation-enricher-maven-plugin` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-elasticsearch` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-elasticsearch-rest-client` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-event` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-exec` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-fastjson` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-fhir` ← depends on affected reactor module org.apache.camel:camel-hl7
   - `camel-fhir-api` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-fhir-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-file` ← depends on affected reactor module org.apache.camel:camel-core-engine
   - `camel-file-watch` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-flatpack` ← depends on affected reactor module org.apache.camel:camel-direct
   - `camel-flink` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-flowable` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-fop` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-fory` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-freemarker` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-ftp` ← depends on affected reactor module org.apache.camel:camel-spring-xml
   - `camel-ftp-common` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-geocoder` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-git` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-github2` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-bigquery` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-calendar` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-common` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-google-drive` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-firestore` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-functions` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-mail` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-google-pubsub` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-secret-manager` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-sheets` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-google-speech-to-text` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-storage` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-text-to-speech` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-vertexai` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-google-vision` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-graphql` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-grok` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-groovy` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-grpc` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-gson` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-hashicorp-vault` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-hazelcast` ← depends on affected reactor module org.apache.camel:camel-spring-main
   - `camel-health` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-hibernate` ← components/camel-hibernate/src/generated/java/org/apache/camel/component/hibernate/HibernateComponentConfigurer.java, components/camel-hibernate/src/generated/java/org/apache/camel/component/hibernate/HibernateEndpointConfigurer.java, components/camel-hibernate/src/generated/java/org/apache/camel/component/hibernate/HibernateEndpointUriFactory.java, components/camel-hibernate/src/generated/resources/META-INF/org/apache/camel/component/hibernate/hibernate.json, components/camel-hibernate/src/generated/resources/META-INF/services/org/apache/camel/component.properties, components/camel-hibernate/src/generated/resources/META-INF/services/org/apache/camel/component/hibernate, components/camel-hibernate/src/generated/resources/META-INF/services/org/apache/camel/configurer/hibernate-component, components/camel-hibernate/src/generated/resources/META-INF/services/org/apache/camel/configurer/hibernate-endpoint, components/camel-hibernate/src/generated/resources/META-
 INF/services/org/apache/camel/urifactory/hibernate-endpoint, components/camel-hibernate/src/main/docs/hibernate-component.adoc, components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateComponent.java, components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateConstants.java, components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateConsumer.java, components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateEndpoint.java, components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateProducer.java, components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateSessionContext.java, components/camel-hibernate/src/test/java/org/apache/camel/component/hibernate/HibernateBootstrapTest.java, components/camel-hibernate/src/test/java/org/apache/camel/component/hibernate/HibernateEndpointTest.java, components/camel-hibernate/src/test/
 java/org/apache/camel/component/hibernate/entity/HibernateTestEntity.java, components/camel-hibernate/src/test/java/org/apache/camel/component/hibernate/entity/package-info.java, own pom components/camel-hibernate/pom.xml changed
   - `camel-hivemq` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-hl7` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-http` ← depends on affected reactor module org.apache.camel:camel-test-infra-jetty
   - `camel-http-base` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-http-common` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-huawei-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-huaweicloud-common` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-huaweicloud-dms` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-huaweicloud-frs` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-huaweicloud-functiongraph` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-huaweicloud-iam` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-huaweicloud-imagerecognition` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-huaweicloud-obs` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-huaweicloud-smn` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-huggingface` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ibm-cos` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ibm-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-ibm-secrets-manager` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ibm-watson-discovery` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ibm-watson-language` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ibm-watson-speech-to-text` ← depends on affected reactor module org.apache.camel:camel-ibm-watson-text-to-speech
   - `camel-ibm-watson-text-to-speech` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ibm-watsonx-ai` ← depends on affected reactor module org.apache.camel:camel-vertx-websocket
   - `camel-ibm-watsonx-data` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ical` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-iggy` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-ignite` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-infinispan` ← depends on affected reactor module org.apache.camel:camel-stub
   - `camel-infinispan-common` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-infinispan-embedded` ← depends on affected reactor module org.apache.camel:camel-log
   - `camel-infinispan-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-influxdb` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-influxdb2` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-iso8583` ← depends on affected reactor module org.apache.camel:camel-groovy
   - `camel-jackson` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-jackson-avro` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jackson-protobuf` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jackson3` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-jackson3-avro` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jackson3-protobuf` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jackson3xml` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-jacksonxml` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-jactl` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-jandex` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-jasypt` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-java-io` ← depends on affected reactor module org.apache.camel:camel-xml-io
   - `camel-java-joor-dsl` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-javascript` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-jaxb` ← depends on affected reactor module org.apache.camel:camel-spring-xml
   - `camel-jbang-console` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-jbang-mcp` ← depends on affected reactor module org.apache.camel:camel-xml-io-dsl
   - `camel-jbang-plugin-mcp` ← depends on affected reactor module org.apache.camel:camel-jbang-core
   - `camel-jbang-plugin-tui` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jbang-plugin-validate` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jcache` ← depends on affected reactor module org.apache.camel:camel-core-languages
   - `camel-jcr` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jdbc` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-jetty` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-jetty-common` ← depends on affected reactor module org.apache.camel:camel-jaxb
   - `camel-jfr` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-jgroups` ← depends on affected reactor module org.apache.camel:camel-master
   - `camel-jgroups-raft` ← depends on affected reactor module org.apache.camel:camel-master
   - `camel-jira` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jms` ← depends on affected reactor module org.apache.camel:camel-test-infra-artemis
   - `camel-jmx` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jolt` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jooq` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-joor` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-jpa` ← effective property camel.surefire.fork.additional-vmargs
   - `camel-jq` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-jsch` ← depends on affected reactor module org.apache.camel:camel-ssh
   - `camel-jslt` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-json-validator` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jsonapi` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-jsonata` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jsonb` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-jsonpath` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-jsoup` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-jt400` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-jta` ← depends on affected reactor module org.apache.camel:camel-sql
   - `camel-jte` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-kafka` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-kafka-common` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-kafka-share` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-kamelet` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-kamelet-main-support` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-keycloak` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-knative` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-knative-api` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-knative-http` ← depends on affected reactor module org.apache.camel:camel-http
   - `camel-knative-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-kserve` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-kubernetes` ← depends on affected reactor module org.apache.camel:camel-log
   - `camel-kudu` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-langchain4j-agent` ← depends on affected reactor module org.apache.camel:camel-telemetry
   - `camel-langchain4j-agent-api` ← depends on affected reactor module org.apache.camel:camel-api
   - `camel-langchain4j-chat` ← depends on affected reactor module org.apache.camel:camel-telemetry
   - `camel-langchain4j-core` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-langchain4j-embeddings` ← depends on affected reactor module org.apache.camel:camel-test-infra-qdrant
   - `camel-langchain4j-embeddingstore` ← depends on affected reactor module org.apache.camel:camel-test-infra-qdrant
   - `camel-langchain4j-embeddingstore-api` ← depends on affected reactor module org.apache.camel:camel-api
   - `camel-langchain4j-ingest` ← depends on affected reactor module org.apache.camel:camel-test-infra-qdrant
   - `camel-langchain4j-tokenizer` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-langchain4j-web-search` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-language` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-launcher-container` ← depends on affected reactor module org.apache.camel:camel-launcher
   - `camel-ldap` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ldif` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-log` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-lra` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-lucene` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-lumberjack` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-lzf` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-mail` ← depends on affected reactor module org.apache.camel:camel-quartz
   - `camel-mail-microsoft-oauth` ← depends on affected reactor module org.apache.camel:camel-mail
   - `camel-main` ← core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
   - `camel-management` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-management-api` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-mapstruct` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-master` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-maven-plugin` ← depends on affected reactor module org.apache.camel:camel-spring-main
   - `camel-mcp-server` ← depends on affected reactor module org.apache.camel:camel-openai
   - `camel-mcp-server-api` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-mdc` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-metrics` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-micrometer` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-micrometer-observability` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-micrometer-prometheus` ← depends on affected reactor module org.apache.camel:camel-platform-http-main
   - `camel-microprofile-config` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-microprofile-fault-tolerance` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-microprofile-health` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-microprofile-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-milo` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-milvus` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-mina` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-mina-sftp` ← depends on affected reactor module org.apache.camel:camel-core-languages
   - `camel-minio` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-mllp` ← depends on affected reactor module org.apache.camel:camel-test-infra-artemis
   - `camel-mock` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-mongodb` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-mongodb-gridfs` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-mustache` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-mvel` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-mybatis` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-nats` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-neo4j` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-netty` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-netty-http` ← depends on affected reactor module org.apache.camel:camel-jetty
   - `camel-oaipmh` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-oauth` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-observability-services` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-observation` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-ocsf` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-odata` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ognl` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-olingo2` ← depends on affected reactor module org.apache.camel:camel-test-infra-jetty
   - `camel-olingo2-api` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-olingo2-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-olingo4` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-olingo4-api` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-olingo4-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-once` ← depends on affected reactor module org.apache.camel:camel-groovy
   - `camel-opa` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-openai` ← depends on affected reactor module org.apache.camel:camel-jackson
   - `camel-openapi-java` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-openapi-rest-dsl-generator` ← depends on affected reactor module org.apache.camel:camel-core-engine
   - `camel-openapi-validator` ← depends on affected reactor module org.apache.camel:camel-platform-http-vertx
   - `camel-openfeature` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-openfga` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-opensearch` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-openstack` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-opentelemetry` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-opentelemetry-metrics` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-opentelemetry2` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-optaplanner` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-paho` ← depends on affected reactor module org.apache.camel:camel-test-infra-artemis
   - `camel-paho-mqtt5` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-parquet-avro` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-pdf` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-pg-replication-slot` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-pgevent` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-pgvector` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-pinecone` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-platform-http` ← depends on affected reactor module org.apache.camel:camel-http
   - `camel-platform-http-jolokia` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-platform-http-main` ← depends on affected reactor module org.apache.camel:camel-openapi-java
   - `camel-platform-http-vertx` ← depends on affected reactor module org.apache.camel:camel-vertx-http
   - `camel-plc4x` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-pqc` ← depends on affected reactor module org.apache.camel:camel-crypto
   - `camel-printer` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-protobuf` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-pubnub` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-pulsar` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-python` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-python3` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-qdrant` ← depends on affected reactor module org.apache.camel:camel-test-infra-qdrant
   - `camel-quartz` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-quickfix` ← depends on affected reactor module org.apache.camel:camel-jetty
   - `camel-quickjs` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-reactive-streams` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-reactor` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-redis` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-ref` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-resilience4j` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-resilience4j-micrometer` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-resourceresolver-github` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-rest` ← depends on affected reactor module org.apache.camel:camel-core-languages
   - `camel-rest-openapi` ← depends on affected reactor module org.apache.camel:camel-vertx-http
   - `camel-rest-postman` ← depends on affected reactor module org.apache.camel:camel-vertx-http
   - `camel-restdsl-openapi-plugin` ← depends on affected reactor module org.apache.camel:camel-jetty
   - `camel-robotframework` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-rocketmq` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-rss` ← depends on affected reactor module org.apache.camel:camel-test-infra-jetty
   - `camel-rxjava` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-saga` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-salesforce` ← depends on affected reactor module org.apache.camel:camel-core-catalog
   - `camel-salesforce-codegen` ← depends on affected reactor module org.apache.camel:camel-salesforce
   - `camel-salesforce-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-sap-netweaver` ← depends on affected reactor module org.apache.camel:camel-velocity
   - `camel-saxon` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-scheduler` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-schematron` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-seda` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-semantic` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-semantic-openai` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-semantic-typesafe-ai` ← depends on affected reactor module org.apache.camel:camel-xml-io-dsl
   - `camel-semantic-wolf-defender` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-servicenow` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-servicenow-maven-plugin` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-servicenow-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-servlet` ← depends on affected reactor module org.apache.camel:camel-gson
   - `camel-shell` ← depends on affected reactor module org.apache.camel:camel-test-junit5
   - `camel-shiro` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-sjms` ← depends on affected reactor module org.apache.camel:camel-test-infra-artemis
   - `camel-sjms2` ← depends on affected reactor module org.apache.camel:camel-test-infra-artemis
   - `camel-slack` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-smb` ← depends on affected reactor module org.apache.camel:camel-test-infra-smb
   - `camel-smooks` ← depends on affected reactor module org.apache.camel:camel-attachments
   - `camel-smpp` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-snakeyaml` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-snmp` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-soap` ← depends on affected reactor module org.apache.camel:camel-cxf-soap
   - `camel-solr` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-spiffe` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-splunk-hec` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-spring` ← depends on affected reactor module org.apache.camel:camel-cron
   - `camel-spring-ai-chat` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-spring-ai-embeddings` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-spring-ai-image` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-spring-ai-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-spring-ai-vector-store` ← depends on affected reactor module org.apache.camel:camel-test-infra-qdrant
   - `camel-spring-batch` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-spring-cloud-config` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-spring-jdbc` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-spring-ldap` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-spring-main` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-spring-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-spring-rabbitmq` ← depends on affected reactor module org.apache.camel:camel-http
   - `camel-spring-redis` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-spring-security` ← depends on affected reactor module org.apache.camel:camel-core-xml
   - `camel-spring-ws` ← depends on affected reactor module org.apache.camel:camel-jaxb
   - `camel-spring-xml` ← depends on affected reactor module org.apache.camel:camel-cron
   - `camel-sql` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-ssh` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-state-store` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-state-store-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-stax` ← depends on affected reactor module org.apache.camel:camel-jaxb
   - `camel-stitch` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-stream` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-streamcaching-test` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-stringtemplate` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-stripe` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-stub` ← depends on affected reactor module org.apache.camel:camel-seda
   - `camel-support` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-swift` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-syslog` ← depends on affected reactor module org.apache.camel:camel-mina
   - `camel-tahu` ← depends on affected reactor module org.apache.camel:camel-test-infra-core
   - `camel-tarfile` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-telegram` ← depends on affected reactor module org.apache.camel:camel-netty-http
   - `camel-telemetry` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-telemetry-dev` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-tensorflow-serving` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-test-citrus` ← depends on affected reactor module org.apache.camel:camel-direct
   - `camel-test-infra-all` ← depends on affected reactor module org.apache.camel:camel-test-infra-qdrant
   - `camel-test-infra-artemis` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-test-infra-cli` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-test-infra-core` ← depends on affected reactor module org.apache.camel:camel-core
   - `camel-test-infra-jetty` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-test-infra-qdrant` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-test-infra-smb` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-test-junit5` ← depends on affected reactor module org.apache.camel:camel-xml-jaxb
   - `camel-test-junit6` ← depends on affected reactor module org.apache.camel:camel-xml-jaxb
   - `camel-test-main-junit5` ← depends on affected reactor module org.apache.camel:camel-yaml-io
   - `camel-test-main-junit6` ← depends on affected reactor module org.apache.camel:camel-yaml-io
   - `camel-test-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-test-spring-junit5` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-test-spring-junit6` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-thrift` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-thymeleaf` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-tika` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-timer` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-tooling-maven` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-toon` ← depends on affected reactor module org.apache.camel:camel-test-junit5
   - `camel-tracing` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-twilio` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-twitter` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-typesafe-ai` ← depends on affected reactor module org.apache.camel:camel-xml-io-dsl
   - `camel-ubl` ← depends on affected reactor module org.apache.camel:camel-test-junit5
   - `camel-undertow` ← depends on affected reactor module org.apache.camel:camel-openapi-java
   - `camel-undertow-spring-security` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-univocity-parsers` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-util` ← core/camel-util/src/main/java/org/apache/camel/util/ArtifactUtils.java
   - `camel-validator` ← depends on affected reactor module org.apache.camel:camel-xml-jaxp
   - `camel-velocity` ← depends on affected reactor module org.apache.camel:camel-management
   - `camel-vertx` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-vertx-common` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-vertx-http` ← depends on affected reactor module org.apache.camel:camel-undertow
   - `camel-vertx-parent` ← downstream of org.apache.camel:camel-core-model
   - `camel-vertx-websocket` ← depends on affected reactor module org.apache.camel:camel-main
   - `camel-wal` ← depends on affected reactor module org.apache.camel:camel-support
   - `camel-wasm` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-weather` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-weaviate` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-web3j` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-webhook` ← depends on affected reactor module org.apache.camel:camel-netty-http
   - `camel-whatsapp` ← depends on affected reactor module org.apache.camel:camel-netty-http
   - `camel-wordpress` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-workday` ← depends on affected reactor module org.apache.camel:camel-mock
   - `camel-xchange` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xj` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xml-io` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-xml-io-dsl` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xml-jaxb` ← depends on affected reactor module org.apache.camel:camel-core-model
   - `camel-xml-jaxb-dsl` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xml-jaxb-dsl-test-definition` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xml-jaxb-dsl-test-spring` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xml-jaxp` ← depends on affected reactor module org.apache.camel:camel-util
   - `camel-xmlsecurity` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xmpp` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-xpath` ← depends on affected reactor module org.apache.camel:camel-xml-jaxp
   - `camel-xslt` ← depends on affected reactor module org.apache.camel:camel-xml-jaxp
   - `camel-xslt-saxon` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-yaml-dsl-common` ← depends on affected reactor module org.apache.camel:camel-core-engine
   - `camel-yaml-dsl-validator` ← depends on affected reactor module org.apache.camel:camel-xml-io
   - `camel-yaml-dsl-validator-maven-plugin` ← depends on affected reactor module org.apache.camel:camel-yaml-dsl-validator
   - `camel-yaml-io` ← depends on affected reactor module org.apache.camel:camel-xml-io
   - `camel-zendesk` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-zip-deflater` ← depends on affected reactor module org.apache.camel:camel-test-junit6
   - `camel-zipfile` ← depends on affected reactor module org.apache.camel:camel-test-spring-junit6
   - `camel-zookeeper` ← depends on affected reactor module org.apache.camel:camel-master
   - `camel-zookeeper-master` ← depends on affected reactor module org.apache.camel:camel-ftp
   - `components` ← downstream of org.apache.camel:camel-core-model
   - `sync-properties-maven-plugin` ← depends on affected reactor module org.apache.camel:camel-util
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `components`: 93 test(s) disabled on GitHub Actions
   
   <details><summary>Build reactor — dependencies compiled but only changed modules were tested (12 modules, 3m 3s total)</summary>
   
   **Total reactor time:** 3m 3s
   
   | Module | Duration | Status |
   | --- | --- | --- |
   | Camel :: Component DSL | 54.1s | SUCCESS |
   | Camel :: Main | 40.2s | SUCCESS |
   | Camel :: Catalog :: Camel Catalog | 24.1s | SUCCESS |
   | Camel :: Hibernate | 19.2s | SUCCESS |
   | Camel :: Docs | 15.7s | SUCCESS |
   | Camel :: Kamelet Main | 11.2s | SUCCESS |
   | Camel :: Util | 9.6s | SUCCESS |
   | Camel :: All Components Sync point | 4.8s | SUCCESS |
   | Camel :: Components | 3.5s | SUCCESS |
   | Camel :: Parent | 0.9s | SUCCESS |
   | Camel :: BOM | 0.1s | SUCCESS |
   | Camel :: Endpoint DSL | n/a |  |
   
   **Top 20 slowest modules:**
   - `Camel :: Component DSL` (54.1s)
   - `Camel :: Main` (40.2s)
   - `Camel :: Catalog :: Camel Catalog` (24.1s)
   - `Camel :: Hibernate` (19.2s)
   - `Camel :: Docs` (15.7s)
   - `Camel :: Kamelet Main` (11.2s)
   - `Camel :: Util` (9.6s)
   - `Camel :: All Components Sync point` (4.8s)
   - `Camel :: Components` (3.5s)
   - `Camel :: Parent` (0.9s)
   - `Camel :: BOM` (0.1s)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/38889994156)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27935:
URL: https://github.com/apache/camel/pull/27935#discussion_r4293891112


##########
components/camel-hibernate/src/test/java/org/apache/camel/component/hibernate/HibernateBootstrapTest.java:
##########
@@ -0,0 +1,1331 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.component.hibernate;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Stream;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Route;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.hibernate.entity.HibernateTestEntity;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.engine.DefaultUnitOfWork;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.h2.jdbcx.JdbcDataSource;
+import org.hibernate.Filter;
+import org.hibernate.KeyType;
+import org.hibernate.LockMode;
+import org.hibernate.Session;
+import org.hibernate.SessionBuilder;
+import org.hibernate.SessionFactory;
+import org.hibernate.Timeouts;
+import org.hibernate.Transaction;
+import org.hibernate.engine.spi.SessionFactoryImplementor;
+import org.hibernate.query.MutationQuery;
+import org.hibernate.query.SelectionQuery;
+import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder;
+import org.hibernate.service.spi.ServiceRegistryImplementor;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class HibernateBootstrapTest extends CamelTestSupport {
+
+    @Test
+    public void testExplicitSessionFactoryReuseAndNoClose() throws Exception {
+        SessionFactory mockSf = Mockito.mock(SessionFactory.class);
+
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.setSessionFactory(mockSf);
+        comp.start();
+
+        assertSame(mockSf, comp.getSessionFactory());
+        comp.stop();
+
+        Mockito.verify(mockSf, Mockito.never()).close();
+    }
+
+    @Test
+    public void testRegistrySessionFactoryReuseAndNoClose() throws Exception {
+        SessionFactory mockSf = Mockito.mock(SessionFactory.class);
+        context.getRegistry().bind("registrySf", mockSf);
+
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.start();
+
+        assertSame(mockSf, comp.getSessionFactory());
+        comp.stop();
+
+        Mockito.verify(mockSf, Mockito.never()).close();
+    }
+
+    @Test
+    public void testComponentCreatedSessionFactoryClosesOnStop() throws Exception {
+        HibernateComponent comp = createComponent("testDs", "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1");
+
+        SessionFactory sf = comp.getSessionFactory();
+        assertNotNull(sf);
+        assertFalse(sf.isClosed());
+
+        comp.stop();
+        assertTrue(sf.isClosed());
+    }
+
+    @Test
+    public void testInvalidDataSourceRegistryNameFails() {
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.setDataSource("nonExistentDs");
+
+        Exception ex = assertThrows(Exception.class, comp::start);
+        assertTrue(ex.getMessage().contains("DataSource bean with name 'nonExistentDs' could not be found"));
+    }
+
+    @Test
+    public void testInvalidSchemaActionFails() {
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.setSchemaAction("invalid-action");
+
+        Exception ex = assertThrows(Exception.class, comp::start);
+        assertTrue(ex.getMessage().contains("Invalid schemaAction"));
+    }
+
+    @Test
+    public void testSelectionQueryProducer() throws Exception {
+        HibernateComponent comp = createComponent(
+                "selectionDs",
+                "jdbc:h2:mem:selectiondb;DB_CLOSE_DELAY=-1",
+                HibernateTestEntity.class);
+
+        HibernateEndpoint endpoint = new HibernateEndpoint();
+        endpoint.setCamelContext(context);
+        endpoint.setSessionFactory(comp.getSessionFactory());
+        endpoint.setEntityClassName(HibernateTestEntity.class.getName());
+        endpoint.setSelectionQuery("from HibernateTestEntity");
+
+        endpoint.start();
+
+        Exchange exchange = context.getEndpoint("direct:test").createExchange();
+        exchange.getMessage().setHeader(HibernateConstants.HIBERNATE_PARAMETERS, Map.of());
+
+        try (HibernateProducer producer = new HibernateProducer(endpoint)) {
+            producer.process(exchange);
+        }
+
+        assertNotNull(exchange.getMessage().getBody());
+        assertTrue(exchange.getMessage().getBody() instanceof List);
+        assertTrue(((List<?>) exchange.getMessage().getBody()).isEmpty());
+
+        endpoint.stop();
+        comp.stop();
+    }
+
+    @Test
+    public void testMutationQueryProducer() throws Exception {
+        HibernateComponent comp = createComponent(
+                "mutationDs",
+                "jdbc:h2:mem:mutationdb;DB_CLOSE_DELAY=-1",
+                HibernateTestEntity.class);
+
+        HibernateEndpoint endpoint = new HibernateEndpoint();
+        endpoint.setCamelContext(context);
+        endpoint.setSessionFactory(comp.getSessionFactory());
+        endpoint.setEntityClassName(HibernateTestEntity.class.getName());
+        endpoint.setMutationQuery("delete from HibernateTestEntity");
+
+        endpoint.start();
+
+        Exchange exchange = context.getEndpoint("direct:test").createExchange();
+        exchange.getMessage().setHeader(HibernateConstants.HIBERNATE_PARAMETERS, Map.of());
+
+        try (HibernateProducer producer = new HibernateProducer(endpoint)) {
+            producer.process(exchange);
+        }
+
+        assertEquals(0, exchange.getMessage().getBody());
+
+        endpoint.stop();
+        comp.stop();
+    }
+
+    @Test
+    public void testSchemaActionsAcceptedValues() {
+        String[] actions = { "none", "validate", "update", "create" };

Review Comment:
   ⚠️ **Incomplete coverage — still open**
   
   This test only validates 4 of the 7 schema action values accepted by `validateSchemaAction()`. The values `"create-drop"`, `"create-only"`, and `"drop"` are missing.
   
   ```suggestion
           String[] actions = { "none", "validate", "update", "create", "create-drop", "create-only", "drop" };
   ```
   
   Consider also adding a negative test to confirm that an invalid value throws `IllegalArgumentException`.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27935:
URL: https://github.com/apache/camel/pull/27935#discussion_r4293819932


##########
components/camel-hibernate/src/test/java/org/apache/camel/component/hibernate/HibernateBootstrapTest.java:
##########
@@ -0,0 +1,1331 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.component.hibernate;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Stream;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Route;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.hibernate.entity.HibernateTestEntity;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.engine.DefaultUnitOfWork;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.h2.jdbcx.JdbcDataSource;
+import org.hibernate.Filter;
+import org.hibernate.KeyType;
+import org.hibernate.LockMode;
+import org.hibernate.Session;
+import org.hibernate.SessionBuilder;
+import org.hibernate.SessionFactory;
+import org.hibernate.Timeouts;
+import org.hibernate.Transaction;
+import org.hibernate.engine.spi.SessionFactoryImplementor;
+import org.hibernate.query.MutationQuery;
+import org.hibernate.query.SelectionQuery;
+import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder;
+import org.hibernate.service.spi.ServiceRegistryImplementor;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class HibernateBootstrapTest extends CamelTestSupport {
+
+    @Test
+    public void testExplicitSessionFactoryReuseAndNoClose() throws Exception {
+        SessionFactory mockSf = Mockito.mock(SessionFactory.class);
+
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.setSessionFactory(mockSf);
+        comp.start();
+
+        assertSame(mockSf, comp.getSessionFactory());
+        comp.stop();
+
+        Mockito.verify(mockSf, Mockito.never()).close();
+    }
+
+    @Test
+    public void testRegistrySessionFactoryReuseAndNoClose() throws Exception {
+        SessionFactory mockSf = Mockito.mock(SessionFactory.class);
+        context.getRegistry().bind("registrySf", mockSf);
+
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.start();
+
+        assertSame(mockSf, comp.getSessionFactory());
+        comp.stop();
+
+        Mockito.verify(mockSf, Mockito.never()).close();
+    }
+
+    @Test
+    public void testComponentCreatedSessionFactoryClosesOnStop() throws Exception {
+        HibernateComponent comp = createComponent("testDs", "jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1");
+
+        SessionFactory sf = comp.getSessionFactory();
+        assertNotNull(sf);
+        assertFalse(sf.isClosed());
+
+        comp.stop();
+        assertTrue(sf.isClosed());
+    }
+
+    @Test
+    public void testInvalidDataSourceRegistryNameFails() {
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.setDataSource("nonExistentDs");
+
+        Exception ex = assertThrows(Exception.class, comp::start);
+        assertTrue(ex.getMessage().contains("DataSource bean with name 'nonExistentDs' could not be found"));
+    }
+
+    @Test
+    public void testInvalidSchemaActionFails() {
+        HibernateComponent comp = new HibernateComponent();
+        comp.setCamelContext(context);
+        comp.setSchemaAction("invalid-action");
+
+        Exception ex = assertThrows(Exception.class, comp::start);
+        assertTrue(ex.getMessage().contains("Invalid schemaAction"));
+    }
+
+    @Test
+    public void testSelectionQueryProducer() throws Exception {
+        HibernateComponent comp = createComponent(
+                "selectionDs",
+                "jdbc:h2:mem:selectiondb;DB_CLOSE_DELAY=-1",
+                HibernateTestEntity.class);
+
+        HibernateEndpoint endpoint = new HibernateEndpoint();
+        endpoint.setCamelContext(context);
+        endpoint.setSessionFactory(comp.getSessionFactory());
+        endpoint.setEntityClassName(HibernateTestEntity.class.getName());
+        endpoint.setSelectionQuery("from HibernateTestEntity");
+
+        endpoint.start();
+
+        Exchange exchange = context.getEndpoint("direct:test").createExchange();
+        exchange.getMessage().setHeader(HibernateConstants.HIBERNATE_PARAMETERS, Map.of());
+
+        try (HibernateProducer producer = new HibernateProducer(endpoint)) {
+            producer.process(exchange);
+        }
+
+        assertNotNull(exchange.getMessage().getBody());
+        assertTrue(exchange.getMessage().getBody() instanceof List);
+        assertTrue(((List<?>) exchange.getMessage().getBody()).isEmpty());
+
+        endpoint.stop();
+        comp.stop();
+    }
+
+    @Test
+    public void testMutationQueryProducer() throws Exception {
+        HibernateComponent comp = createComponent(
+                "mutationDs",
+                "jdbc:h2:mem:mutationdb;DB_CLOSE_DELAY=-1",
+                HibernateTestEntity.class);
+
+        HibernateEndpoint endpoint = new HibernateEndpoint();
+        endpoint.setCamelContext(context);
+        endpoint.setSessionFactory(comp.getSessionFactory());
+        endpoint.setEntityClassName(HibernateTestEntity.class.getName());
+        endpoint.setMutationQuery("delete from HibernateTestEntity");
+
+        endpoint.start();
+
+        Exchange exchange = context.getEndpoint("direct:test").createExchange();
+        exchange.getMessage().setHeader(HibernateConstants.HIBERNATE_PARAMETERS, Map.of());
+
+        try (HibernateProducer producer = new HibernateProducer(endpoint)) {
+            producer.process(exchange);
+        }
+
+        assertEquals(0, exchange.getMessage().getBody());
+
+        endpoint.stop();
+        comp.stop();
+    }
+
+    @Test
+    public void testSchemaActionsAcceptedValues() {
+        String[] actions = { "none", "validate", "update", "create" };

Review Comment:
   💡 **Minor — incomplete coverage:** `testSchemaActionsAcceptedValues` tests only 4 of the 7 values accepted by `validateSchemaAction()`. The values `"create-drop"`, `"create-only"`, and `"drop"` are missing from the array.
   
   Suggested fix:
   ```suggestion
           String[] actions = { "none", "validate", "update", "create", "create-drop", "create-only", "drop" };
   ```
   Also consider adding a negative test that calls `doStart()` with an invalid value and asserts that an exception is thrown — the current test only exercises the getter/setter and never triggers `validateSchemaAction()` via `doStart()`.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "ramu11 (via GitHub)" <gi...@apache.org>.
ramu11 commented on PR #27935:
URL: https://github.com/apache/camel/pull/27935#issuecomment-6409630842

   Thanks @davsclaus  for the detailed review and for going through the changes again after the rebase.
   
   I'm currently occupied with some case work and a few other Camel JIRAs, so I haven't been able to resume this PR yet. I'll get back to this work soon and address the pending review comments, including the consumer and producer cases, YAML formatting, `@BodyTypes`, and the PR title.
   
   Thanks for your patience and for the valuable feedback!


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #27935:
URL: https://github.com/apache/camel/pull/27935#discussion_r4298280862


##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateProducer.java:
##########
@@ -0,0 +1,279 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Stream;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.support.SynchronizationAdapter;
+import org.hibernate.KeyType;
+import org.hibernate.Session;
+import org.hibernate.StatelessSession;
+import org.hibernate.Transaction;
+import org.hibernate.query.MutationQuery;
+import org.hibernate.query.SelectionQuery;
+
+public class HibernateProducer extends DefaultProducer {
+
+    private final HibernateEndpoint endpoint;
+    private final Map<String, Object> naturalIdParameters = new LinkedHashMap<>();
+
+    public HibernateProducer(HibernateEndpoint endpoint) {
+        super(endpoint);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        Language simple = endpoint.getCamelContext().resolveLanguage("simple");
+
+        naturalIdParameters.clear();
+        if (endpoint.getNaturalIdParameters() != null) {
+            endpoint.getNaturalIdParameters().forEach((key, value) -> {
+                if (value instanceof String str) {
+                    naturalIdParameters.put(key, simple.createExpression(str));
+                } else {
+                    naturalIdParameters.put(key, value);
+                }
+            });
+        }
+    }
+
+    private Map<String, Object> resolveNaturalIdParameters(Exchange exchange, Map<String, Object> headerParameters) {
+        Map<String, Object> resolved = new LinkedHashMap<>();
+
+        naturalIdParameters.forEach((key, value) -> {
+            if (value instanceof Expression expression) {
+                resolved.put(key, expression.evaluate(exchange, Object.class));
+            } else {
+                resolved.put(key, value);
+            }
+        });
+
+        if (headerParameters != null) {
+            // Header values are message data and must never be evaluated as Simple expressions.
+            resolved.putAll(headerParameters);
+        }
+
+        return resolved;
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        if (endpoint.isStreaming() && exchange.isTransacted()) {
+            throw new IllegalArgumentException(
+                    "streaming=true is not supported inside a transacted exchange because streams can outlive route transactions.");
+        }
+
+        if (exchange.isTransacted() && !endpoint.isJta()) {
+            throw new IllegalStateException(
+                    "Hibernate producer does not support transacted() exchanges with a resource-local SessionFactory.");
+        }
+
+        if (endpoint.getStatelessOperation() != null) {
+            processStateless(exchange);
+            return;
+        }
+
+        HibernateSessionContext sessionContext = exchange.getExchangeExtension()
+                .getSafeCopyProperty(HibernateConstants.HIBERNATE_SESSION_CONTEXT, HibernateSessionContext.class);
+
+        Session session = sessionContext == null
+                ? null
+                : sessionContext.getSession(
+                        endpoint.getSessionFactory(),
+                        endpoint.getTenantIdentifier(),
+                        endpoint.getFilters());
+
+        boolean sessionOwned = session == null;
+
+        if (sessionOwned) {
+            session = endpoint.getTenantIdentifier() == null
+                    ? endpoint.getSessionFactory().openSession()
+                    : endpoint.getSessionFactory().withOptions()
+                            .tenantIdentifier(endpoint.getTenantIdentifier())
+                            .openSession();
+        }
+
+        final Session activeSession = session;
+        final Transaction transaction = sessionOwned
+                ? activeSession.beginTransaction()
+                : activeSession.getTransaction();
+
+        try {
+            if (sessionOwned && endpoint.getFilters() != null) {
+                endpoint.getFilters().forEach((filterName, parameters) -> {
+                    var filter = activeSession.enableFilter(filterName);
+                    if (parameters != null) {
+                        parameters.forEach(filter::setParameter);
+                    }
+                });
+            }
+
+            @SuppressWarnings("unchecked")
+            Map<String, Object> parameters = exchange.getMessage().getHeader(
+                    HibernateConstants.HIBERNATE_PARAMETERS, Map.class);
+
+            if (endpoint.getNaturalIdParameters() != null
+                    && !endpoint.getNaturalIdParameters().isEmpty()) {
+                Object entity = activeSession.find(
+                        endpoint.getEntityType(),
+                        resolveNaturalIdParameters(exchange, parameters),
+                        KeyType.NATURAL);
+
+                exchange.getMessage().setBody(entity);
+
+                if (sessionOwned) {
+                    transaction.commit();
+                    activeSession.close();
+                }
+            } else if (endpoint.getSelectionQuery() != null) {

Review Comment:
   The same mismatch as the natural-id branch, one branch down: `HibernateEndpoint.doStart()` counts `selectionQuery` only when it is not blank, but this branch is taken whenever it is not `null`. An endpoint where `selectionQuery` is set but empty (for example from a property placeholder with an empty default) next to a `mutationQuery` passes validation, and then runs the empty selection query instead of the mutation.
   ```suggestion
               } else if (endpoint.getSelectionQuery() != null && !endpoint.getSelectionQuery().isBlank()) {
   ```



##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateConsumer.java:
##########
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.List;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.support.ScheduledPollConsumer;
+import org.hibernate.LockMode;
+import org.hibernate.Session;
+import org.hibernate.Timeouts;
+import org.hibernate.Transaction;
+import org.hibernate.query.SelectionQuery;
+
+public class HibernateConsumer extends ScheduledPollConsumer {
+
+    private final HibernateEndpoint endpoint;
+
+    public HibernateConsumer(HibernateEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        if (endpoint.getSelectionQuery() == null || endpoint.getSelectionQuery().isBlank()) {

Review Comment:
   Optional: nothing tests this check yet. Something like this in `HibernateEndpointTest` would pin it (an exception from `doStart()` comes out of `start()` unchanged):
   ```java
   @Test
   void shouldRejectConsumerWithoutSelectionQuery() {
       HibernateEndpoint endpoint = createEndpoint();
       endpoint.setMutationQuery("update HibernateTestEntity set name = :name");
       HibernateConsumer consumer = new HibernateConsumer(endpoint, exchange -> {
       });
   
       assertThrows(IllegalArgumentException.class, consumer::start);
   }
   ```



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21873: Add camel-hibernate component [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #27935:
URL: https://github.com/apache/camel/pull/27935#issuecomment-6414932200

   LGTM


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21873: Add camel-hibernate component [camel]

Posted by "Croway (via GitHub)" <gi...@apache.org>.
Croway merged PR #27935:
URL: https://github.com/apache/camel/pull/27935


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27935:
URL: https://github.com/apache/camel/pull/27935#discussion_r4292962227


##########
bom/camel-bom/pom.xml:
##########
@@ -1107,6 +1107,11 @@
         <artifactId>camel-health</artifactId>
         <version>4.24.0-SNAPSHOT</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-hibernate</artifactId>
+        <version>4.23.0-SNAPSHOT</version>

Review Comment:
   ⚠️ **BOM version mismatch — build-breaking**
   
   `camel-hibernate` is added with hardcoded `4.23.0-SNAPSHOT` while the current branch is `4.24.0-SNAPSHOT`. Every surrounding BOM entry uses `4.24.0-SNAPSHOT`. This will cause consumers resolving from the BOM to pull a version that doesn't exist, breaking builds.
   
   ```suggestion
           <version>4.24.0-SNAPSHOT</version>
   ```



##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateComponent.java:
##########
@@ -0,0 +1,243 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+import org.hibernate.SessionFactory;
+import org.hibernate.boot.MetadataSources;
+import org.hibernate.boot.registry.StandardServiceRegistry;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
+import org.hibernate.cfg.AvailableSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component("hibernate")
+public class HibernateComponent extends DefaultComponent {
+
+    private static final Logger LOG = LoggerFactory.getLogger(HibernateComponent.class);
+
+    @Metadata(description = "The Hibernate SessionFactory to use.")
+    private SessionFactory sessionFactory;
+
+    @Metadata(description = "The DataSource to use for bootstrapping the SessionFactory (bean reference or registry name).")
+    private Object dataSource;
+
+    private Class<?>[] entityClasses;
+
+    @Metadata(description = "Schema generation action: none, validate, update, create.", defaultValue = "none")

Review Comment:
   ⚠️ **`@Metadata` description is out of date**
   
   The description still lists only `none, validate, update, create` but `validateSchemaAction()` now accepts 7 values (`create-drop`, `create-only`, `drop` were added). The generated catalog JSON inherits this incomplete description, so tooling (IDE completion, camel-catalog) will present wrong values to users.
   
   ```suggestion
       @Metadata(description = "Schema generation action: none, validate, update, create, create-drop, create-only, drop.", defaultValue = "none")
   ```
   
   Also update `hibernate-component.adoc` lines 92-95 to list all 7 supported values.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27935:
URL: https://github.com/apache/camel/pull/27935#issuecomment-6213829822

   <!-- regen-patch -->
   ### :warning: Generated files are out of date
   
   The [CI build](https://github.com/apache/camel/actions/runs/38888510073) regenerated files that are not committed on this PR.
   
   If *Allow edits from maintainers* is enabled, a maintainer bot will automatically
   push a "Regen" commit to this branch shortly.
   
   Otherwise, you can apply the patch manually — the missing changes are available
   as the `regen-patch` artifact of that run:
   
   ```bash
   gh pr checkout 27935 --repo apache/camel
   gh run download 38888510073 --repo apache/camel -n regen-patch
   git apply --index regen.patch && rm regen.patch pr-number
   git commit -m "Regen" && git push
   ```
   
   Alternatively, run `./etc/scripts/regen.sh` locally and commit the resulting changes.
   If the patch does not apply cleanly, update the branch from the base branch first —
   the patch was generated against the merge with the base branch.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #27935:
URL: https://github.com/apache/camel/pull/27935#discussion_r4294504382


##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateComponent.java:
##########
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+import org.hibernate.SessionFactory;
+import org.hibernate.boot.MetadataSources;
+import org.hibernate.boot.registry.StandardServiceRegistry;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
+import org.hibernate.cfg.AvailableSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component("hibernate")
+public class HibernateComponent extends DefaultComponent {
+
+    private static final Logger LOG = LoggerFactory.getLogger(HibernateComponent.class);
+
+    @Metadata(description = "The Hibernate SessionFactory to use.")
+    private SessionFactory sessionFactory;
+
+    @Metadata(description = "The DataSource to use for bootstrapping the SessionFactory (bean reference or registry name).")
+    private Object dataSource;
+
+    private Class<?>[] entityClasses;
+
+    @Metadata(description = "Schema generation action: none, validate, update, create, create-drop, create-only, drop.",
+              defaultValue = "none")
+    private String schemaAction = "none";
+
+    @Metadata(description = "Arbitrary Hibernate configuration properties passthrough map.")
+    private Map<String, Object> hibernateProperties = new HashMap<>();
+
+    private boolean sessionFactoryOwned;
+    private StandardServiceRegistry serviceRegistry;
+
+    public HibernateComponent() {
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+
+        // 1. Explicitly configured SessionFactory takes precedence (External, unowned)
+        if (sessionFactory != null) {
+            sessionFactoryOwned = false;
+            LOG.info("Using explicitly configured Hibernate SessionFactory (external, unowned).");
+            return;
+        }
+
+        // 2. Try to resolve SessionFactory from Camel registry (External, unowned)
+        sessionFactory = getCamelContext().getRegistry().findSingleByType(SessionFactory.class);
+        if (sessionFactory != null) {
+            sessionFactoryOwned = false;
+            LOG.info("Reusing existing Hibernate SessionFactory found in Camel registry (external, unowned).");
+            return;
+        }
+
+        // 3. Bootstrap SessionFactory natively (Component-created, owned)
+        validateSchemaAction(schemaAction);
+        sessionFactory = createAndBootstrapSessionFactory();
+        sessionFactoryOwned = true;
+        LOG.info("Successfully bootstrapped native Hibernate SessionFactory (component-created, owned).");
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        if (sessionFactoryOwned && sessionFactory != null && !sessionFactory.isClosed()) {
+            LOG.info("Closing component-owned Hibernate SessionFactory.");
+            sessionFactory.close();
+        }
+        if (serviceRegistry != null) {
+            StandardServiceRegistryBuilder.destroy(serviceRegistry);
+            serviceRegistry = null;
+        }
+        sessionFactory = null;
+        sessionFactoryOwned = false;
+        super.doStop();
+    }
+
+    @Override
+    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+        HibernateEndpoint endpoint = new HibernateEndpoint(uri, this);
+
+        if (remaining != null && !remaining.isEmpty()) {
+            endpoint.setEntityClassName(remaining);
+        }
+
+        setProperties(endpoint, parameters);
+        endpoint.setSessionFactory(sessionFactory);
+
+        return endpoint;
+    }
+
+    private void validateSchemaAction(String action) {
+
+        switch (action.toLowerCase()) {

Review Comment:
   The `null` guard was removed in this round, so `setSchemaAction(null)` from Java now fails with an NPE here. `createAndBootstrapSessionFactory()` (line 153) still treats `null` as "none", so the two disagree. Either keep the guard, or treat `null` as "none" here too.



##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateComponent.java:
##########
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+import org.hibernate.SessionFactory;
+import org.hibernate.boot.MetadataSources;
+import org.hibernate.boot.registry.StandardServiceRegistry;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
+import org.hibernate.cfg.AvailableSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component("hibernate")
+public class HibernateComponent extends DefaultComponent {
+
+    private static final Logger LOG = LoggerFactory.getLogger(HibernateComponent.class);
+
+    @Metadata(description = "The Hibernate SessionFactory to use.")
+    private SessionFactory sessionFactory;
+
+    @Metadata(description = "The DataSource to use for bootstrapping the SessionFactory (bean reference or registry name).")
+    private Object dataSource;
+
+    private Class<?>[] entityClasses;
+
+    @Metadata(description = "Schema generation action: none, validate, update, create, create-drop, create-only, drop.",
+              defaultValue = "none")

Review Comment:
   Adding `enums = "none,validate,update,create,create-drop,create-only,drop"` here would let the catalog, the YAML schema and the tooling validate the value, and keep the generated docs in sync with `validateSchemaAction` (regen needed).



##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateProducer.java:
##########
@@ -0,0 +1,278 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Stream;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.support.SynchronizationAdapter;
+import org.hibernate.KeyType;
+import org.hibernate.Session;
+import org.hibernate.StatelessSession;
+import org.hibernate.Transaction;
+import org.hibernate.query.MutationQuery;
+import org.hibernate.query.SelectionQuery;
+
+public class HibernateProducer extends DefaultProducer {
+
+    private final HibernateEndpoint endpoint;
+    private final Map<String, Object> naturalIdParameters = new LinkedHashMap<>();
+
+    public HibernateProducer(HibernateEndpoint endpoint) {
+        super(endpoint);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        Language simple = endpoint.getCamelContext().resolveLanguage("simple");
+
+        naturalIdParameters.clear();
+        if (endpoint.getNaturalIdParameters() != null) {
+            endpoint.getNaturalIdParameters().forEach((key, value) -> {
+                if (value instanceof String str) {
+                    naturalIdParameters.put(key, simple.createExpression(str));
+                } else {
+                    naturalIdParameters.put(key, value);
+                }
+            });
+        }
+    }
+
+    private Map<String, Object> resolveNaturalIdParameters(Exchange exchange, Map<String, Object> headerParameters) {
+        Map<String, Object> resolved = new LinkedHashMap<>();
+
+        naturalIdParameters.forEach((key, value) -> {
+            if (value instanceof Expression expression) {
+                resolved.put(key, expression.evaluate(exchange, Object.class));
+            } else {
+                resolved.put(key, value);
+            }
+        });
+
+        if (headerParameters != null) {
+            // Header values are message data and must never be evaluated as Simple expressions.
+            resolved.putAll(headerParameters);
+        }
+
+        return resolved;
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        if (endpoint.isStreaming() && exchange.isTransacted()) {
+            throw new IllegalArgumentException(
+                    "streaming=true is not supported inside a transacted exchange because streams can outlive route transactions.");
+        }
+
+        if (exchange.isTransacted() && !endpoint.isJta()) {
+            throw new IllegalStateException(
+                    "Hibernate producer does not support transacted() exchanges with a resource-local SessionFactory.");
+        }
+
+        if (endpoint.getStatelessOperation() != null) {
+            processStateless(exchange);
+            return;
+        }
+
+        HibernateSessionContext sessionContext = exchange.getExchangeExtension()
+                .getSafeCopyProperty(HibernateConstants.HIBERNATE_SESSION_CONTEXT, HibernateSessionContext.class);
+
+        Session session = sessionContext == null
+                ? null
+                : sessionContext.getSession(
+                        endpoint.getSessionFactory(),
+                        endpoint.getTenantIdentifier(),
+                        endpoint.getFilters());
+
+        boolean sessionOwned = session == null;
+
+        if (sessionOwned) {
+            session = endpoint.getTenantIdentifier() == null
+                    ? endpoint.getSessionFactory().openSession()
+                    : endpoint.getSessionFactory().withOptions()
+                            .tenantIdentifier(endpoint.getTenantIdentifier())
+                            .openSession();
+        }
+
+        final Session activeSession = session;
+        final Transaction transaction = sessionOwned
+                ? activeSession.beginTransaction()
+                : activeSession.getTransaction();
+
+        try {
+            if (sessionOwned && endpoint.getFilters() != null) {
+                endpoint.getFilters().forEach((filterName, parameters) -> {
+                    var filter = activeSession.enableFilter(filterName);
+                    if (parameters != null) {
+                        parameters.forEach(filter::setParameter);
+                    }
+                });
+            }
+
+            @SuppressWarnings("unchecked")
+            Map<String, Object> parameters = exchange.getMessage().getHeader(
+                    HibernateConstants.HIBERNATE_PARAMETERS, Map.class);
+
+            if (endpoint.getNaturalIdParameters() != null) {

Review Comment:
   `HibernateEndpoint.doStart()` counts the natural-id operation only when the map is non-empty, but this branch is taken whenever it is non-null. An endpoint with an empty `naturalIdParameters` map (for example from a bean) plus `selectionQuery` passes validation, and then runs a natural-id lookup with no keys instead of the query.
   ```suggestion
               if (endpoint.getNaturalIdParameters() != null && !endpoint.getNaturalIdParameters().isEmpty()) {
   ```



##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateConsumer.java:
##########
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.List;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.support.ScheduledPollConsumer;
+import org.hibernate.LockMode;
+import org.hibernate.Session;
+import org.hibernate.Timeouts;
+import org.hibernate.Transaction;
+import org.hibernate.query.SelectionQuery;
+
+public class HibernateConsumer extends ScheduledPollConsumer {
+
+    private final HibernateEndpoint endpoint;
+
+    public HibernateConsumer(HibernateEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected int poll() throws Exception {
+        if (endpoint.getSelectionQuery() == null || endpoint.getSelectionQuery().isBlank()) {

Review Comment:
   Endpoint validation accepts `mutationQuery`, `naturalIdParameters` or `statelessOperation` alone, so a consumer endpoint configured with one of those starts fine. It then throws this `IllegalArgumentException` on every poll, which only shows up as a repeated WARN. Could the check move to the consumer's `doStart()`, so a misconfigured route fails at startup?
   ```java
   @Override
   protected void doStart() throws Exception {
       if (endpoint.getSelectionQuery() == null || endpoint.getSelectionQuery().isBlank()) {
           throw new IllegalArgumentException("Hibernate consumer requires selectionQuery");
       }
       super.doStart();
   }
   ```



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21873: Add camel-hibernate component [camel]

Posted by "ramu11 (via GitHub)" <gi...@apache.org>.
ramu11 commented on PR #27935:
URL: https://github.com/apache/camel/pull/27935#issuecomment-6414870003

   Thanks for the final review and for pointing out these remaining items.
   
   Addressed in commit `14a03685b3be`:
   
   - **Streaming body metadata:** Updated `HibernateEndpoint` so `streaming=true` declares `Carrier.ITERATOR`, while the default producer output carriers no longer incorrectly include `Carrier.STREAM`.
   - **Generated metadata:** Updated both the component metadata and Camel Catalog JSON files to keep them in sync with the annotation.
   - **Test logging:** Added `components/camel-hibernate/src/test/resources/log4j2.properties`, following the Camel JPA convention and writing logs to `target/camel-hibernate-test.log`.
   
   The focused Hibernate test suite previously passed all 52 tests with no failures or errors. This latest commit changes body-type metadata, generated JSON, and test logging configuration.
   
   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27935:
URL: https://github.com/apache/camel/pull/27935#discussion_r4291820601


##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateComponent.java:
##########
@@ -0,0 +1,241 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+import org.hibernate.SessionFactory;
+import org.hibernate.boot.MetadataSources;
+import org.hibernate.boot.registry.StandardServiceRegistry;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
+import org.hibernate.cfg.AvailableSettings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Component("hibernate")
+public class HibernateComponent extends DefaultComponent {
+
+    private static final Logger LOG = LoggerFactory.getLogger(HibernateComponent.class);
+
+    @Metadata(description = "The Hibernate SessionFactory to use.")
+    private SessionFactory sessionFactory;
+
+    @Metadata(description = "The DataSource to use for bootstrapping the SessionFactory (bean reference or registry name).")
+    private Object dataSource;
+
+    private Class<?>[] entityClasses;
+
+    @Metadata(description = "Schema generation action: none, validate, update, create.", defaultValue = "none")
+    private String schemaAction = "none";
+
+    @Metadata(description = "Arbitrary Hibernate configuration properties passthrough map.")
+    private Map<String, Object> hibernateProperties = new HashMap<>();
+
+    private boolean sessionFactoryOwned;
+    private StandardServiceRegistry serviceRegistry;
+
+    public HibernateComponent() {
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+
+        // 1. Explicitly configured SessionFactory takes precedence (External, unowned)
+        if (sessionFactory != null) {
+            sessionFactoryOwned = false;
+            LOG.info("Using explicitly configured Hibernate SessionFactory (external, unowned).");
+            return;
+        }
+
+        // 2. Try to resolve SessionFactory from Camel registry (External, unowned)
+        sessionFactory = getCamelContext().getRegistry().findSingleByType(SessionFactory.class);
+        if (sessionFactory != null) {
+            sessionFactoryOwned = false;
+            LOG.info("Reusing existing Hibernate SessionFactory found in Camel registry (external, unowned).");
+            return;
+        }
+
+        // 3. Bootstrap SessionFactory natively (Component-created, owned)
+        validateSchemaAction(schemaAction);
+        sessionFactory = createAndBootstrapSessionFactory();
+        sessionFactoryOwned = true;
+        LOG.info("Successfully bootstrapped native Hibernate SessionFactory (component-created, owned).");
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        if (sessionFactoryOwned && sessionFactory != null && !sessionFactory.isClosed()) {
+            LOG.info("Closing component-owned Hibernate SessionFactory.");
+            sessionFactory.close();
+        }
+        if (serviceRegistry != null) {
+            StandardServiceRegistryBuilder.destroy(serviceRegistry);
+            serviceRegistry = null;
+        }
+        sessionFactory = null;
+        sessionFactoryOwned = false;
+        super.doStop();
+    }
+
+    @Override
+    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+        HibernateEndpoint endpoint = new HibernateEndpoint(uri, this);
+
+        if (remaining != null && !remaining.isEmpty()) {
+            endpoint.setEntityClassName(remaining);
+        }
+
+        setProperties(endpoint, parameters);
+        endpoint.setSessionFactory(sessionFactory);
+
+        return endpoint;
+    }
+
+    private void validateSchemaAction(String action) {
+        if (action == null) {

Review Comment:
   ⚠️ **`validateSchemaAction()` rejects valid Hibernate 8 schema actions**
   
   The switch only accepts `none`, `validate`, `update`, `create` — but Hibernate 8 also supports `create-drop`, `create-only`, and `drop`. A user who specifies `create-drop` (the most common DDL setting for test configurations) gets an `IllegalArgumentException` at startup with a misleading error message.
   
   ```suggestion
           switch (action.toLowerCase()) {
               case "none":
               case "validate":
               case "update":
               case "create":
               case "create-drop":
               case "create-only":
               case "drop":
                   break;
               default:
                   throw new IllegalArgumentException(
                           "Invalid schemaAction: '" + action + "'. Supported values are: none, validate, update, create, create-drop, create-only, drop.");
           }
   ```



##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateProducer.java:
##########
@@ -0,0 +1,275 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Stream;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.support.SynchronizationAdapter;
+import org.hibernate.KeyType;
+import org.hibernate.Session;
+import org.hibernate.StatelessSession;
+import org.hibernate.Transaction;
+import org.hibernate.query.MutationQuery;
+import org.hibernate.query.SelectionQuery;
+
+public class HibernateProducer extends DefaultProducer {
+
+    private final HibernateEndpoint endpoint;
+    private final Map<String, Object> naturalIdParameters = new LinkedHashMap<>();
+
+    public HibernateProducer(HibernateEndpoint endpoint) {
+        super(endpoint);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        Language simple = endpoint.getCamelContext().resolveLanguage("simple");
+
+        naturalIdParameters.clear();
+        if (endpoint.getNaturalIdParameters() != null) {
+            endpoint.getNaturalIdParameters().forEach((key, value) -> {
+                if (value instanceof String str) {
+                    naturalIdParameters.put(key, simple.createExpression(str));
+                } else {
+                    naturalIdParameters.put(key, value);
+                }
+            });
+        }
+    }
+
+    private Map<String, Object> resolveNaturalIdParameters(Exchange exchange, Map<String, Object> headerParameters) {
+        Map<String, Object> resolved = new LinkedHashMap<>();
+
+        naturalIdParameters.forEach((key, value) -> {
+            if (value instanceof Expression expression) {
+                resolved.put(key, expression.evaluate(exchange, Object.class));
+            } else {
+                resolved.put(key, value);
+            }
+        });
+
+        if (headerParameters != null) {
+            // Header values are message data and must never be evaluated as Simple expressions.
+            resolved.putAll(headerParameters);
+        }
+
+        return resolved;
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        if (endpoint.isStreaming() && exchange.isTransacted()) {
+            throw new IllegalArgumentException(
+                    "streaming=true is not supported inside a transacted exchange because streams can outlive route transactions.");
+        }
+
+        if (exchange.isTransacted() && !endpoint.isJta()) {
+            throw new IllegalStateException(
+                    "Hibernate producer does not support transacted() exchanges with a resource-local SessionFactory.");
+        }
+
+        if (endpoint.getStatelessOperation() != null) {
+            processStateless(exchange);
+            return;
+        }
+
+        HibernateSessionContext sessionContext = exchange.getExchangeExtension()
+                .getSafeCopyProperty(HibernateConstants.HIBERNATE_SESSION_CONTEXT, HibernateSessionContext.class);
+
+        Session session = sessionContext == null
+                ? null
+                : sessionContext.getSession(
+                        endpoint.getSessionFactory(),
+                        endpoint.getTenantIdentifier(),
+                        endpoint.getFilters());
+
+        boolean sessionOwned = session == null;
+
+        if (sessionOwned) {
+            session = endpoint.getTenantIdentifier() == null
+                    ? endpoint.getSessionFactory().openSession()
+                    : endpoint.getSessionFactory().withOptions()
+                            .tenantIdentifier(endpoint.getTenantIdentifier())
+                            .openSession();
+        }
+
+        final Session activeSession = session;
+        final Transaction transaction = sessionOwned
+                ? activeSession.beginTransaction()
+                : activeSession.getTransaction();
+
+        try {
+            if (sessionOwned && endpoint.getFilters() != null) {
+                endpoint.getFilters().forEach((filterName, parameters) -> {
+                    var filter = activeSession.enableFilter(filterName);
+                    if (parameters != null) {
+                        parameters.forEach(filter::setParameter);
+                    }
+                });
+            }
+
+            @SuppressWarnings("unchecked")
+            Map<String, Object> parameters = exchange.getMessage().getHeader(
+                    HibernateConstants.HIBERNATE_PARAMETERS, Map.class);
+
+            if (endpoint.getNaturalIdParameters() != null) {
+                Object entity = activeSession.find(
+                        endpoint.getEntityType(),
+                        resolveNaturalIdParameters(exchange, parameters),
+                        KeyType.NATURAL);
+
+                exchange.getMessage().setBody(entity);
+
+                if (sessionOwned) {
+                    transaction.commit();
+                    activeSession.close();
+                }
+            } else if (endpoint.getSelectionQuery() != null) {
+                SelectionQuery<?> query = activeSession.createSelectionQuery(
+                        endpoint.getSelectionQuery(), endpoint.getEntityType());
+
+                if (sessionOwned) {
+                    activeSession.setDefaultReadOnly(endpoint.isReadOnly());
+                }
+                query.setReadOnly(endpoint.isReadOnly());
+
+                if (parameters != null) {
+                    parameters.forEach(query::setParameter);
+                }
+
+                if (endpoint.isStreaming()) {
+                    if (sessionOwned) {
+                        AtomicBoolean streamingSessionClosed = new AtomicBoolean();
+
+                        exchange.getExchangeExtension().addOnCompletion(new SynchronizationAdapter() {
+                            @Override
+                            public void onComplete(Exchange exchange) {
+                                closeStreamingSession(
+                                        activeSession, transaction, false, streamingSessionClosed);
+                            }
+
+                            @Override
+                            public void onFailure(Exchange exchange) {
+                                closeStreamingSession(
+                                        activeSession, transaction, true, streamingSessionClosed);
+                            }
+                        });
+
+                        Stream<?> stream = query.getResultStream();
+                        exchange.getMessage().setBody(stream.onClose(
+                                () -> closeStreamingSession(
+                                        activeSession, transaction, false, streamingSessionClosed)));
+                    } else {
+                        exchange.getMessage().setBody(query.getResultStream());
+                    }
+
+                    return;
+                }
+
+                exchange.getMessage().setBody(query.getResultList());
+
+                if (sessionOwned) {
+                    transaction.commit();
+                    activeSession.close();
+                }
+            } else {
+                MutationQuery query = activeSession.createMutationQuery(endpoint.getMutationQuery());
+
+                if (parameters != null) {
+                    parameters.forEach(query::setParameter);
+                }
+
+                exchange.getMessage().setBody(query.execute());
+
+                if (sessionOwned) {
+                    transaction.commit();
+                    activeSession.close();
+                }
+            }
+        } catch (Exception e) {
+            if (sessionOwned && transaction.isActive()) {
+                transaction.rollback();
+            }
+            if (sessionOwned) {
+                activeSession.close();
+            }
+            throw e;
+        }
+    }
+
+    private void closeStreamingSession(
+            Session session, Transaction transaction, boolean rollback, AtomicBoolean closed) {
+
+        if (!closed.compareAndSet(false, true)) {
+            return;
+        }
+
+        try {
+            if (transaction.isActive()) {
+                if (rollback) {
+                    transaction.rollback();
+                } else {
+                    transaction.commit();
+                }
+            }
+        } finally {
+            session.close();
+        }
+    }
+
+    private void processStateless(Exchange exchange) {
+        StatelessSession session = endpoint.getTenantIdentifier() == null
+                ? endpoint.getSessionFactory().openStatelessSession()
+                : endpoint.getSessionFactory()
+                        .withStatelessOptions()
+                        .tenantIdentifier(endpoint.getTenantIdentifier())
+                        .openStatelessSession();
+
+        try (session) {
+            Transaction transaction = session.beginTransaction();
+
+            try {
+                Object body = exchange.getMessage().getBody();
+
+                switch (endpoint.getStatelessOperation()) {
+                    case INSERT:
+                        session.insert(body);
+                        break;
+                    case UPSERT:
+                        session.upsert(body);
+                        break;
+                }

Review Comment:
   ⚠️ **Missing `default` branch in `StatelessOperation` switch**
   
   If a new `StatelessOperation` enum constant is added in the future, this switch falls through silently: `transaction.commit()` is called but the body is never persisted, resulting in a silent data loss. Add an explicit `default` that fails fast:
   
   ```suggestion
                   switch (endpoint.getStatelessOperation()) {
                       case INSERT:
                           session.insert(body);
                           break;
                       case UPSERT:
                           session.upsert(body);
                           break;
                       default:
                           throw new UnsupportedOperationException(
                                   "Unsupported stateless operation: " + endpoint.getStatelessOperation());
                   }
   ```



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Camel 21873 hibernate [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27935:
URL: https://github.com/apache/camel/pull/27935#issuecomment-6209825543

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21873: Add camel-hibernate component [camel]

Posted by "ramu11 (via GitHub)" <gi...@apache.org>.
ramu11 commented on PR #27935:
URL: https://github.com/apache/camel/pull/27935#issuecomment-6412478817

   This commit '87ae1cb' address the main outstanding code-review points:
   - HibernateProducer now ignores blank selection queries, matching endpoint validation.
   - HibernateConsumer handles rollback-only exchanges and detects a shared transaction marked rollback-only.
   - A new HibernateConsumerReviewTest covers the two reported transaction scenarios.
   - The consumer startup validation has test coverage.
   - @BodyTypes and header metadata have been added, with regenerated catalog and DSL files.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-21873: Add camel-hibernate component [camel]

Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27935:
URL: https://github.com/apache/camel/pull/27935#discussion_r4374972632


##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateProducer.java:
##########
@@ -0,0 +1,279 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Stream;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
+import org.apache.camel.spi.Language;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.support.SynchronizationAdapter;
+import org.hibernate.KeyType;
+import org.hibernate.Session;
+import org.hibernate.StatelessSession;
+import org.hibernate.Transaction;
+import org.hibernate.query.MutationQuery;
+import org.hibernate.query.SelectionQuery;
+
+public class HibernateProducer extends DefaultProducer {
+
+    private final HibernateEndpoint endpoint;
+    private final Map<String, Object> naturalIdParameters = new LinkedHashMap<>();
+
+    public HibernateProducer(HibernateEndpoint endpoint) {
+        super(endpoint);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        super.doStart();
+        Language simple = endpoint.getCamelContext().resolveLanguage("simple");
+
+        naturalIdParameters.clear();
+        if (endpoint.getNaturalIdParameters() != null) {
+            endpoint.getNaturalIdParameters().forEach((key, value) -> {
+                if (value instanceof String str) {
+                    naturalIdParameters.put(key, simple.createExpression(str));
+                } else {
+                    naturalIdParameters.put(key, value);
+                }
+            });
+        }
+    }
+
+    private Map<String, Object> resolveNaturalIdParameters(Exchange exchange, Map<String, Object> headerParameters) {
+        Map<String, Object> resolved = new LinkedHashMap<>();
+
+        naturalIdParameters.forEach((key, value) -> {
+            if (value instanceof Expression expression) {
+                resolved.put(key, expression.evaluate(exchange, Object.class));
+            } else {
+                resolved.put(key, value);
+            }
+        });
+
+        if (headerParameters != null) {
+            // Header values are message data and must never be evaluated as Simple expressions.
+            resolved.putAll(headerParameters);
+        }
+
+        return resolved;
+    }
+
+    @Override
+    public void process(Exchange exchange) throws Exception {
+        if (endpoint.isStreaming() && exchange.isTransacted()) {
+            throw new IllegalArgumentException(
+                    "streaming=true is not supported inside a transacted exchange because streams can outlive route transactions.");
+        }
+
+        if (exchange.isTransacted() && !endpoint.isJta()) {
+            throw new IllegalStateException(
+                    "Hibernate producer does not support transacted() exchanges with a resource-local SessionFactory.");
+        }
+
+        if (endpoint.getStatelessOperation() != null) {
+            processStateless(exchange);
+            return;
+        }
+
+        HibernateSessionContext sessionContext = exchange.getExchangeExtension()
+                .getSafeCopyProperty(HibernateConstants.HIBERNATE_SESSION_CONTEXT, HibernateSessionContext.class);
+
+        Session session = sessionContext == null
+                ? null
+                : sessionContext.getSession(
+                        endpoint.getSessionFactory(),
+                        endpoint.getTenantIdentifier(),
+                        endpoint.getFilters());
+
+        boolean sessionOwned = session == null;
+
+        if (sessionOwned) {
+            session = endpoint.getTenantIdentifier() == null
+                    ? endpoint.getSessionFactory().openSession()
+                    : endpoint.getSessionFactory().withOptions()
+                            .tenantIdentifier(endpoint.getTenantIdentifier())
+                            .openSession();
+        }
+
+        final Session activeSession = session;
+        final Transaction transaction = sessionOwned
+                ? activeSession.beginTransaction()
+                : activeSession.getTransaction();
+
+        try {
+            if (sessionOwned && endpoint.getFilters() != null) {
+                endpoint.getFilters().forEach((filterName, parameters) -> {
+                    var filter = activeSession.enableFilter(filterName);
+                    if (parameters != null) {
+                        parameters.forEach(filter::setParameter);
+                    }
+                });
+            }
+
+            @SuppressWarnings("unchecked")
+            Map<String, Object> parameters = exchange.getMessage().getHeader(
+                    HibernateConstants.HIBERNATE_PARAMETERS, Map.class);
+
+            if (endpoint.getNaturalIdParameters() != null
+                    && !endpoint.getNaturalIdParameters().isEmpty()) {
+                Object entity = activeSession.find(
+                        endpoint.getEntityType(),
+                        resolveNaturalIdParameters(exchange, parameters),
+                        KeyType.NATURAL);
+
+                exchange.getMessage().setBody(entity);
+
+                if (sessionOwned) {
+                    transaction.commit();
+                    activeSession.close();
+                }
+            } else if (endpoint.getSelectionQuery() != null) {

Review Comment:
   ⚠️ **`selectionQuery` null vs blank check mismatch**
   
   `HibernateEndpoint.doStart()` uses `!= null && !isBlank()` to determine whether a selection query is configured. This dispatch branch uses only `!= null` — a blank-but-non-null `selectionQuery` falls into the selection branch and calls `createSelectionQuery("")` instead of falling through to the mutation path. The two guards must match:
   
   ```suggestion
               } else if (endpoint.getSelectionQuery() != null && !endpoint.getSelectionQuery().isBlank()) {
   ```



##########
components/camel-hibernate/src/main/java/org/apache/camel/component/hibernate/HibernateConsumer.java:
##########
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.hibernate;
+
+import java.util.List;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.support.ScheduledPollConsumer;
+import org.hibernate.LockMode;
+import org.hibernate.Session;
+import org.hibernate.Timeouts;
+import org.hibernate.Transaction;
+import org.hibernate.query.SelectionQuery;
+
+public class HibernateConsumer extends ScheduledPollConsumer {
+
+    private final HibernateEndpoint endpoint;
+
+    public HibernateConsumer(HibernateEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+        this.endpoint = endpoint;
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        if (endpoint.getSelectionQuery() == null || endpoint.getSelectionQuery().isBlank()) {
+            throw new IllegalArgumentException("Hibernate consumer requires selectionQuery");
+        }
+        super.doStart();
+    }
+
+    @Override
+    protected int poll() throws Exception {
+        if (endpoint.getSelectionQuery() == null || endpoint.getSelectionQuery().isBlank()) {
+            throw new IllegalArgumentException("Hibernate consumer requires selectionQuery");
+        }
+
+        Session session = endpoint.getTenantIdentifier() == null
+                ? endpoint.getSessionFactory().openSession()
+                : endpoint.getSessionFactory().withOptions()
+                        .tenantIdentifier(endpoint.getTenantIdentifier())
+                        .openSession();
+
+        try (session) {
+            Transaction transaction = session.beginTransaction();
+
+            try {
+                if (endpoint.getFilters() != null) {
+                    endpoint.getFilters().forEach((filterName, parameters) -> {
+                        var filter = session.enableFilter(filterName);
+                        if (parameters != null) {
+                            parameters.forEach(filter::setParameter);
+                        }
+                    });
+                }
+
+                SelectionQuery<?> query = session.createSelectionQuery(
+                        endpoint.getSelectionQuery(), endpoint.getEntityType());
+
+                if (endpoint.isReadOnly()) {
+                    session.setDefaultReadOnly(true);
+                    query.setReadOnly(true);
+                }
+
+                if (endpoint.getMaximumResults() > 0) {
+                    query.setMaxResults(endpoint.getMaximumResults());
+                }
+
+                if (endpoint.isSkipLocked()) {
+                    query.setHibernateLockMode(LockMode.PESSIMISTIC_WRITE);
+                    query.setLockTimeout(Timeouts.SKIP_LOCKED);
+                }
+
+                List<?> results = query.getResultList();
+
+                for (Object result : results) {
+                    Exchange exchange = null;
+                    try {
+                        exchange = createExchange(false);
+                        exchange.getMessage().setBody(result);
+                        HibernateSessionContext sessionContext = new HibernateSessionContext(
+                                session,
+                                endpoint.getSessionFactory(),
+                                endpoint.getTenantIdentifier(),
+                                endpoint.getFilters());
+
+                        exchange.getExchangeExtension().setSafeCopyProperty(
+                                HibernateConstants.HIBERNATE_SESSION_CONTEXT, sessionContext);
+
+                        getProcessor().process(exchange);
+
+                        if (exchange.getException() != null) {
+                            throw exchange.getException();
+                        } else if (endpoint.isConsumeDelete()) {
+                            session.remove(result);

Review Comment:
   ⚠️ **Rollback-only exchange silently consumes the entity**
   
   `exchange.getException() != null` does not catch exchanges marked rollback-only via `markRollbackOnly()` or `markRollbackOnlyLast()` — those have no exception set. The entity is removed and the transaction committed, silently ignoring the rollback intent. `camel-jpa`'s `JpaConsumer.java` handles this explicitly with `isRollbackOnly()` checks.
   
   ```suggestion
                           if (exchange.getException() != null) {
                               throw exchange.getException();
                           } else if (exchange.isRollbackOnly() || exchange.isRollbackOnlyLast()) {
                               throw new org.apache.camel.RollbackExchangeException(
                                       "Rollback poll transaction: exchange marked rollback only", exchange);
                           } else if (endpoint.isConsumeDelete()) {
                               session.remove(result);
                           }
   ```



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org