-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: 5345: Nonpersistent EJB timers #5371
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
60e81d6
Remove unused code from Timer handling.
poikilotherm f704d8c
Change admin documentation about timer setup and usage from Dataverse…
poikilotherm f62bddd
Describe EJB timer usage for developers.
poikilotherm a7cc7b8
Use @Schedule for dataset Export job. Relates to #5345.
poikilotherm 81fbffe
Notes about refactoring OAI exports for testability.
poikilotherm db73d5b
Stop configuring EJB timer database on install. Relates to #5345.
poikilotherm 78ab470
Use `@Schedule` for harvesting clients. Relates to #5345.
poikilotherm 72e9076
Adding docs about possible future issues with Harvest Client timer. R…
poikilotherm 0258d19
Add documentation about OAI-PMH endpoint and details. Solves #4203.
poikilotherm ee749b0
Merge branch 'develop' into 5345-nonpersistent-ejb
poikilotherm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ Developer Guide | |
geospatial | ||
selinux | ||
big-data-support | ||
timers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
========== | ||
EJB Timers | ||
========== | ||
|
||
As described in :doc:`../admin/timers`, Dataverse uses EJB timers for scheduled jobs. This section is about the | ||
techniques used for scheduling. | ||
|
||
* :doc:`../admin/metadataexport` is done via ``@Schedule`` annotation on ``OAISetServiceBean.exportAllSets()`` and | ||
poikilotherm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``DatasetServiceBean.exportAll()``. Fixed to 2AM local time every day, non persistent. | ||
* Harvesting is a bit more complicated. The timer is attached to ``HarvesterServiceBean.harvestEnabled()`` via | ||
``@Schedule`` annotation every hour, non-persistent. | ||
That method collects all enabled ``HarvestingClient`` and runs them if time from client config matches. | ||
|
||
**NOTE:** the timers for Harvesting might cause trouble, when harvesting takes longer than one hour or multiple | ||
harvests configured for the same starting hour stack up. There is a lock in place to prevent "bad things", but that | ||
might result in lost harvest. If this really causes trouble in the future, the code should be refactored to use either | ||
a proper task scheduler, JBatch API or asynchronous execution. A *TODO* message has been left in the code. | ||
|
||
.. contents:: |toctitle| | ||
:local: | ||
|
||
---- | ||
|
||
Previous: :doc:`big-data-support` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember experimenting with this myself (although it was a while ago). I thought leaving the timer-datasource attribute blank would result in the default data source (in practice that would be the local instance of Derby db) being used to persist the timers... I'm assuming I was wrong.
If leaving it blank results in not persisting the timers at all, let's stick with it going forward.
But should this PR then modify the installer script accordingly too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure we are talking about the same: this instruction has been included in the docs already. Once this PR is merged, IMHO the described steps are not necessary anymore.
A blank option does not mean "non-persistent" by default, a blank option means any new persistent timers introduced later on will be stored in the default datasource (local H2 or Hazelcast cache in Payara). (You need to explicitly declare timers as "non-persistent".)
Yes, the installer (and other places) should be changed, too. The
asadmin
commands fromsetup-glassfish.sh
regarding JDBC timers can be pruned. Will put that in a separate commit to have more logical chunks.