pjklauser / bridgemq

Trusted Domain Messaging eXchange
0 stars 1 forks source link

finish zone partitioning #34

Closed pjklauser closed 9 years ago

pjklauser commented 9 years ago

make sure the zone partitioning is actually working towards DB.

pjklauser commented 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.

pjklauser commented 9 years ago

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.

pjklauser commented 9 years ago

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.