Skip to content
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
wants to merge 10 commits into from

Conversation

poikilotherm
Copy link
Contributor

WORK IN PROGRESS - DO NOT MERGE

Related Issues

Pull Request Checklist

@poikilotherm poikilotherm changed the title WIP: 5345: Nonpersisten EJB timers WIP: 5345: Nonpersistent EJB timers Dec 5, 2018
@coveralls
Copy link

coveralls commented Dec 8, 2018

Coverage Status

Coverage increased (+0.04%) to 17.69% when pulling ee749b0 on poikilotherm:5345-nonpersistent-ejb into 38851fa on IQSS:develop.


This job is automatically scheduled to run at 2AM local time every night. If really necessary, it is possible (for an advanced user) to change that time by directly editing the EJB timer application table in the database.
We also recommend that the following entry in the :fixedwidthplain:`domain.xml`:
``<ejb-timer-service timer-datasource="jdbc/VDCNetDS">`` is changed back to ``<ejb-timer-service>``
Copy link
Contributor

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?

Copy link
Contributor Author

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 from setup-glassfish.sh regarding JDBC timers can be pruned. Will put that in a separate commit to have more logical chunks.


Known Issues
------------

We've received several reports of an intermittent issue where the application fails to deploy with the error message "EJB Timer Service is not available." Please see the :doc:`/admin/troubleshooting` section of this guide for a workaround.
Former to Dataverse 4.10, we've received several reports of an intermittent issue where the application fails to deploy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Prior to Dataverse 4.10" probably?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should state 4.11/5.0 now as 4.10 is released.

Copy link
Contributor

@landreev landreev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@poikilotherm So, if I'm reading this correctly, the scheduled tasks are still run by timers, the same exact way as before (and NOT by @schedule attributes, as the developer timers guide appears to suggest); the only difference is that we no longer bother to persist the timers in the database - correct?
Thank you for making the PR; and specifically for improving the documentation. I've made a couple of minor/nitpicking suggestions in separate comments.

@poikilotherm poikilotherm force-pushed the 5345-nonpersistent-ejb branch from 3e4a849 to 1f58405 Compare December 17, 2018 08:56
Removes the timer handling code for the export of Datasets and OAISets from
DataverseTimerServiceBean and uses non-persisting @schedule annotation instead.
Checks for execution on timer server only are in place.
@poikilotherm poikilotherm force-pushed the 5345-nonpersistent-ejb branch from 1f58405 to a7cc7b8 Compare December 17, 2018 09:56
* This removes the old timer handling completly. No persistent timers present anymore.
* Removes timer handling from the Harvester Client Admin UI backing.
* This cannot be unit tested as stated in the Javadocs and accepted by @landreev.
* This might need refactoring when problems arise from the simple execution approach used for now.
  Prior to this commit, harvest clients ran on independent timers and thus on independent threads.
  Now they are executed sequentially, which might lead to problems when harvests last longer and
  more clients want to run an hour later.
@pdurbin
Copy link
Member

pdurbin commented Mar 20, 2019

@poikilotherm heads up that this pull request has merge conflicts.

@poikilotherm
Copy link
Contributor Author

Closing in favor of #7416

@poikilotherm poikilotherm deleted the 5345-nonpersistent-ejb branch December 7, 2020 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants