Closed pjklauser closed 9 years ago
In the unit tests we use : org.tdmx.lib.zone.service.FixedZonePartitionIdProvider which hard wires all zoneDB interactions with the default db configuration.
in the server spring config, the ZoneDB datasource is a org.tdmx.lib.control.datasource.DynamicDataSource which gets the partitionId from the org.tdmx.lib.zone.service.ZonePartitionIdProviderImpl which uses the AuthenticatedAgentService.
needed to provide threadlocal auth provider since AgentCredentials are in zoneDB partition and the "normal" authenticated user is not yet set. Chicken and egg problem requiring dual partitionIdProvider strategy.
make sure the zone partitioning is actually working towards DB.