Cayenne
  1. Cayenne
  2. CAY-1665

Consistent and concise property names aggregated in one place

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1M3
    • Fix Version/s: 3.1B1
    • Component/s: Core Library
    • Labels:
      None

      Description

      One of the final things we need in 3.1 is to take all possible property names and DI collection names, with definitions scattered around various Java classes, and define them in a single place as String constants that follow some simple naming conventions. The constants location is org.apache.cayenne.configuration.Constants. The naming convention that I am trying here is this:

      cayenne.<tier_name_or_logical_module_name>.<undescore_separated_lowercase_property_description>[.optional_project_or_data_node_qualifier]

      Here is the list of properties ("legacy" property names are in parenthesis) :

      [DI Collections]

      cayenne.properties (org.apache.cayenne.configuration.DefaultRuntimeProperties.properties)
      cayenne.server.adapter_detectors ( org.apache.cayenne.configuration.server.DefaultDbAdapterFactory.detectors)

      cayenne.server.domain_filters (org.apache.cayenne.configuration.server.DataDomainProvider.filters)
      cayenne.server.project_locations ( org.apache.cayenne.configuration.server.DataDomainProvider.locations)

      cayenne.server.default_types (org.apache.cayenne.dba.JdbcAdapter.defaultExtendedTypes)
      cayenne.server.user_types (org.apache.cayenne.dba.JdbcAdapter.userExtendedTypes)
      cayenne.server.type_factories (org.apache.cayenne.dba.JdbcAdapter.extendedTypeFactories)

      cayenne.server.rop_event_bridge_properties (org.apache.cayenne.remote.hessian.service.HessianService.properties)

      [JDBC Properties]

      cayenne.jdbc.driver[.domain_name.node_name]
      cayenne.jdbc.url[.domain_name.node_name]
      cayenne.jdbc.username[.domain_name.node_name]
      cayenne.jdbc.password[.domain_name.node_name]
      cayenne.jdbc.min_connections (cayenne.jdbc.min.connections[.domain_name.node_name])
      cayenne.jdbc.max_connections (cayenne.jdbc.max.conections[.domain_name.node_name]) - notice typo ("n" missing) in the old property name

      [Cross-tier Properties]

      cayenne.querycache.size (cayenne.MapQueryCacheFactory.cacheSize)

      [Server properties]

      cayenne.server.contexts_sync_strategy (org.apache.cayenne.sync_contexts)
      cayenne.server.object_retain_strategy (org.apache.cayenne.context_object_retain_strategy)
      (cayenne.adapter[.domain_name.node_name]) - removed, was unused

      [ROP Properties]

      cayenne.rop.service_url (cayenne.config.rop.service.url)
      cayenne.rop.service_username (cayenne.config.rop.service.username)
      cayenne.rop.service_password (cayenne.config.rop.service.password)
      cayenne.rop.shared_session_name (cayenne.config.rop.service.shared_session)
      cayenne.rop.channel_events (cayenne.config.rop.client.channel.events)
      cayenne.rop.context_change_events (cayenne.config.rop.client.context.change_events)
      cayenne.rop.context_lifecycle_events (cayenne.config.rop.client.context.lifecycle_events)
      cayenne.rop.service.timeout (cayenne.config.rop.service.timeout)

      cayenne.server.rop_event_bridge_factory (cayenne.RemoteService.EventBridge.factory)

        Activity

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development