Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSGi DS 1.2 compatibility #96

Merged

Conversation

runoncode
Copy link

At the moment the library is relying on the OSGi annotations that were introduced in the OSGi DS 1.3 which makes it impossible to deploy inside Equinox container that is widely used by many organisations.
This PR does two things:

  • Introduces DS 1.2 compatibility
  • Adds bundle task and bundle.bnd file to package the library as OSGi bundle using Gradle and BND tool.
  • Preserve binary and functional compatibility with older versions.

@@ -41,11 +41,9 @@
import static graphql.annotations.util.NamingKit.toGraphqlName;
import static graphql.schema.GraphQLEnumType.newEnum;

@Component(scope = ServiceScope.SINGLETON, property = "type=default")
@Component(property = "type=default")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Component will remain a singleton since serviceFactory=false from DS 1.2 will be used.

@@ -355,6 +353,18 @@ public DefaultTypeFunction() {
typeFunctions.add(new ObjectFunction());
}

@Reference(cardinality = ReferenceCardinality.MULTIPLE,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: with cardinality = ReferenceCardinality.MULTIPLE we can use default policy option ReferencePolicyOption.RELUCTANT, therefore ReferencePolicyOption.GREEDY as was used before is not needed.

@bbakerman bbakerman merged commit c31f1ba into Enigmatis:master Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants