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

Refactorings/repository pattern #3726

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
54a82a1
:ref: attempting a different DI approach in UserServiceImpl creation
dseurotech Oct 25, 2022
28aca91
:ref: removed unnecessary singletons
dseurotech Oct 25, 2022
28f07ca
:ref: some services were extending an abstract class, passing to it a…
dseurotech Oct 26, 2022
f1bd374
:ref: AbstractKapuaConfigurableService now injects dependencies inste…
dseurotech Oct 26, 2022
cc68fdd
:fix: test initialization
dseurotech Oct 26, 2022
5403fc4
:fix: in some cases, classes are instantiated outside of the DI, invo…
dseurotech Oct 27, 2022
96621b4
:ref: making explicit that AbstractKapuaConfigurableResourceLimitedSe…
dseurotech Oct 27, 2022
36cf8c5
ref: making the fact that AbstractKapuaConfigurableService depends up…
dseurotech Oct 27, 2022
10ac086
:ref: extracted a portion of userservice in a separate one in order t…
dseurotech Nov 3, 2022
fd9f5bb
:ref: extracting reused logic out of AccountService into AccountChild…
dseurotech Nov 4, 2022
985c792
:ref: propagating constructor deprecation and removing as many uses o…
dseurotech Nov 4, 2022
b0e7fed
:memo: adding javadoc to newly introduced services
dseurotech Nov 4, 2022
1650eaf
:ref: moving service configuration to separate collaborator
dseurotech Nov 7, 2022
a1ec7f4
:ref: moving service configuration management out of UserServiceImpl …
dseurotech Nov 7, 2022
2f9ecda
:ref: moving service configuration management out of RoleServiceImpl …
dseurotech Nov 7, 2022
0152f82
:ref: moving service configuration management out of JobServiceImpl a…
dseurotech Nov 7, 2022
deb71c3
:enh: dropped direct access to ServiceDAO in favour of using esisting…
dseurotech Nov 9, 2022
8d55a22
:ref: moving service configuration management out of AccountServiceIm…
dseurotech Nov 9, 2022
cff5ac7
:fix: integration tests
dseurotech Nov 9, 2022
a3e1a57
:ref: removed last usages of AbstractKapuaConfigurableService and der…
dseurotech Nov 10, 2022
efe4783
:enh: service caching is now a configuration aspect, handled through …
dseurotech Nov 10, 2022
8491351
:ref: no need for ServiceConfigurationManager instances to be abstract
dseurotech Nov 10, 2022
d701c16
:enh: introducing a convenience class to help coordinating isServiceE…
dseurotech Jan 27, 2023
478151b
:fix: test initialization
dseurotech Oct 26, 2022
12917f7
:ref: moving service configuration to separate collaborator
dseurotech Nov 7, 2022
ebfbee0
tentative repository pattern introduction
dseurotech Feb 9, 2023
9ed5ee0
:fix: removed tests which tested Mockito
dseurotech Feb 10, 2023
a1abf7a
:fix: test fixed due to change in mockito behaviour
dseurotech Feb 10, 2023
5792385
:enh: cleaned test example
dseurotech Feb 10, 2023
17372c1
:fix: removed tests which tested Mockito
dseurotech Feb 10, 2023
0947270
:enh: first attempt at defining common repository interfaces
dseurotech Feb 20, 2023
ad8b70b
reverting to mockito 1 for now, as bumping the version results in mul…
dseurotech Feb 20, 2023
45a7715
:fix: javadoc
dseurotech Feb 21, 2023
09ff2c5
:enh: providing common jpa repository based to be inherited by specif…
dseurotech Feb 23, 2023
1a5d3f8
:enh: collaborators are now using repositories intead of replicating …
dseurotech Feb 23, 2023
68a01da
:fix: corrected persistence unit name for accounts
dseurotech Feb 24, 2023
3d82681
restoring checked expressions as this is not the battle being fought …
dseurotech Feb 24, 2023
db50379
:fix: find and delete in the same transaction
dseurotech Feb 24, 2023
184b6f0
:fix: tests
dseurotech Feb 24, 2023
211b26e
:new: introducing repositories for AccessInfo, AccessPermission and A…
dseurotech Feb 24, 2023
b24869e
:enh: thowing a bunch of singletons around newly created injectables
dseurotech Feb 24, 2023
be7c5d2
:fix: tests
dseurotech Feb 24, 2023
c23c98b
tentative strong typing of list results
dseurotech Feb 24, 2023
e336e4c
marking ServiceDAO methods as deprecated
dseurotech Feb 27, 2023
6cfacfe
:enh: caching service configuration repository
dseurotech Feb 27, 2023
fe91c31
JobDeviceManagementOperationRepository in place of JobDeviceManagemen…
dseurotech Feb 27, 2023
afe702c
DeviceManagementOperationDAOm to DeviceManagementOperationRepository
dseurotech Feb 27, 2023
7833631
more Device DAOs converted to repositories
dseurotech Feb 27, 2023
f204491
:fix: error in update procedure
dseurotech Feb 28, 2023
2ebfe2b
:fix: tests
dseurotech Feb 28, 2023
ecee683
partial implementation of proper repositories, with transaction manag…
dseurotech Feb 28, 2023
f8e9902
now building, getting back to rewiring everything
dseurotech Mar 2, 2023
0ec8647
rewired
dseurotech Mar 2, 2023
ef5a85f
some test fixes
dseurotech Mar 2, 2023
efa4228
more generic check for duplicate names
dseurotech Mar 3, 2023
824568f
:fix: DI configuration
dseurotech Mar 3, 2023
0281ab3
:fix: tag tests
dseurotech Mar 3, 2023
1b96cf9
:fix: converting KapuaIds.... the pain...
dseurotech Mar 3, 2023
c990c18
REVERSE ME, changing pom version to test in parallel
dseurotech Mar 3, 2023
b49d79f
:enh: exception mapping
dseurotech Mar 3, 2023
32f2bfc
giving names to caches...
dseurotech Mar 3, 2023
cba3139
device cache was not meant to store device connections
dseurotech Mar 3, 2023
e912df9
:fix: do not just cache it, return it too
dseurotech Mar 6, 2023
e05acdd
:fix: javadoc
dseurotech Mar 6, 2023
c87acd5
:fix: tests configuration
dseurotech Mar 6, 2023
0fb95c6
:fix: tests configuration
dseurotech Mar 6, 2023
31e68f8
device management services
dseurotech Mar 6, 2023
132b5c9
uplifting RoleService and RolePermissionService
dseurotech Mar 6, 2023
6c704e4
uplifting Group Service
dseurotech Mar 7, 2023
247851c
uplifting Access Info Service
dseurotech Mar 7, 2023
8ff7573
REVERT ME: removing github actions output mask in order to understand…
dseurotech Mar 7, 2023
0951357
uplifted domain service
dseurotech Mar 7, 2023
9f419e1
uplifted mfa more authentication services
dseurotech Mar 7, 2023
d793e71
:fix: replicating strange properties update after persist from old logic
dseurotech Mar 8, 2023
d09ed16
:enh: switch for no reason as all branches lead to the same code
dseurotech Mar 8, 2023
c8df900
uplifted Job Service
dseurotech Mar 8, 2023
446ba1a
uplifted Jopb Execution Service
dseurotech Mar 8, 2023
3e5fb60
uplifted more Job related services
dseurotech Mar 8, 2023
976e03c
wiring fixes
dseurotech Mar 8, 2023
8f8f01b
explicit references to other implementations
dseurotech Mar 9, 2023
c94d1c9
removing unused DAOs
dseurotech Mar 9, 2023
e899e5f
uplifted User Service
dseurotech Mar 9, 2023
3916dfe
:uplifted trigger services
dseurotech Mar 9, 2023
964c0c6
uplifted Access Token DAO
dseurotech Mar 9, 2023
201badf
:fix: was trowing the wrong exception
dseurotech Mar 9, 2023
2d4c9e9
:fix: tests
dseurotech Mar 10, 2023
b610c95
restored group querying logic from old ServiceDAO
dseurotech Mar 10, 2023
0188feb
removed no longer used stuff
dseurotech Mar 10, 2023
ebc1b9a
:fix: tests
dseurotech Mar 10, 2023
69aa6c8
:fix: tests
dseurotech Mar 10, 2023
c1f4366
:enh: imported id-clashing retry logic for entity creation from Entit…
dseurotech Mar 13, 2023
7c5e976
:enh: moved persistence logic to the persistence layer
dseurotech Mar 14, 2023
e8db655
query optimization
dseurotech Mar 14, 2023
efd5cbb
:fix: TriggerImplJpaRepository.deleteAllByJobId query (with metamodel…
dseurotech Mar 14, 2023
854a215
uplifted job engine Jbatch service
dseurotech Mar 15, 2023
d5fa918
RaiseServiceEventInterceptor no longer needs services to extend Abstr…
dseurotech Mar 15, 2023
c8bf1b1
removed useless entries from persistence files
dseurotech Mar 15, 2023
4601228
horrible fix in a horrible situation. This class needs to be instanti…
dseurotech Mar 15, 2023
819bca4
allowing for event storage to be hooked within the transaction execution
dseurotech Mar 16, 2023
c789fb9
as there is only one transaction method left, the name can be simplified
dseurotech Mar 16, 2023
e8a3c1e
avoiding dual-line comments, for the sake of readability
dseurotech Mar 16, 2023
f199b05
hackish fix for Event Housekeeper, but at least the least nearly all …
dseurotech Mar 17, 2023
b990da7
converting collision entity tests
dseurotech Mar 17, 2023
7eda27c
:ref: cleaning up repository interface, using Optionals to make the c…
dseurotech Mar 20, 2023
f9f4a09
:enh: relying on an interface for jpa context extraction in order to …
dseurotech Mar 21, 2023
1bbddf9
:enh: externalizing jpa repository configuration instead of staticall…
dseurotech Mar 21, 2023
3d068f6
just providing a silly in-memory implementation of basic repositories
dseurotech Mar 21, 2023
a20cba5
:enh: documenting some repository aspects
dseurotech Mar 21, 2023
1f19b09
:fix: EventStorer interface
dseurotech Mar 21, 2023
251c268
:fix: any exception (even caught) will cause jpa to set the transacti…
dseurotech Mar 23, 2023
ad690cd
restoring (albeit in a deprecated state) some classes to ease migrati…
dseurotech Mar 24, 2023
3ddd3e8
:fix: device repo fix
dseurotech Mar 28, 2023
a4e2a32
:enh: only open the transaction if needed (if all results are retrive…
dseurotech Mar 28, 2023
f38452b
:enh: txManager flow is now generic, with Jpa implementation being a …
dseurotech Mar 29, 2023
17c6947
:enh: simplified TxManager creation with jpa-dedicated factory
dseurotech Mar 29, 2023
fdbf973
:enh: using autegenerated metamodel where necessary, instead of stati…
dseurotech Mar 30, 2023
3a56ac3
absorbed DuplicateNameChecker in KapuaNamedEntityRepository
dseurotech Mar 31, 2023
dc3015c
minor fixes
dseurotech Mar 31, 2023
6945551
:fix: dependency moved only where needed it
dseurotech Apr 3, 2023
2bd0acd
:fix: wiring
dseurotech Apr 4, 2023
5ffe88f
:fix: tests
dseurotech Apr 4, 2023
9588966
:ref: removed temporary KapuaConfigurableServiceBase, replaced with K…
dseurotech Apr 5, 2023
8d22d5c
:fix: relying on existing transaction instead of opening a new one fo…
dseurotech Apr 5, 2023
1c43ea4
:fix: wrong wiring in tests
dseurotech Apr 11, 2023
602a802
:enh: cleaning up self-use of repository methods, using provided util…
dseurotech Apr 11, 2023
9df579b
:fix: inverted logic
dseurotech Apr 11, 2023
ae988d1
:enh: logic to identify recovarable exceptions has been moved to tran…
dseurotech Apr 19, 2023
0de331e
:enh: moved persistence logic to the repository
dseurotech Apr 19, 2023
1ab5344
:enh: documentation
dseurotech Apr 19, 2023
f12efd4
:enh: initializing service modules alongside the dependency injection…
dseurotech Apr 20, 2023
c7de1bd
:enh: documentation
dseurotech Apr 21, 2023
9628f86
:fix: rebase regression
dseurotech Apr 21, 2023
e142d75
beginning to tag potential layer violations for further consideration…
dseurotech Apr 26, 2023
8417a87
:enh: standard missing entity exception details filling, instead of o…
dseurotech Apr 26, 2023
924f1d1
:enh: documentation and utility classes
dseurotech Apr 27, 2023
2b87125
tentative global definition of end-of-transaction consumers, to hook …
dseurotech Apr 28, 2023
bbcea26
:ref: stepping back one bit - keep using services instead of services…
dseurotech May 3, 2023
3fc14e8
Revert "tentative global definition of end-of-transaction consumers, …
dseurotech May 4, 2023
551464c
:fix: handling corner case in event update
dseurotech May 8, 2023
a16e56d
:ref: better clarity
dseurotech May 9, 2023
b16b656
:enh: moved group query helper logic in separate module, within the b…
dseurotech May 9, 2023
bbbf15f
:fix: handling delete of detached entity corner case
dseurotech May 10, 2023
e77934a
:fix: rebase fixes
dseurotech May 23, 2023
c5c8362
:enh: providing rudimental converter for Kapua Queries to be used wit…
dseurotech Jun 5, 2023
1f4b3f0
:enh: performance improvement (avoid recreating the entire KapuaEntit…
dseurotech Jun 28, 2023
705ca1d
reverted artifact versions to 2.0.0-SNAPSHOT
dseurotech Aug 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/runTestsTaggedAs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ runs:
run: echo "127.0.0.1 job-engine" | sudo tee -a /etc/hosts
shell: bash
- name: Test execution step
run: ./ci-output.sh mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.filter.tags="${{ inputs.tag }}" -pl ${TEST_PROJECTS} verify
run: mvn -B ${BUILD_OPTS} ${CONFIG_OVERRIDES} -Dgroups='!org.eclipse.kapua.qa.markers.junit.JUnitTests' -Dcucumber.filter.tags="${{ inputs.tag }}" -pl ${TEST_PROJECTS} verify
shell: bash
- name: Code-coverage results
run: bash <(curl -s https://codecov.io/bash)
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ scenarios.
**Note:** the Docker Hub repository mentioned above is not the official project repository from Eclipse Foundation.
***

Suppose the target is the current snapshot 2.0.0-SNAPSHOT.

* Clone Eclipse Kapua&trade; into a local directory
* Open an OS shell and move to Kapua project root directory
* Start Docker runtime
Expand Down Expand Up @@ -109,12 +111,12 @@ On Windows (PowerShell):
### Access

Once the containers are running, the Kapua services can be accessed. Eclipse Kapua&trade; is a multi tenant
system. The demo installation comes with one default tenant, called _kapua-sys_, which is also the root tenant.
system. The demo installation comes with one default tenant, called _kapua-sys_, which is also the root tenant.
In Eclipse Kapua&trade; a _tenant_ is commonly referred to as an _account_.

#### The console

The administration console is available at [http://localhost:8080/](http://localhost:8080/).
The administration console is available at [http://localhost:8080/](http://localhost:8080/).
Copy paste the URL above to a Web browser, as the login screen appears, type the following credentials:

* Username: `kapua-sys`
Expand Down Expand Up @@ -142,7 +144,9 @@ invoke the API, an easy one is by using the Swagger UI:

```json
{
"password" : [ "kapua-password" ],
"password": [
"kapua-password"
],
"username": "kapua-sys"
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# Eurotech
################################################################################

java ${JAVA_OPTS} ${DEBUG_OPTS} ${JMX_OPTS} -jar kapua-service-authentication-2.0.0-SNAPSHOT-app.jar
java ${JAVA_OPTS} ${DEBUG_OPTS} ${JMX_OPTS} -jar kapua-service-authentication-2.0.0-SNAPSHOT-app.jar
2 changes: 1 addition & 1 deletion broker/artemis/plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-client-security</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-security-authentication-api</artifactId>
</dependency>
Expand Down
82 changes: 40 additions & 42 deletions client/gateway/profile/kura/src/main/protobuf/kurapayload.proto
Original file line number Diff line number Diff line change
@@ -1,59 +1,57 @@
/*
* This file originates from the Eclipse Kura™ project
*/

//
// To compile:
// protoc --proto_path=src/main/protobuf --java_out=src/main/java src/main/protobuf/kurapayload.proto
//
syntax = "proto2";

package kuradatatypes;

option java_package = "org.eclipse.kapua.gateway.client.kura.payload";
option java_package = "org.eclipse.kapua.gateway.client.kura.payload";
option java_outer_classname = "KuraPayloadProto";

message KuraPayload {

message KuraMetric {
enum ValueType {
DOUBLE = 0;
FLOAT = 1;
INT64 = 2;
INT32 = 3;
BOOL = 4;
STRING = 5;
BYTES = 6;
}

required string name = 1;
required ValueType type = 2;

optional double double_value = 3;
optional float float_value = 4;
optional int64 long_value = 5;
optional int32 int_value = 6;
optional bool bool_value = 7;
optional string string_value = 8;
optional bytes bytes_value = 9;
}

message KuraPosition {
required double latitude = 1;
required double longitude = 2;
optional double altitude = 3;
optional double precision = 4; // dilution of precision of the current satellite fix.
optional double heading = 5; // heading in degrees
optional double speed = 6; // meters per second
optional int64 timestamp = 7;
optional int32 satellites = 8; // number satellites locked by the GPS device
optional int32 status = 9; // status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
message KuraMetric {
enum ValueType {
DOUBLE = 0;
FLOAT = 1;
INT64 = 2;
INT32 = 3;
BOOL = 4;
STRING = 5;
BYTES = 6;
}

optional int64 timestamp = 1;
optional KuraPosition position = 2;

extensions 3 to 4999;
repeated KuraMetric metric = 5000; // can be zero, so optional
optional bytes body = 5001;
required string name = 1;
required ValueType type = 2;

optional double double_value = 3;
optional float float_value = 4;
optional int64 long_value = 5;
optional int32 int_value = 6;
optional bool bool_value = 7;
optional string string_value = 8;
optional bytes bytes_value = 9;
}

message KuraPosition {
required double latitude = 1;
required double longitude = 2;
optional double altitude = 3;
optional double precision = 4; // dilution of precision of the current satellite fix.
optional double heading = 5; // heading in degrees
optional double speed = 6; // meters per second
optional int64 timestamp = 7;
optional int32 satellites = 8; // number satellites locked by the GPS device
optional int32 status = 9; // status indicator for the GPS data: 1 = no GPS response; 2 = error in response; 4 = valid.
}

optional int64 timestamp = 1;
optional KuraPosition position = 2;

extensions 3 to 4999;
repeated KuraMetric metric = 5000; // can be zero, so optional
optional bytes body = 5001;
}
5 changes: 4 additions & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
</parent>

<artifactId>kapua-commons</artifactId>

<build>
<resources>
<resource>
Expand Down Expand Up @@ -116,6 +115,10 @@
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
</dependency>

<!-- Caching dependencies -->
<dependency>
Expand Down
21 changes: 21 additions & 0 deletions commons/src/main/java/org/eclipse/kapua/commons/CommonsModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@
*******************************************************************************/
package org.eclipse.kapua.commons;

import com.google.inject.Provides;
import org.eclipse.kapua.commons.core.AbstractKapuaModule;
import org.eclipse.kapua.commons.jpa.EventStorer;
import org.eclipse.kapua.commons.jpa.EventStorerImpl;
import org.eclipse.kapua.commons.jpa.KapuaJpaRepositoryConfiguration;
import org.eclipse.kapua.commons.model.query.QueryFactoryImpl;
import org.eclipse.kapua.commons.service.event.store.api.EventStoreRecordRepository;
import org.eclipse.kapua.commons.service.event.store.internal.EventStoreRecordImplJpaRepository;
import org.eclipse.kapua.model.query.QueryFactory;

import javax.inject.Singleton;

/**
* {@code kapua-commons} {@link AbstractKapuaModule}.
*
Expand All @@ -27,4 +35,17 @@ public class CommonsModule extends AbstractKapuaModule {
protected void configureModule() {
bind(QueryFactory.class).to(QueryFactoryImpl.class);
}

@Provides
@Singleton
EventStoreRecordRepository eventStoreRecordRepository(KapuaJpaRepositoryConfiguration jpaRepoConfig) {
return new EventStoreRecordImplJpaRepository(jpaRepoConfig);
}

@Provides
@Singleton
EventStorer eventPersister(EventStoreRecordRepository repository) {
return new EventStorerImpl(repository);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@
import org.eclipse.kapua.service.KapuaEntityService;
import org.eclipse.kapua.service.KapuaService;
import org.eclipse.kapua.service.account.Account;
import org.eclipse.kapua.service.account.AccountListResult;
import org.eclipse.kapua.service.authorization.AuthorizationService;
import org.eclipse.kapua.service.authorization.permission.PermissionFactory;
import org.eclipse.kapua.service.config.KapuaConfigurableService;

import java.util.Map;
import java.util.Optional;

//TODO: this should be a collaborator, not a base class

/**
* Base {@code abstract} {@link KapuaConfigurableService} implementation for services that have a max number of entities allowed.
* <p>
Expand Down Expand Up @@ -72,13 +69,13 @@ public abstract class AbstractKapuaConfigurableResourceLimitedService<
extends AbstractKapuaConfigurableService
implements KapuaEntityService<E, C> {


//TODO: make final as soon as deprecated constructors are removed
private AccountChildrenFinder accountChildrenFinder;
private F factory;
//TODO: remove as soon as deprecated constructors are removed
private final Class<F> factoryClass;


/**
* Constructor.
*
Expand All @@ -100,7 +97,7 @@ protected AbstractKapuaConfigurableResourceLimitedService(
domain,
entityManagerFactory,
null,
serviceClass,
null,
factoryClass);
}

Expand All @@ -111,8 +108,6 @@ protected AbstractKapuaConfigurableResourceLimitedService(
* @param domain The {@link Domain} on which check access.
* @param entityManagerFactory The {@link EntityManagerFactory} that handles persistence unit
* @param abstractCacheFactory The {@link CacheFactory} that handles caching of the entities
* @param serviceClass The {@link KapuaService} type.
* @param factoryClass The {@link KapuaEntityFactory} type.
* @since 1.2.0
* @deprecated Since 2.0.0. Please use {@link #AbstractKapuaConfigurableResourceLimitedService(String, Domain, EntityManagerFactory, AbstractEntityCacheFactory, KapuaEntityFactory, PermissionFactory, AuthorizationService, AccountChildrenFinder, RootUserTester)} This constructor may be removed in a next release
*/
Expand Down Expand Up @@ -146,7 +141,6 @@ protected AbstractKapuaConfigurableResourceLimitedService(
* @param permissionFactory The {@link PermissionFactory} instance.
* @param authorizationService The {@link AuthorizationService} instance.
* @param rootUserTester The {@link RootUserTester} instance.
* @since 2.0.0
*/
protected AbstractKapuaConfigurableResourceLimitedService(String pid,
Domain domain,
Expand Down Expand Up @@ -250,7 +244,7 @@ private long allowedChildEntities(KapuaId scopeId, KapuaId targetScopeId, Map<St
// Current used entities
long currentUsedEntities = this.count(countQuery);

AccountListResult childAccounts = getAccountChildrenFinder().findChildren(scopeId, Optional.ofNullable(targetScopeId));
final KapuaListResult<Account> childAccounts = txManager.execute(tx -> getAccountChildrenFinder().findChildren(scopeId, Optional.ofNullable(targetScopeId)));
// Resources assigned to children
long childCount = 0;
for (Account childAccount : childAccounts.getItems()) {
Expand Down
Loading
Loading