Alex Rudyy created QPID-7495:
--------------------------------
Summary: [Java Broker] Add annotation into
ManagedObjectFactoryConstructor for condition expression to evaluate the
availability of conditionally available configured object
Key: QPID-7495
URL: https://issues.apache.org/jira/browse/QPID-7495
Project: Qpid
Issue Type: Improvement
Components: Java Broker
Reporter: Alex Rudyy
Currently ConditionallyAvailable configured object implementations declared
with annotation _ManagedObjectFactoryConstructor#conditionallyAvailable_ are
required to have static method _isAvaialble()_ on configured object
implementation class. If implementation class have compile time dependencies
to external classes which might not be present on classpath, the loading of
class for such implementation fails with ClassDefNotFoundError when calling
static method Impl#isAvailable() from factory. Thus, in order to have working
Impl#isAvailable(), the implementation should not be linked with classes which
might not be available when call to check is made.
Alternatively, we can implement a condition expression in
_ManagedObjectFactoryConstructor_ which can be evaluated as part of
_ConditionallyAvailable#isAvaialble()_ call. That would allow to relax the
requirements to implementation class dependencies by having a separate class
with static method for availability evaluation which will not have issues with
class loading due to not being linked with not available classes
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]