I have two Bundles
1. I18n Service (Internationalization)
2. Persistence Service (Database)
The thing is that the Bundle I18n uses the Database Services to store Texts and Messages in different languages. And the Persistence Service, also use I18m to store some Error Messages in different languages, so each Service depend on each other, but they should not work together, because they both offer dofferent types of Services.
My question, does any bosy knows a Pattern or Strictire that can help me solve this problem? I need to registers these Services and allow them to use each other.
In the Persistence Service Activator, I have the following dependency delcared:
dependencyManager.add(createComponent()
.setImplementation(PersistenceImpl.class)
.add(createServiceDependency()
.setService(I18nService.class)
.setRequired(true))
);
But the same cannot be done with the I18n, in that case none of them would start:
dependencyManager.add(createComponent()
.setImplementation(I18nImpl.class)
.add(createServiceDependency()
.setService(PersistenceService.class)
.setRequired(true))
);
Thank you.