Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Spring

PicoContainer

Guice

Supports start/stop lifecycle hooks for components

Yes (interface, JSR-250 @PostConstruct/@PreDestroy annotations, spring-specific annotation, or xml-configured)

Yes (interface or annotationJSR-250 @PostConstruct/@PreDestroy annotations)

No

Supports autowiring

Yes

Yes

Yes

Supports in-code wiring and configuration

Yes (JavaConfig)

Yes

Yes

Supports external wiring (outside of code)

Yes (xml)

No

Not directly (but it's possible)

Supports external config (outside of code)

Yes (xml and/or properties)

No

Yes (Names.bindProperties)

OSGi-Friendly

Yes (Spring-DM)

Unknown

Yes (Guice-Peaberry)

JSR-330 Support

Yes, 3.0+

In Progress

In Progress

Jar Footprint (non-OSGi)

750kb

300kb

650kb

...

  • Prefer constructor injection to setter injection
  • Minimize coupling of code with DI frameworkto DI framework
    • Use JSR-250 @PostConstruct/@PreDestroy lifecycle hooks when needed
    • Avoid use of framework-specific interfaces, classes, and annotations
  • Minimize changes to existing Fedora functionality

...

Tasklist
Modifications Needed
Modifications Needed
|| Completed || Priority || Locked || CreatedDate || CompletedDate || Assignee || Name ||
| F | M | F | 1268080202735 | |         |cwilper|cwilper | Add and populate GlobalConfig |
| F | M | F | 1268080236272 | | cwilper        |cwilper|| Update org.fcrepo.server.access.DefaultAccess |
| F | M | F | 1268080257979 | | cwilper        |cwilper|| Update org.fcrepo.server.access.DynamicAccessModule |
| F | M | F | 1268080268001 | |         |cwilper|cwilper | Update org.fcrepo.server.journal.Journaler |
| F | M | F | 1268080276055 | | cwilper        |cwilper|| Update org.fcrepo.server.management.BasicPIDGenerator |
| F | M | F | 1268080285519 | | cwilper        |cwilper|| Update org.fcrepo.server.management.ManagementModule |
| F | M | F | 1268080327906 | |         |cwilper|cwilper | Update org.fcrepo.server.messaging.MessagingModule |
| F | M | F | 1268080339553 | | cwilper        |cwilper|| Update org.fcrepo.server.oai.FedoraOAIProviderModule |
| F | M | F | 1268080350944 | | cwilper        |cwilper|| Update org.fcrepo.server.resourceIndex.ResourceIndexModule |
| F | M | F | 1268080374403 | | cwilper        |cwilper|| Update org.fcrepo.server.search.FieldSearchSQLModule |
| F | M | F | 1268080381223 | |         |cwilper|cwilper | Update org.fcrepo.server.security.DefaultAuthorization |
| F | M | F | 1268080399963 | |         |cwilper|cwilper | Update org.fcrepo.server.security.DefaultBackendSecurity |
| F | M | F | 1268080425721 | | cwilper        |cwilper|| Update org.fcrepo.server.storage.ConnectionPoolManagerImpl |
| F | M | F | 1268080433280 | |         |cwilper|cwilper | Update org.fcrepo.server.storage.DefaultDOManager |
| F | M | F | 1268080461067 | | cwilper        |cwilper|| Update org.fcrepo.server.storage.DefaultExternalContentManager |
| F | M | F | 1268082094738 | | cwilper        |cwilper|| Update org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorageModule |
| F | M | F | 1268082154104 | | cwilper        |cwilper|| Update org.fcrepo.server.storage.lowlevel.DefaultLowlevelStorageModule |
| F | M | F | 1268082165864 | |         |cwilper|cwilper | Update org.fcrepo.server.storage.translation.DOTranslationModule |
| F | M | F | 1268082180490 | |         |cwilper|cwilper | Update org.fcrepo.server.validation.DOValidatorModule |

Phase II - Swap

  • Decide on DI framework
  • Convert fcfg to DI configuration and update installer to populate it instead
  • Trigger initialization of module singletons via DI framework in context initialization
  • Use injected module dependencies wherever possible, avoiding use of Module and Server at runtime

...