You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/03/08 14:28:14 UTC

[GitHub] [camel-quarkus] JiriOndrusek opened a new pull request #3602: 3579 Improve quartz test coverage

JiriOndrusek opened a new pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602


   Issue: https://github.com/apache/camel-quarkus/issues/3579
   
   Requires https://issues.apache.org/jira/browse/CAMEL-17764 (already fixed) for proper native clustered test, hence `camel-main` branch is sed as the base.
   
   I faced several problems, which may not be resolved in this PR completely:
   
   1. Clustering. Quarkus in their extension forces users to use quarkus's `application.properties` to define clustering. (see https://quarkus.io/guides/quartz) This approach allows to define and configure quartz scheduler and avoid use of `c3p0` library (which is used by quartz clustering capability). To keep an option to define clustering in the quartz itself (using `quartz.properties`)  I  had to add `c3p0` and improve extension to allow native run with this library.
   
   Currently there are a few limitations. 
   - Oracle db type won't work in native, because it requires registration for reflection (possible) which references `oracle.sql.BLOB` which I'm not sure how to correctly handle (there is a **todo** in `QuartzProcessor`)
   - Quarkus sets property `org.quartz.jobStore.useProperties` to `true` by substitution, so it can not be changed. Which is the reason why this issue has to be fixed in the camel codebase - https://issues.apache.org/jira/browse/CAMEL-17764 (already fixed)
   
   2. I used a fixed port for postgrresql db, because there is no obvious way, how to use variable in `quartz.properties` (where port has to be passed for db configuration, Unfortunately agroal DS can not be used, because the only way how to pass DS int oquartz is by JNDI - quarkus supports only CDI)
   
   3. With this PR users can use quarkus's clustering (tested by quarkus) or Quartz's clustering (tested by this PR).
   
   To summarize:
   
   - c3p0 dependency was added
   - clustering by `quartz.properties` is tested
   - so far oracle won't work in native
   - fixed port is used for postgresql db in the test (I used postresql db, because quarkus is using h2 for testing -> which brings more coverage)
   
   <!-- Uncomment and fill this section if your PR is not trivial
   [ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
   [ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
   [ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
   [ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
   [ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html
   -->


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek commented on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1063879180


   Replaced by https://github.com/apache/camel-quarkus/pull/3609


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek commented on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1062706410


   > PR needs a rebase on the latest camel-main changes. Then it'll be easier to review.
   
   @jamesnetherton  There is no need to review current code without ConnectionProvider, it should make code much easier. I'll let you know once it is used in this PR (I'll rebase PR with this change). Thanks for your help.


-- 
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



[GitHub] [camel-quarkus] jamesnetherton commented on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1061844200


   Before I review properly, can this really only work on `camel-main`? If it's possible to have it working with Camel 3.15, lets do this PR against `main` and make any further adjustments once we upgrade to 3.16.


-- 
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



[GitHub] [camel-quarkus] jamesnetherton commented on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1062653368


   PR needs a rebase on the latest `camel-main` changes. Then it'll be easier to review.
   
   > Unfortunately agroal DS can not be used, because the only way how to pass DS int oquartz is by JNDI - quarkus supports only CDI
   
   Quartz has [ConnectionProvider](https://www.quartz-scheduler.org/api/2.3.0/org/quartz/utils/ConnectionProvider.html#getConnection--). So we can probably create a `QuarkusQuartzConnectionProvider` and look up the Agroal `DataSource` from the CDI `BeanManager` either by name or type. 
   
   
   


-- 
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



[GitHub] [camel-quarkus] jamesnetherton edited a comment on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
jamesnetherton edited a comment on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1061844200


   Before I review properly, can this really only work on `camel-main`? If it's possible to have it working with Camel 3.15, lets do this PR against `main` and make any further adjustments once we upgrade to 3.16.
   
   Edit - I should have read the PR description properly :slightly_smiling_face:. So I guess this change does need 3.16. 


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek commented on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1061838904


   @jamesnetherton it would be very helpful, if you can look at this PR and my comment above.
   
   From my POV it can be merged (when **todo** about oracle is changed to a limitation in the doc) - but you may see   some ways how to avoid these limitations.


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek closed pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek closed pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602


   


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek commented on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1062694395


   > Quartz has [ConnectionProvider](https://www.quartz-scheduler.org/api/2.3.0/org/quartz/utils/ConnectionProvider.html#getConnection--). So we can probably create a QuarkusQuartzConnectionProvider and look up the Agroal DataSource from the CDI BeanManager either by name or type.
   
   I'll look into that option, using Agroal DS would remove a lot of code and limitations.


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek commented on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1061848485


   The fix I rely on was merge a few hours ago. Therefore I think that it is required to be on 3.16 (without the fix, one test will fail) - I can disable it for purpose of `main` branch, if needed.


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek edited a comment on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek edited a comment on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1062706410


   > PR needs a rebase on the latest camel-main changes. Then it'll be easier to review.
   
   @jamesnetherton  There is no need to review current code without ConnectionProvider, it should make code much easier. I'll let you know once it is used in this PR (I'll also rebase PR with this change). Thanks for your help.


-- 
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



[GitHub] [camel-quarkus] JiriOndrusek edited a comment on pull request #3602: 3579 Improve quartz test coverage

Posted by GitBox <gi...@apache.org>.
JiriOndrusek edited a comment on pull request #3602:
URL: https://github.com/apache/camel-quarkus/pull/3602#issuecomment-1061848485


   The fix I rely on,was merged a few hours ago. Therefore I think that it is required to be on 3.16 (without the fix, one test will fail) - I can disable it for purpose of `main` branch, if needed.


-- 
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