Skip to content

Proposal: make persistent EJB timers non-persistent or not rely on database #5345

@poikilotherm

Description

@poikilotherm

This is related to #5292 and a story of that epic.
As DataverseTimerServiceBean.java has been mostly written and maintained by @landreev, this most certainly is for him...

Context

Currently, in glassfish-setup.sh you need to setup a database connection for storage of persistent EJB timers.

Reusing the database for Dataverse for EJB timers is alright, but it is not easy to depict when heading for containers. It is much easier for container approaches to use application scoped JDBC connections, but those seem not to be reusable for EJB timers.

There seemed to be some issues in the past, too. #3672, #3789 and more.

Proposal

Just remove the persistent nature of timers.

  • They are created on each startup on the timing server (see docs).
  • In a single node setup, when the server is down, IMHO there is no need to have the timers persistent in a database. No one will execute them. Executing them after the server comes back seems with HarvestingClient and ExportClient as current use cases not very important.
  • In a multi node setup, when the timing server is down, you need to change it to another server, so they get executed again. This will result in broken persistent timers anyway, as they had been created with the name of the dead timing server.

When persistance is needed in a multi node setup in the future, there is Hazelcast in Payara which supports storing timers as long as at least one cluster member is online...

Comments are very much appreciated. :-)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions