[JIRA] (JSPT-118) Make Component Initialization & destruction non-idempotent

Rod Widdowson (Jira) jira at shibboleth.atlassian.net
Thu Jul 14 10:13:11 UTC 2022


Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) *created* an issue

Java Support ( https://shibboleth.atlassian.net/browse/JSPT?atlOrigin=eyJpIjoiNGM3NTUxNDAxMzFjNGNkNjgwNjUxOTMzYzY4ZDNjN2MiLCJwIjoiaiJ9 ) / Task ( https://shibboleth.atlassian.net/browse/JSPT-118?atlOrigin=eyJpIjoiNGM3NTUxNDAxMzFjNGNkNjgwNjUxOTMzYzY4ZDNjN2MiLCJwIjoiaiJ9 ) JSPT-118 ( https://shibboleth.atlassian.net/browse/JSPT-118?atlOrigin=eyJpIjoiNGM3NTUxNDAxMzFjNGNkNjgwNjUxOTMzYzY4ZDNjN2MiLCJwIjoiaiJ9 ) Make Component Initialization & destruction non-idempotent ( https://shibboleth.atlassian.net/browse/JSPT-118?atlOrigin=eyJpIjoiNGM3NTUxNDAxMzFjNGNkNjgwNjUxOTMzYzY4ZDNjN2MiLCJwIjoiaiJ9 )

Issue Type: Task Assignee: Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) Created: 14/Jul/22 6:13 AM Priority: Trivial Reporter: Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 )

This came out of discussions in https://shibboleth.atlassian.net/browse/JSPT-98.

Currently the component base classes allow (and indeed encourage) initialize and destroy to be called multiple times.

The implementation tries to make the calls to doInitialize and doDestroy only happen once, but there is not protection against multi-threaded operation.

To be discussed but we probably want to

* Stop testing for idempotency
* Run through all our code explicitly removing the places where init or destroy is called mu;tiple times.
* At that stage we have three choices

* Throw an exception if we are called multiple times
* Leave the “try to make it work” code in place
* Try to add syncrhonization. This isn’t as easy as it sounds since there is a very real (if contrived) way that the obvious fix (add syncrhonized to the destroy method) will deadlock (Component A destroys Component B, Component B destroys A and two threads destroy Component A and Component B at the same time).

( https://shibboleth.atlassian.net/browse/JSPT-118#add-comment?atlOrigin=eyJpIjoiNGM3NTUxNDAxMzFjNGNkNjgwNjUxOTMzYzY4ZDNjN2MiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JSPT-118#add-comment?atlOrigin=eyJpIjoiNGM3NTUxNDAxMzFjNGNkNjgwNjUxOTMzYzY4ZDNjN2MiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100202- sha1:e905ae5 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20220714/8f68b148/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-e96a9ed0-d46f-492c-9879-6017d5d4d977
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220714/8f68b148/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-947983b1-2e79-4e98-99d0-e5d999608877
Type: image/png
Size: 563 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220714/8f68b148/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-c035ff74-78bb-4a6b-8448-bb718f1c83d9
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220714/8f68b148/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-08e910b5-4c6b-4c32-b716-3b52ecd4ed84
Type: image/png
Size: 468 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220714/8f68b148/attachment-0007.png>


More information about the commits mailing list