ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 12 - AD0-E103 discussion

Report
Export

A developer needs to implement a service component that should be manually configured by operations to react on operational circumstances. The service component should NOT be active by default. The service has the properties

myservice.name (one string value) and myservice.stringValues (a list of the string values) to be configured.

The developer needs to use OSGi Metatype annotations to make those properties configurable in the Apache Felix Web Console. Which set of steps should the developer take to meet these requirements?

A.
1. For the class fields myserviceName and myserviceStringValues, add a @AttributeDefinition annotation each with names set to myservice.name and myservice.stringValues respectively.
Answers
A.
1. For the class fields myserviceName and myserviceStringValues, add a @AttributeDefinition annotation each with names set to myservice.name and myservice.stringValues respectively.
B.
Use the @Component annotation with configurationFactory = true on the service component class.
Answers
B.
Use the @Component annotation with configurationFactory = true on the service component class.
C.
Use the @Service service component class.
Answers
C.
Use the @Service service component class.
D.
Use the activate method of the service component class to get the configuration annotation interface class injected.
Answers
D.
Use the activate method of the service component class to get the configuration annotation interface class injected.
E.
1. Create an annotation interface as inner class of the service component and annotate it with @ObjectClassDefinition.
Answers
E.
1. Create an annotation interface as inner class of the service component and annotate it with @ObjectClassDefinition.
F.
Apply @AttributeDefinition for the methods myservice.name and myservice.stringValues.
Answers
F.
Apply @AttributeDefinition for the methods myservice.name and myservice.stringValues.
G.
Use the @Component annotation with configurationPolicy = ConfigurationPolicy.REQUIRE on the service component.
Answers
G.
Use the @Component annotation with configurationPolicy = ConfigurationPolicy.REQUIRE on the service component.
H.
Use the @Designate annotation to link the service component to the created configuration annotation interface.
Answers
H.
Use the @Designate annotation to link the service component to the created configuration annotation interface.
I.
Use the activate method of the service component class to get the configuration annotation interface class injected.
Answers
I.
Use the activate method of the service component class to get the configuration annotation interface class injected.
J.
1. Create an annotation interface as inner class of the service component and annotate it with @ObjectClassDefinition.
Answers
J.
1. Create an annotation interface as inner class of the service component and annotate it with @ObjectClassDefinition.
K.
Apply @AttributeDefinition for the methods myservice_name and myservice_stringValues.
Answers
K.
Apply @AttributeDefinition for the methods myservice_name and myservice_stringValues.
L.
Use the @Component annotation with configurationPolicy = ConfigurationPolicy.REQUIRE on the service component.
Answers
L.
Use the @Component annotation with configurationPolicy = ConfigurationPolicy.REQUIRE on the service component.
M.
Use the @Designate annotation to link the service component to the created configuration annotation interface.
Answers
M.
Use the @Designate annotation to link the service component to the created configuration annotation interface.
N.
Use the activate method of the service component class to get the configuration annotation interface class injected.
Answers
N.
Use the activate method of the service component class to get the configuration annotation interface class injected.
O.
1. For the class fields myserviceName and myserviceStringValues, add a @Property annotation each with names set to myservice.name and myservice.stringValues respectively.
Answers
O.
1. For the class fields myserviceName and myserviceStringValues, add a @Property annotation each with names set to myservice.name and myservice.stringValues respectively.
P.
Use the @Component annotation with configurationFactory = true on the service component class.
Answers
P.
Use the @Component annotation with configurationFactory = true on the service component class.
Q.
Use the @Service service component class.
Answers
Q.
Use the @Service service component class.
R.
The configuration is automatically injected into the field by the service component runtime.
Answers
R.
The configuration is automatically injected into the field by the service component runtime.
Suggested answer: C
asked 02/10/2024
Antonios Petropoulos
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first