Project

General

Profile

Actions

Defect #3142

closed

Removing auto role by attribute definition fail, because no transaction is open

Added by Roman Kučera almost 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Roman Kučera
Category:
Database
Target version:
Start date:
06/23/2022
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

When you have some auto role byt attribute. This role is not assigned to anybody.
When you try to remove this definition it failed, because no transaction is open.

workaround is to run RemoveAutomaticRoleTaskExecutor from scheduler to the specific role.

Find what is causing the issue and fix it

Actions #1

Updated by Roman Kučera almost 2 years ago

  • % Done changed from 0 to 60

Implemented in https://github.com/bcvsolutions/CzechIdMng/tree/kucerar/3142-auto-role-remove-transaction

The solution is enabling load time weaving and AspectJ proxy mode for main datasource.

Other workaround which worked is calling LRT directly in controller instead of service.

I also tried a lot of variants with different transactional annotation, with or without nested transaction turned on. But nothing worked.

Actions #2

Updated by Tomáš Doischer over 1 year ago

  • Sprint set to Sprint 12.3-1 (srp 03 - srp 17)
Actions #3

Updated by Tomáš Doischer over 1 year ago

  • Sprint changed from Sprint 12.3-1 (srp 03 - srp 17) to Sprint 12.3-2 (srp 17 - srp 31)
Actions #4

Updated by Roman Kučera over 1 year ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Roman Kučera to Tomáš Doischer
  • % Done changed from 60 to 80

PR https://github.com/bcvsolutions/CzechIdMng/pull/252

After discussion, the solution is via calling LRT directly. This make the whole process of deleting more simple.
AspetJ solution could potentially break some other stuff so we backed of from this solution.

@doischert could you make a review please?
Github action is running.

Actions #5

Updated by Roman Kučera over 1 year ago

Github action is green

Actions #6

Updated by Tomáš Doischer over 1 year ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Tomáš Doischer to Roman Kučera

I tested the workaround and it has a major issue: the removal of the automatic role is not audited. Can you take a look at it again?

Actions #7

Updated by Roman Kučera over 1 year ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Roman Kučera to Tomáš Doischer

@doischert I reworked the solution. Requests are used now again. Check PR please

Actions #8

Updated by Tomáš Doischer over 1 year ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Tomáš Doischer to Roman Kučera
  • % Done changed from 80 to 100

Thank you, LGTM. Merged to develop.

Actions #9

Updated by Tomáš Doischer about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF