summaryrefslogtreecommitdiff
path: root/qpid/java
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2014-04-28 02:25:27 +0000
committerRobert Godfrey <rgodfrey@apache.org>2014-04-28 02:25:27 +0000
commite93df1d676c748f942daaf5fb0c4d4dd4ea867a2 (patch)
tree334bdee0947d54ee5e9f366331e222db2e749d38 /qpid/java
parent206d461b36995e741ca5a1edcdb2b28f8835832a (diff)
downloadqpid-python-e93df1d676c748f942daaf5fb0c4d4dd4ea867a2.tar.gz
QPID-5726 : [Java Broker] Use annotation processing to generate object factories and service definitions
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1590547 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
-rw-r--r--qpid/java/bdbstore/build.xml2
-rw-r--r--qpid/java/bdbstore/pom.xml7
-rw-r--r--qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java2
-rw-r--r--qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java45
-rw-r--r--qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java2
-rw-r--r--qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeFactory.java44
-rw-r--r--qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java20
-rw-r--r--qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeFactory.java44
-rw-r--r--qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java7
-rw-r--r--qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory21
-rw-r--r--qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory19
-rw-r--r--qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java7
-rw-r--r--qpid/java/broker-codegen/build.xml28
-rw-r--r--qpid/java/broker-codegen/pom.xml48
-rw-r--r--qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/License.java43
-rw-r--r--qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryGenerator.java169
-rw-r--r--qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ManagedObjectFactory.java (renamed from qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreFactory.java)23
-rw-r--r--qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ManagedObjectFactoryConstructor.java (renamed from qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortFactory.java)23
-rw-r--r--qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/plugin/PluggableProcessor.java209
-rw-r--r--qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/plugin/PluggableService.java (renamed from qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreFactory.java)24
-rw-r--r--qpid/java/broker-codegen/src/main/resources/META-INF/services/javax.annotation.processing.Processor (renamed from qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory)3
-rw-r--r--qpid/java/broker-core/build.xml2
-rw-r--r--qpid/java/broker-core/pom.xml7
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/JsonConfigurationStoreFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/MemoryConfigurationStoreFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeType.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeType.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeType.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeType.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/internal/InternalMessageMetaDataType.java10
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java1
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObjectTypeFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryImpl.java63
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapterFactory.java43
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderFactory.java45
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactory.java44
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java47
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java3
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortFactory.java46
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortFactory.java46
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/PortFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPort.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPortFactory.java46
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueImpl.java3
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueFactory.java48
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerFactory.java10
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/Base64MD5PasswordFileAuthenticationManagerFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/PlainPasswordFileAuthenticationManagerFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramAuthUser.java223
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManager.java201
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManagerFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1UserRecoverer.java42
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerFactory.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStoreFactory.java3
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java8
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHost.java2
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java7
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java8
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeFactory.java43
-rw-r--r--qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java7
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AuthenticationManagerFactory26
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfigurationStoreFactory20
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory49
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory19
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ExchangeType22
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType19
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PreferencesProviderFactory19
-rw-r--r--qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory19
-rw-r--r--qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactoryTest.java150
-rw-r--r--qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java4
-rw-r--r--qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java13
-rw-r--r--qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNodeFactory.java2
-rw-r--r--qpid/java/broker-plugins/access-control/build.xml2
-rw-r--r--qpid/java/broker-plugins/access-control/pom.xml7
-rw-r--r--qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java2
-rw-r--r--qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AccessControlProviderFactory19
-rw-r--r--qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory19
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/build.xml2
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml7
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java6
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java2
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java20
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java2
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java2
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter21
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType19
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator19
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/build.xml2
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml7
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java20
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java22
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java2
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java2
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java2
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java2
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter20
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType19
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator21
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/build.xml2
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml7
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java20
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java2
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java2
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java2
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter20
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType19
-rw-r--r--qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator19
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml2
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml7
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java2
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java6
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter20
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml2
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml7
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java2
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java2
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter20
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml2
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml7
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java2
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java10
-rw-r--r--qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter20
-rw-r--r--qpid/java/broker-plugins/derby-store/build.xml2
-rw-r--r--qpid/java/broker-plugins/derby-store/pom.xml7
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java2
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java7
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNodeFactory.java45
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory19
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory19
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory19
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/build.xml2
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/pom.xml7
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java2
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory19
-rw-r--r--qpid/java/broker-plugins/jdbc-store/build.xml2
-rw-r--r--qpid/java/broker-plugins/jdbc-store/pom.xml7
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java2
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java2
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeFactory.java44
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java9
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory19
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory19
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory19
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory19
-rw-r--r--qpid/java/broker-plugins/management-amqp/build.xml2
-rw-r--r--qpid/java/broker-plugins/management-amqp/pom.xml10
-rw-r--r--qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java2
-rw-r--r--qpid/java/broker-plugins/management-amqp/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.SystemNodeCreator19
-rw-r--r--qpid/java/broker-plugins/management-http/build.xml2
-rw-r--r--qpid/java/broker-plugins/management-http/pom.xml7
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java1
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java43
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory21
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory19
-rw-r--r--qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java63
-rw-r--r--qpid/java/broker-plugins/management-jmx/build.xml2
-rw-r--r--qpid/java/broker-plugins/management-jmx/pom.xml7
-rw-r--r--qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementFactory.java39
-rw-r--r--qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java2
-rw-r--r--qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory21
-rw-r--r--qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory19
-rw-r--r--qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/JMXManagementFactoryTest.java61
-rw-r--r--qpid/java/broker-plugins/memory-store/build.xml2
-rw-r--r--qpid/java/broker-plugins/memory-store/pom.xml7
-rw-r--r--qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java2
-rw-r--r--qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java7
-rw-r--r--qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNodeFactory.java44
-rw-r--r--qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory19
-rw-r--r--qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory19
-rw-r--r--qpid/java/broker-plugins/websocket/build.xml2
-rw-r--r--qpid/java/broker-plugins/websocket/pom.xml10
-rw-r--r--qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java11
-rw-r--r--qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory19
-rw-r--r--qpid/java/build.xml2
-rw-r--r--qpid/java/module.xml2
-rw-r--r--qpid/java/pom.xml1
201 files changed, 1180 insertions, 2629 deletions
diff --git a/qpid/java/bdbstore/build.xml b/qpid/java/bdbstore/build.xml
index 975176c834..d07a6eae2f 100644
--- a/qpid/java/bdbstore/build.xml
+++ b/qpid/java/bdbstore/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="bdbstore" xmlns:ivy="antlib:org.apache.ivy.ant" default="build">
- <property name="module.depends" value="common broker-core broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol" />
+ <property name="module.depends" value="common broker-core broker-codegen broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol" />
<property name="module.test.depends" value="client qpid-test-utils broker-core/tests management/common systests broker-plugins/management-jmx broker-plugins/memory-store broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol broker-plugins/amqp-msg-conv-0-8-to-0-10" />
<property name="module.genpom" value="true"/>
<property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker-core=provided -Sqpid-broker-plugins-amqp-0-8-protocol=provided -Sje=provided"/>
diff --git a/qpid/java/bdbstore/pom.xml b/qpid/java/bdbstore/pom.xml
index 8758669497..f2611e1236 100644
--- a/qpid/java/bdbstore/pom.xml
+++ b/qpid/java/bdbstore/pom.xml
@@ -38,6 +38,13 @@
<dependency>
<groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
<artifactId>qpid-broker-plugins-amqp-0-8-protocol</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
index 40781a6349..adc73c9bd9 100644
--- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
+++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHost.java
@@ -24,6 +24,7 @@ import java.util.Map;
import org.apache.qpid.server.logging.subjects.MessageStoreLogSubject;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.VirtualHostNode;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.store.MessageStore;
@@ -37,6 +38,7 @@ public class BDBHAVirtualHost extends AbstractVirtualHost<BDBHAVirtualHost>
private final BDBMessageStore _messageStore;
private MessageStoreLogSubject _messageStoreLogSubject;
+ @ManagedObjectFactoryConstructor
protected BDBHAVirtualHost(final Map<String, Object> attributes, VirtualHostNode<?> virtualHostNode)
{
super(attributes, virtualHostNode);
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java
deleted file mode 100644
index cf011d06c1..0000000000
--- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.store.berkeleydb;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHostNode;
-
-public class BDBHAVirtualHostFactory extends AbstractConfiguredObjectTypeFactory<BDBHAVirtualHost>
-{
-
- public BDBHAVirtualHostFactory()
- {
- super(BDBHAVirtualHost.class);
- }
-
- @Override
- public BDBHAVirtualHost createInstance(final Map<String, Object> attributes,
- final ConfiguredObject<?>... parents)
- {
- final VirtualHostNode<?> virtualHostNode = getParent(VirtualHostNode.class, parents);
- return new BDBHAVirtualHost(attributes, virtualHostNode);
- }
-
-}
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java
index 5c4633fe04..2d783fa181 100644
--- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java
+++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/BDBMessageStoreFactory.java
@@ -25,9 +25,11 @@ import java.util.Map;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.plugin.MessageStoreFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.store.MessageStore;
+@PluggableService
public class BDBMessageStoreFactory implements MessageStoreFactory, DurableConfigurationStoreFactory
{
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeFactory.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeFactory.java
deleted file mode 100644
index 5f988559e8..0000000000
--- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.server.virtualhostnode.berkeleydb;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class BDBHAVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<BDBHAVirtualHostNodeImpl>
-{
- public BDBHAVirtualHostNodeFactory()
- {
- super(BDBHAVirtualHostNodeImpl.class);
- }
-
- @Override
- public BDBHAVirtualHostNodeImpl createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- Broker<?> broker = getParent(Broker.class, parents);
- return new BDBHAVirtualHostNodeImpl(broker, attributes, broker.getTaskExecutor());
- }
-
-}
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java
index 55f90ebbcb..8b4948da08 100644
--- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java
+++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBHAVirtualHostNodeImpl.java
@@ -26,31 +26,31 @@ import java.util.Map;
import javax.security.auth.Subject;
+import com.sleepycat.je.rep.StateChangeEvent;
+import com.sleepycat.je.rep.StateChangeListener;
import org.apache.log4j.Logger;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
+
import org.apache.qpid.server.logging.messages.ConfigStoreMessages;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.BrokerModel;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.model.ManagedAttributeField;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.model.VirtualHostNode;
+import org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory;
import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.store.VirtualHostStoreUpgraderAndRecoverer;
import org.apache.qpid.server.store.berkeleydb.BDBHAVirtualHost;
-import org.apache.qpid.server.store.berkeleydb.BDBHAVirtualHostFactory;
import org.apache.qpid.server.store.berkeleydb.BDBMessageStore;
import org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacade;
import org.apache.qpid.server.store.berkeleydb.replication.ReplicatedEnvironmentFacadeFactory;
import org.apache.qpid.server.virtualhost.VirtualHostState;
import org.apache.qpid.server.virtualhostnode.AbstractVirtualHostNode;
-import com.sleepycat.je.rep.StateChangeEvent;
-import com.sleepycat.je.rep.StateChangeListener;
-
@ManagedObject( category = false, type = "BDB_HA" )
public class BDBHAVirtualHostNodeImpl extends AbstractVirtualHostNode<BDBHAVirtualHostNodeImpl> implements BDBHAVirtualHostNode<BDBHAVirtualHostNodeImpl>
{
@@ -89,9 +89,10 @@ public class BDBHAVirtualHostNodeImpl extends AbstractVirtualHostNode<BDBHAVirtu
@ManagedAttributeField
private Map<String, String> _replicatedEnvironmentConfiguration;
- public BDBHAVirtualHostNodeImpl(Broker<?> broker, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ @ManagedObjectFactoryConstructor
+ public BDBHAVirtualHostNodeImpl(Map<String, Object> attributes, Broker<?> broker)
{
- super(broker, attributes, taskExecutor);
+ super(broker, attributes);
}
@Override
@@ -182,8 +183,9 @@ public class BDBHAVirtualHostNodeImpl extends AbstractVirtualHostNode<BDBHAVirtu
{
if ("MASTER".equals(((ReplicatedEnvironmentFacade)getConfigurationStore().getEnvironmentFacade()).getNodeState()))
{
- BDBHAVirtualHostFactory virtualHostFactory = new BDBHAVirtualHostFactory();
- return (C) virtualHostFactory.create(getObjectFactory(), attributes,this);
+ ConfiguredObjectTypeFactory<? extends ConfiguredObject> factory =
+ getObjectFactory().getConfiguredObjectTypeFactory(VirtualHost.class.getSimpleName(), "BDB_HA");
+ return (C) factory.create(getObjectFactory(), attributes, this);
}
else
{
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeFactory.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeFactory.java
deleted file mode 100644
index 80bf9d9520..0000000000
--- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.server.virtualhostnode.berkeleydb;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class BDBVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<BDBVirtualHostNodeImpl>
-{
- public BDBVirtualHostNodeFactory()
- {
- super(BDBVirtualHostNodeImpl.class);
- }
-
- @Override
- public BDBVirtualHostNodeImpl createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- Broker<?> broker = getParent(Broker.class, parents);
- return new BDBVirtualHostNodeImpl(broker, attributes, broker.getTaskExecutor());
- }
-
-}
diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java
index 806dd49256..138c0717a2 100644
--- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java
+++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/virtualhostnode/berkeleydb/BDBVirtualHostNodeImpl.java
@@ -22,10 +22,10 @@ package org.apache.qpid.server.virtualhostnode.berkeleydb;
import java.util.Map;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ManagedAttributeField;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.store.berkeleydb.BDBMessageStoreFactory;
import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
@@ -39,9 +39,10 @@ public class BDBVirtualHostNodeImpl extends AbstractStandardVirtualHostNode<BDBV
@ManagedAttributeField
private Map<String, String> _environmentConfiguration;
- public BDBVirtualHostNodeImpl(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ @ManagedObjectFactoryConstructor
+ public BDBVirtualHostNodeImpl(Map<String, Object> attributes, Broker<?> parent)
{
- super(parent, attributes, taskExecutor);
+ super(attributes, parent);
}
@Override
diff --git a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index a8855df6b7..0000000000
--- a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.berkeleydb.BDBHAVirtualHostFactory
-org.apache.qpid.server.virtualhostnode.berkeleydb.BDBVirtualHostNodeFactory
-org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeFactory
diff --git a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
deleted file mode 100644
index a822405565..0000000000
--- a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.berkeleydb.BDBMessageStoreFactory
diff --git a/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java b/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java
index 6cb4e9ce11..d322717043 100644
--- a/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java
+++ b/qpid/java/bdbstore/src/test/java/org/apache/qpid/server/store/berkeleydb/BDBHAVirtualHostNodeTest.java
@@ -36,8 +36,10 @@ import com.sleepycat.je.rep.ReplicationConfig;
import org.apache.qpid.server.configuration.updater.TaskExecutor;
import org.apache.qpid.server.configuration.updater.TaskExecutorImpl;
import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.BrokerModel;
import org.apache.qpid.server.model.ConfigurationChangeListener;
import org.apache.qpid.server.model.ConfiguredObject;
+import org.apache.qpid.server.model.ConfiguredObjectFactory;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.model.VirtualHostNode;
@@ -45,7 +47,6 @@ import org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.util.BrokerTestHelper;
import org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNode;
-import org.apache.qpid.server.virtualhostnode.berkeleydb.BDBHAVirtualHostNodeFactory;
import org.apache.qpid.test.utils.QpidTestCase;
import org.apache.qpid.util.FileUtils;
@@ -118,7 +119,9 @@ public class BDBHAVirtualHostNodeTest extends QpidTestCase
attributes.put(BDBHAVirtualHostNode.REPLICATED_ENVIRONMENT_CONFIGURATION,
Collections.singletonMap(ReplicationConfig.REP_STREAM_TIMEOUT, repStreamTimeout));
- ConfiguredObjectTypeFactory<?> factory = new BDBHAVirtualHostNodeFactory();
+ ConfiguredObjectFactory objectFactory = BrokerModel.getInstance().getObjectFactory();
+ ConfiguredObjectTypeFactory factory = objectFactory.getConfiguredObjectTypeFactory("VirtualHostNode",
+ "BDB_HA");
BDBHAVirtualHostNode<?> node = (BDBHAVirtualHostNode<?>) factory.create(null, attributes, _broker);
diff --git a/qpid/java/broker-codegen/build.xml b/qpid/java/broker-codegen/build.xml
new file mode 100644
index 0000000000..d6be1310c3
--- /dev/null
+++ b/qpid/java/broker-codegen/build.xml
@@ -0,0 +1,28 @@
+<!--
+ -
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements. See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership. The ASF licenses this file
+ - to you under the Apache License, Version 2.0 (the
+ - "License"); you may not use this file except in compliance
+ - with the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing,
+ - software distributed under the License is distributed on an
+ - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ - KIND, either express or implied. See the License for the
+ - specific language governing permissions and limitations
+ - under the License.
+ -
+ -->
+<project name="Broker Codegen" default="build">
+ <import file="../module.xml"/>
+
+ <property name="module.genpom" value="false"/>
+
+ <target name="bundle" depends="bundle-tasks"/>
+
+</project>
diff --git a/qpid/java/broker-codegen/pom.xml b/qpid/java/broker-codegen/pom.xml
new file mode 100644
index 0000000000..1dd2802b4f
--- /dev/null
+++ b/qpid/java/broker-codegen/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-java-build</artifactId>
+ <version>0.28-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>qpid-broker-codegen</artifactId>
+ <name>Qpid Broker Code Generation</name>
+ <description>Code Generation For Broker and Plugins</description>
+
+ <dependencies>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${maven-compiler-plugin-version}</version>
+ <configuration>
+ <compilerArgument>-proc:none</compilerArgument>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/License.java b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/License.java
new file mode 100644
index 0000000000..15c01246a7
--- /dev/null
+++ b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/License.java
@@ -0,0 +1,43 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server;
+
+public interface License
+{
+ String[] LICENSE = {
+ " Licensed to the Apache Software Foundation (ASF) under one",
+ " or more contributor license agreements. See the NOTICE file",
+ " distributed with this work for additional information",
+ " regarding copyright ownership. The ASF licenses this file",
+ " to you under the Apache License, Version 2.0 (the",
+ " \"License\"); you may not use this file except in compliance",
+ " with the License. You may obtain a copy of the License at",
+ "",
+ " http://www.apache.org/licenses/LICENSE-2.0",
+ "",
+ " Unless required by applicable law or agreed to in writing,",
+ " software distributed under the License is distributed on an",
+ " \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY",
+ " KIND, either express or implied. See the License for the",
+ " specific language governing permissions and limitations",
+ " under the License."
+ };
+}
diff --git a/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryGenerator.java b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryGenerator.java
new file mode 100644
index 0000000000..658b468c3b
--- /dev/null
+++ b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryGenerator.java
@@ -0,0 +1,169 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.model;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Filer;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+import javax.tools.Diagnostic;
+import javax.tools.JavaFileObject;
+
+import org.apache.qpid.server.License;
+
+public class ConfiguredObjectFactoryGenerator extends AbstractProcessor
+{
+ @Override
+ public SourceVersion getSupportedSourceVersion()
+ {
+ return SourceVersion.latest();
+ }
+
+ @Override
+ public Set<String> getSupportedAnnotationTypes()
+ {
+ return new HashSet<>(Arrays.asList(ManagedObjectFactory.class.getName(), ManagedObjectFactoryConstructor.class.getName()));
+ }
+
+ @Override
+ public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv)
+ {
+
+ if(roundEnv.processingOver())
+ {
+
+ return true;
+ }
+
+ Filer filer = processingEnv.getFiler();
+
+ try
+ {
+
+ for (Element e : roundEnv.getElementsAnnotatedWith(ManagedObjectFactoryConstructor.class))
+ {
+ if(e.getKind() == ElementKind.CONSTRUCTOR)
+ {
+ ExecutableElement constructorElement = (ExecutableElement) e;
+ String factoryName = generateObjectFactory(filer, constructorElement);
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Error: " + e.getLocalizedMessage());
+ }
+
+ return true;
+ }
+
+ private String generateObjectFactory(final Filer filer, final ExecutableElement constructorElement)
+ {
+ TypeElement classElement = (TypeElement) constructorElement.getEnclosingElement();
+ String factoryName = classElement.getQualifiedName().toString() + "Factory";
+ String factorySimpleName = classElement.getSimpleName().toString() + "Factory";
+ String objectSimpleName = classElement.getSimpleName().toString();
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Generating factory file for " + classElement.getQualifiedName().toString());
+
+ PackageElement packageElement = (PackageElement) classElement.getEnclosingElement();
+
+ try
+ {
+ JavaFileObject factoryFile = filer.createSourceFile(factoryName);
+ PrintWriter pw = new PrintWriter(new OutputStreamWriter(factoryFile.openOutputStream(), "UTF-8"));
+ pw.println("/*");
+ for(String headerLine : License.LICENSE)
+ {
+ pw.println(" *" + headerLine);
+ }
+ pw.println(" */");
+ pw.println();
+ pw.print("package ");
+ pw.print(packageElement.getQualifiedName());
+ pw.println(";");
+ pw.println();
+
+ pw.println("import java.util.Map;");
+ pw.println();
+ pw.println("import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;");
+ pw.println("import org.apache.qpid.server.model.ConfiguredObject;");
+ pw.println("import org.apache.qpid.server.plugin.PluggableService;");
+ pw.println();
+ pw.println("@PluggableService");
+ pw.println("public final class " + factorySimpleName + " extends AbstractConfiguredObjectTypeFactory<"+ objectSimpleName +">");
+ pw.println("{");
+ pw.println(" public " + factorySimpleName + "()");
+ pw.println(" {");
+ pw.println(" super(" + objectSimpleName + ".class);");
+ pw.println(" }");
+ pw.println();
+ pw.println(" @Override");
+ pw.println(" protected "+objectSimpleName+" createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)");
+ pw.println(" {");
+ pw.print(" return new "+objectSimpleName+"(attributes");
+ boolean first = true;
+ for(VariableElement param : constructorElement.getParameters())
+ {
+ if(first)
+ {
+ first = false;
+ }
+ else
+ {
+ TypeMirror erasureType = processingEnv.getTypeUtils().erasure(param.asType());
+ pw.print(", getParent("+erasureType.toString()+".class,parents)");
+ }
+ }
+ pw.println(");");
+ pw.println(" }");
+
+ pw.println("}");
+
+ pw.close();
+ }
+ catch (IOException e)
+ {
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR,
+ "Failed to write factory file: "
+ + factoryName
+ + " - "
+ + e.getLocalizedMessage());
+ }
+
+ return factoryName;
+ }
+
+}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreFactory.java b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ManagedObjectFactory.java
index 5aff83b109..b74e25df7f 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreFactory.java
+++ b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ManagedObjectFactory.java
@@ -18,26 +18,13 @@
* under the License.
*
*/
-package org.apache.qpid.server.security;
+package org.apache.qpid.server.model;
-import java.util.Map;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
+@Retention(RetentionPolicy.SOURCE)
-public class FileKeyStoreFactory extends AbstractConfiguredObjectTypeFactory<FileKeyStoreImpl>
+public @interface ManagedObjectFactory
{
- public FileKeyStoreFactory()
- {
- super(FileKeyStoreImpl.class);
- }
-
-
- @Override
- public FileKeyStoreImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- return new FileKeyStoreImpl(attributes, getParent(Broker.class, parents));
- }
-
}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortFactory.java b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ManagedObjectFactoryConstructor.java
index d1e67c9c3f..285f96db12 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortFactory.java
+++ b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/model/ManagedObjectFactoryConstructor.java
@@ -18,26 +18,13 @@
* under the License.
*
*/
-package org.apache.qpid.server.model.port;
+package org.apache.qpid.server.model;
-import java.util.Map;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
+@Retention(RetentionPolicy.SOURCE)
-public class AmqpPortFactory extends AbstractConfiguredObjectTypeFactory<AmqpPortImpl>
+public @interface ManagedObjectFactoryConstructor
{
- public AmqpPortFactory()
- {
- super(AmqpPortImpl.class);
- }
-
- @Override
- public AmqpPortImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- Broker broker = getParent(Broker.class, parents);
- return new AmqpPortImpl(attributes, broker);
- }
-
}
diff --git a/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/plugin/PluggableProcessor.java b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/plugin/PluggableProcessor.java
new file mode 100644
index 0000000000..8cf5692dd5
--- /dev/null
+++ b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/plugin/PluggableProcessor.java
@@ -0,0 +1,209 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.plugin;
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.Filer;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.NoType;
+import javax.lang.model.type.TypeMirror;
+import javax.tools.Diagnostic;
+import javax.tools.FileObject;
+import javax.tools.StandardLocation;
+
+import org.apache.qpid.server.License;
+
+public class PluggableProcessor extends AbstractProcessor
+{
+ private Map<String, Set<String>> factoryImplementations = new HashMap<>();
+
+
+ @Override
+ public SourceVersion getSupportedSourceVersion()
+ {
+ return SourceVersion.latest();
+ }
+
+ @Override
+ public Set<String> getSupportedAnnotationTypes()
+ {
+ return Collections.singleton(PluggableService.class.getName());
+ }
+
+ @Override
+ public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv)
+ {
+ if(roundEnv.processingOver())
+ {
+ generateServiceFiles(processingEnv.getFiler());
+
+ return true;
+ }
+ try
+ {
+
+ for (Element e : roundEnv.getElementsAnnotatedWith(PluggableService.class))
+ {
+
+ if (e.getKind() == ElementKind.CLASS)
+ {
+ TypeElement classElement = (TypeElement) e;
+ Set<String> pluggableTypes = getPluggableTypes(classElement);
+ for(String pluggableType : pluggableTypes)
+ {
+ Set<String> existingFactories = factoryImplementations.get(pluggableType);
+ if(existingFactories == null)
+ {
+ existingFactories = new HashSet<>();
+ factoryImplementations.put(pluggableType, existingFactories);
+ }
+ existingFactories.add(classElement.getQualifiedName().toString());
+ }
+ }
+ }
+
+ }
+ catch (Exception e)
+ {
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Error: " + e.getLocalizedMessage());
+ }
+
+ return true;
+ }
+
+ private Set<String> getPluggableTypes(final TypeElement classElement)
+ {
+
+ final Set<String> types = new HashSet<>();
+
+ List<? extends TypeMirror> interfaces = classElement.getInterfaces();
+ for(TypeMirror typeMirror : interfaces)
+ {
+ TypeElement interfaceElt = (TypeElement) processingEnv.getTypeUtils().asElement(typeMirror);
+ if(interfaceElt.getQualifiedName().toString().equals("org.apache.qpid.server.plugin.Pluggable"))
+ {
+ types.add(classElement.getQualifiedName().toString());
+ }
+ else
+ {
+ types.addAll(getPluggableTypes(interfaceElt));
+ }
+
+ }
+ TypeMirror superClass = classElement.getSuperclass();
+ if(!(superClass instanceof NoType))
+ {
+ types.addAll(getPluggableTypes((TypeElement) processingEnv.getTypeUtils().asElement(superClass)));
+ }
+
+ return types;
+ }
+
+ private void generateServiceFiles(Filer filer)
+ {
+ for(String serviceName : factoryImplementations.keySet())
+ {
+ processingEnv.getMessager()
+ .printMessage(Diagnostic.Kind.NOTE, "Generating service file for " + serviceName);
+
+ String relativeName = "META-INF/services/" + serviceName;
+
+ try
+ {
+ FileObject serviceFile = filer.createResource(StandardLocation.CLASS_OUTPUT, "", relativeName);
+ PrintWriter pw = new PrintWriter(new OutputStreamWriter(serviceFile.openOutputStream(), "UTF-8"));
+
+ for (String headerLine : License.LICENSE)
+ {
+ pw.println("#" + headerLine);
+ }
+ pw.println("#");
+ pw.println("# Note: Parts of this file are auto-generated from annotations.");
+ pw.println("#");
+ for (String implementation : factoryImplementations.get(serviceName))
+ {
+ pw.println(implementation);
+ }
+
+ pw.close();
+ }
+ catch (IOException e)
+ {
+ processingEnv.getMessager()
+ .printMessage(Diagnostic.Kind.ERROR,
+ "Failed to write services file: "
+ + relativeName
+ + " - "
+ + e.getLocalizedMessage()
+ );
+ }
+ }
+ }
+
+ private String loadExistingServicesFile(final Filer filer, String serviceName)
+ {
+ String relativeName = "META-INF/services/" + serviceName;
+ try
+ {
+
+ FileObject existingFile = filer.getResource(StandardLocation.CLASS_OUTPUT, "", relativeName);
+ BufferedReader r = new BufferedReader(new InputStreamReader(existingFile.openInputStream(), "UTF-8"));
+ String line;
+ while((line=r.readLine())!=null)
+ {
+ if(!line.matches(" *#"))
+ {
+ factoryImplementations.get(serviceName).add(line);
+ }
+ }
+ r.close();
+ }
+ catch (FileNotFoundException e)
+ {
+ // no existing file (ignore)
+ }
+ catch (IOException e)
+ {
+ processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR,
+ "Error loading existing services file: " + relativeName
+ + " - " + e.getLocalizedMessage());
+ }
+ return relativeName;
+ }
+
+}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreFactory.java b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/plugin/PluggableService.java
index 0375cb0e3f..07799ca71a 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreFactory.java
+++ b/qpid/java/broker-codegen/src/main/java/org/apache/qpid/server/plugin/PluggableService.java
@@ -1,4 +1,4 @@
-/*
+package org.apache.qpid.server.plugin;/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -18,25 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.server.security;
-import java.util.Map;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class FileTrustStoreFactory extends AbstractConfiguredObjectTypeFactory<FileTrustStoreImpl>
+@Retention(RetentionPolicy.SOURCE)
+public @interface PluggableService
{
- public FileTrustStoreFactory()
- {
- super(FileTrustStoreImpl.class);
- }
-
- @Override
- public FileTrustStoreImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- return new FileTrustStoreImpl(attributes, getParent(Broker.class, parents));
- }
-
}
diff --git a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory b/qpid/java/broker-codegen/src/main/resources/META-INF/services/javax.annotation.processing.Processor
index a822405565..3219c441a3 100644
--- a/qpid/java/bdbstore/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
+++ b/qpid/java/broker-codegen/src/main/resources/META-INF/services/javax.annotation.processing.Processor
@@ -16,4 +16,5 @@
# specific language governing permissions and limitations
# under the License.
#
-org.apache.qpid.server.store.berkeleydb.BDBMessageStoreFactory
+org.apache.qpid.server.model.ConfiguredObjectFactoryGenerator
+org.apache.qpid.server.plugin.PluggableProcessor
diff --git a/qpid/java/broker-core/build.xml b/qpid/java/broker-core/build.xml
index c8c54a6f70..1fb18a750a 100644
--- a/qpid/java/broker-core/build.xml
+++ b/qpid/java/broker-core/build.xml
@@ -19,7 +19,7 @@
-
-->
<project name="AMQ Broker" default="build">
- <property name="module.depends" value="management/common common"/>
+ <property name="module.depends" value="management/common common broker-codegen"/>
<property name="module.test.depends" value="qpid-test-utils" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-core/pom.xml b/qpid/java/broker-core/pom.xml
index 7b9c8efece..43c7aba9f0 100644
--- a/qpid/java/broker-core/pom.xml
+++ b/qpid/java/broker-core/pom.xml
@@ -46,6 +46,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingFactory.java
index 4050f7675e..c3f37f82a5 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/binding/BindingFactory.java
@@ -27,8 +27,10 @@ import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.model.Exchange;
import org.apache.qpid.server.model.Queue;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.queue.AMQQueue;
+@PluggableService
public class BindingFactory extends AbstractConfiguredObjectTypeFactory<BindingImpl>
{
public BindingFactory()
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/JsonConfigurationStoreFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/JsonConfigurationStoreFactory.java
index 517672f74b..930fb5fa23 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/JsonConfigurationStoreFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/JsonConfigurationStoreFactory.java
@@ -26,7 +26,9 @@ import org.apache.qpid.server.configuration.ConfigurationEntryStore;
import org.apache.qpid.server.configuration.store.JsonConfigurationEntryStore;
import org.apache.qpid.server.model.SystemContext;
import org.apache.qpid.server.plugin.ConfigurationStoreFactory;
+import org.apache.qpid.server.plugin.PluggableService;
+@PluggableService
public class JsonConfigurationStoreFactory implements ConfigurationStoreFactory
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/MemoryConfigurationStoreFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/MemoryConfigurationStoreFactory.java
index 8af654084b..971e9d08db 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/MemoryConfigurationStoreFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/MemoryConfigurationStoreFactory.java
@@ -26,7 +26,9 @@ import org.apache.qpid.server.configuration.ConfigurationEntryStore;
import org.apache.qpid.server.configuration.store.MemoryConfigurationEntryStore;
import org.apache.qpid.server.model.SystemContext;
import org.apache.qpid.server.plugin.ConfigurationStoreFactory;
+import org.apache.qpid.server.plugin.PluggableService;
+@PluggableService
public class MemoryConfigurationStoreFactory implements ConfigurationStoreFactory
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java
index bcec720cea..026182f7f3 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java
@@ -40,6 +40,7 @@ import org.apache.qpid.server.filter.MessageFilter;
import org.apache.qpid.server.message.InstanceProperties;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.ExchangeType;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.BaseQueue;
@@ -137,6 +138,7 @@ public class DirectExchange extends AbstractExchange<DirectExchange>
public static final ExchangeType<DirectExchange> TYPE = new DirectExchangeType();
+ @ManagedObjectFactoryConstructor
public DirectExchange(final Map<String, Object> attributes, final VirtualHostImpl vhost)
{
super(attributes, vhost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeFactory.java
deleted file mode 100644
index 149fc36f1c..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.exchange;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class DirectExchangeFactory extends AbstractConfiguredObjectTypeFactory<DirectExchange>
-{
- public DirectExchangeFactory()
- {
- super(DirectExchange.class);
- }
-
- @Override
- public DirectExchange createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
- return new DirectExchange(attributes, (VirtualHostImpl<?, ?, ?>)virtualHost);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeType.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeType.java
index 547261f5aa..b26991a50a 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeType.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/DirectExchangeType.java
@@ -24,8 +24,10 @@ import java.util.Map;
import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.server.plugin.ExchangeType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
+@PluggableService
public class DirectExchangeType implements ExchangeType<DirectExchange>
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
index b9461df0be..cba9852d80 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
@@ -37,6 +37,7 @@ import org.apache.qpid.server.filter.MessageFilter;
import org.apache.qpid.server.message.InstanceProperties;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.ExchangeType;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.BaseQueue;
@@ -67,6 +68,7 @@ public class FanoutExchange extends AbstractExchange<FanoutExchange>
public static final ExchangeType<FanoutExchange> TYPE = new FanoutExchangeType();
+ @ManagedObjectFactoryConstructor
public FanoutExchange(final Map<String, Object> attributes, final VirtualHostImpl vhost)
{
super(attributes, vhost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeFactory.java
deleted file mode 100644
index e8fa3564ee..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.exchange;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class FanoutExchangeFactory extends AbstractConfiguredObjectTypeFactory<FanoutExchange>
-{
- public FanoutExchangeFactory()
- {
- super(FanoutExchange.class);
- }
-
- @Override
- public FanoutExchange createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
- return new FanoutExchange(attributes, (VirtualHostImpl<?, ?, ?>)virtualHost);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeType.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeType.java
index af64c74473..1c90b7925b 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeType.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/FanoutExchangeType.java
@@ -24,8 +24,10 @@ import java.util.Map;
import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.server.plugin.ExchangeType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
+@PluggableService
public class FanoutExchangeType implements ExchangeType<FanoutExchange>
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
index e2146b3111..e49d9ea632 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
@@ -35,6 +35,7 @@ import org.apache.qpid.server.filter.Filterable;
import org.apache.qpid.server.message.InstanceProperties;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.ExchangeType;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.BaseQueue;
@@ -82,6 +83,7 @@ public class HeadersExchange extends AbstractExchange<HeadersExchange>
public static final ExchangeType<HeadersExchange> TYPE = new HeadersExchangeType();
+ @ManagedObjectFactoryConstructor
public HeadersExchange(final Map<String, Object> attributes, final VirtualHostImpl vhost)
{
super(attributes, vhost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeFactory.java
deleted file mode 100644
index cbe7d9c612..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.exchange;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class HeadersExchangeFactory extends AbstractConfiguredObjectTypeFactory<HeadersExchange>
-{
- public HeadersExchangeFactory()
- {
- super(HeadersExchange.class);
- }
-
- @Override
- public HeadersExchange createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
- return new HeadersExchange(attributes, (VirtualHostImpl<?, ?, ?>)virtualHost);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeType.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeType.java
index e58628ce39..c9346f6e28 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeType.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/HeadersExchangeType.java
@@ -24,8 +24,10 @@ import java.util.Map;
import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.server.plugin.ExchangeType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
+@PluggableService
public class HeadersExchangeType implements ExchangeType<HeadersExchange>
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
index 6506bfc0a6..edc6fa7796 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
@@ -41,6 +41,7 @@ import org.apache.qpid.server.filter.Filterable;
import org.apache.qpid.server.message.InstanceProperties;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.ExchangeType;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.BaseQueue;
@@ -62,6 +63,7 @@ public class TopicExchange extends AbstractExchange<TopicExchange>
private final Map<BindingImpl, Map<String,Object>> _bindings = new HashMap<BindingImpl, Map<String,Object>>();
+ @ManagedObjectFactoryConstructor
public TopicExchange(final Map<String,Object> attributes, final VirtualHostImpl vhost)
{
super(attributes, vhost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeFactory.java
deleted file mode 100644
index ef9c850fc9..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.exchange;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class TopicExchangeFactory extends AbstractConfiguredObjectTypeFactory<TopicExchange>
-{
- public TopicExchangeFactory()
- {
- super(TopicExchange.class);
- }
-
- @Override
- public TopicExchange createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
- return new TopicExchange(attributes, (VirtualHostImpl<?, ?, ?>)virtualHost);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeType.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeType.java
index 8bf0435b02..dc2a526278 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeType.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/exchange/TopicExchangeType.java
@@ -24,8 +24,10 @@ import java.util.Map;
import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.server.plugin.ExchangeType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
+@PluggableService
public class TopicExchangeType implements ExchangeType<TopicExchange>
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/internal/InternalMessageMetaDataType.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/internal/InternalMessageMetaDataType.java
index 20e506e634..613d4d15d8 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/internal/InternalMessageMetaDataType.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/message/internal/InternalMessageMetaDataType.java
@@ -20,16 +20,18 @@
*/
package org.apache.qpid.server.message.internal;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.nio.ByteBuffer;
+
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.plugin.MessageMetaDataType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.StoredMessage;
import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
import org.apache.qpid.util.ByteBufferInputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.nio.ByteBuffer;
-
+@PluggableService
public class InternalMessageMetaDataType implements MessageMetaDataType<InternalMessageMetaData>
{
public static final int INTERNAL_ORDINAL = 999;
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
index e0ccc940c3..018b72c805 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
@@ -942,7 +942,6 @@ public abstract class AbstractConfiguredObject<X extends ConfiguredObject<X>> im
}
-
protected void deleted()
{
for (ConfiguredObject<?> parent : _parents.values())
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObjectTypeFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObjectTypeFactory.java
index f159f70d20..ec8b2d94fe 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObjectTypeFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObjectTypeFactory.java
@@ -65,7 +65,7 @@ abstract public class AbstractConfiguredObjectTypeFactory<X extends AbstractConf
{
if(!parents[0].getModel().getParentTypes((Class<? extends ConfiguredObject>) getCategoryClass()).contains(
- parentClass))
+ Model.getCategory(parentClass)))
{
throw new IllegalArgumentException(parentClass.getSimpleName() + " is not a parent of " + _clazz.getSimpleName());
}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryImpl.java
index dd5be11301..5ac25cce57 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredObjectFactoryImpl.java
@@ -44,41 +44,50 @@ public class ConfiguredObjectFactoryImpl implements ConfiguredObjectFactory
public ConfiguredObjectFactoryImpl(Model model)
{
_model = model;
-
- QpidServiceLoader<ConfiguredObjectTypeFactory> serviceLoader = new QpidServiceLoader<ConfiguredObjectTypeFactory>();
- Iterable<ConfiguredObjectTypeFactory> allFactories = serviceLoader.instancesOf(ConfiguredObjectTypeFactory.class);
- for(ConfiguredObjectTypeFactory factory : allFactories)
+ try
{
- final Class<? extends ConfiguredObject> categoryClass = factory.getCategoryClass();
- final String categoryName = categoryClass.getSimpleName();
-
- Map<String, ConfiguredObjectTypeFactory> categoryFactories = _allFactories.get(categoryName);
- if(categoryFactories == null)
+ QpidServiceLoader<ConfiguredObjectTypeFactory> serviceLoader =
+ new QpidServiceLoader<ConfiguredObjectTypeFactory>();
+ Iterable<ConfiguredObjectTypeFactory> allFactories =
+ serviceLoader.instancesOf(ConfiguredObjectTypeFactory.class);
+ for (ConfiguredObjectTypeFactory factory : allFactories)
{
- categoryFactories = new HashMap<String, ConfiguredObjectTypeFactory>();
- _allFactories.put(categoryName, categoryFactories);
- _supportedTypes.put(categoryName, new ArrayList<String>());
- ManagedObject annotation = categoryClass.getAnnotation(ManagedObject.class);
- if(annotation != null && !"".equals(annotation.defaultType()))
+ final Class<? extends ConfiguredObject> categoryClass = factory.getCategoryClass();
+ final String categoryName = categoryClass.getSimpleName();
+
+ Map<String, ConfiguredObjectTypeFactory> categoryFactories = _allFactories.get(categoryName);
+ if (categoryFactories == null)
{
- _defaultTypes.put(categoryName, annotation.defaultType());
+ categoryFactories = new HashMap<String, ConfiguredObjectTypeFactory>();
+ _allFactories.put(categoryName, categoryFactories);
+ _supportedTypes.put(categoryName, new ArrayList<String>());
+ ManagedObject annotation = categoryClass.getAnnotation(ManagedObject.class);
+ if (annotation != null && !"".equals(annotation.defaultType()))
+ {
+ _defaultTypes.put(categoryName, annotation.defaultType());
+ }
+ else
+ {
+ _defaultTypes.put(categoryName, categoryName);
+ }
+
}
- else
+ if (categoryFactories.put(factory.getType(), factory) != null)
{
- _defaultTypes.put(categoryName, categoryName);
+ throw new ServerScopedRuntimeException(
+ "Misconfiguration - there is more than one factory defined for class " + categoryName
+ + " with type " + factory.getType());
+ }
+ if (factory.getType() != null)
+ {
+ _supportedTypes.get(categoryName).add(factory.getType());
}
-
- }
- if(categoryFactories.put(factory.getType(),factory) != null)
- {
- throw new ServerScopedRuntimeException("Misconfiguration - there is more than one factory defined for class " + categoryName
- + " with type " + factory.getType());
- }
- if(factory.getType() != null)
- {
- _supportedTypes.get(categoryName).add(factory.getType());
}
}
+ catch (RuntimeException | Error e)
+ {
+ e.printStackTrace();
+ }
}
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
index 6b77833bc9..d729259236 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
@@ -100,7 +100,7 @@ public class BrokerAdapter extends AbstractConfiguredObject<BrokerAdapter> imple
@ManagedAttributeField
private boolean _statisticsReportingResetEnabled;
-
+ @ManagedObjectFactoryConstructor
public BrokerAdapter(Map<String, Object> attributes,
SystemContext parent)
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapterFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapterFactory.java
deleted file mode 100644
index 5e07a13c41..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapterFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.model.adapter;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.SystemContext;
-
-public class BrokerAdapterFactory extends AbstractConfiguredObjectTypeFactory<BrokerAdapter>
-{
- public BrokerAdapterFactory()
- {
- super(BrokerAdapter.class);
- }
-
- @Override
- public BrokerAdapter createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- SystemContext context = getParent(SystemContext.class, parents);
- return new BrokerAdapter(attributes, context);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderFactory.java
deleted file mode 100644
index 8f6d96ec79..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.model.adapter;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class FileBasedGroupProviderFactory extends AbstractConfiguredObjectTypeFactory<FileBasedGroupProviderImpl>
-{
- public FileBasedGroupProviderFactory()
- {
- super(FileBasedGroupProviderImpl.class);
- }
-
- @Override
- public FileBasedGroupProviderImpl createInstance(final Map<String, Object> attributes,
- final ConfiguredObject<?>... parents)
- {
- return new FileBasedGroupProviderImpl(attributes, getParent(Broker.class, parents));
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java
index 4a88d13070..26886c176e 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java
@@ -44,6 +44,7 @@ import org.apache.qpid.server.model.GroupMember;
import org.apache.qpid.server.model.GroupProvider;
import org.apache.qpid.server.model.IllegalStateTransitionException;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.security.access.Operation;
@@ -67,6 +68,7 @@ public class FileBasedGroupProviderImpl
@ManagedAttributeField
private String _path;
+ @ManagedObjectFactoryConstructor
public FileBasedGroupProviderImpl(Map<String, Object> attributes,
Broker broker)
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactory.java
deleted file mode 100644
index 9434adf97a..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.server.model.adapter;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.AuthenticationProvider;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class FileSystemPreferencesProviderFactory extends AbstractConfiguredObjectTypeFactory<FileSystemPreferencesProviderImpl>
-{
-
- public FileSystemPreferencesProviderFactory()
- {
- super(FileSystemPreferencesProviderImpl.class);
- }
-
- @Override
- public FileSystemPreferencesProviderImpl createInstance(final Map<String, Object> attributes,
- final ConfiguredObject<?>... parents)
- {
- return new FileSystemPreferencesProviderImpl(attributes, getParent(AuthenticationProvider.class,parents));
- }
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java
index 765fc149a0..013aa5ed98 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java
@@ -53,6 +53,7 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.model.IllegalStateTransitionException;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.util.MapValueConverter;
@@ -72,6 +73,7 @@ public class FileSystemPreferencesProviderImpl
private boolean _open;
+ @ManagedObjectFactoryConstructor
public FileSystemPreferencesProviderImpl(Map<String, Object> attributes,
AuthenticationProvider<? extends AuthenticationProvider> authenticationProvider)
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java
deleted file mode 100644
index 51f8897d67..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/StandardVirtualHostFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.model.adapter;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHostNode;
-import org.apache.qpid.server.virtualhost.StandardVirtualHost;
-
-public class StandardVirtualHostFactory extends AbstractConfiguredObjectTypeFactory<StandardVirtualHost>
-{
-
- public StandardVirtualHostFactory()
- {
- super(StandardVirtualHost.class);
- }
-
- @Override
- public StandardVirtualHost createInstance(final Map<String, Object> attributes,
- final ConfiguredObject<?>... parents)
- {
- final VirtualHostNode<?> virtualHostNode = getParent(VirtualHostNode.class, parents);
- return new StandardVirtualHost(attributes, virtualHostNode);
- }
-
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java
index 3952ea3871..eaa3d6d6ed 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java
@@ -38,10 +38,10 @@ import org.apache.qpid.server.logging.messages.BrokerMessages;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.KeyStore;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Transport;
import org.apache.qpid.server.model.TrustStore;
-import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.QpidServiceLoader;
import org.apache.qpid.server.plugin.TransportProviderFactory;
import org.apache.qpid.server.transport.AcceptingTransport;
@@ -67,6 +67,7 @@ public class AmqpPortImpl extends AbstractPortWithAuthProvider<AmqpPortImpl> imp
private final Broker<?> _broker;
private AcceptingTransport _transport;
+ @ManagedObjectFactoryConstructor
public AmqpPortImpl(Map<String, Object> attributes, Broker<?> broker)
{
super(attributes, broker);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortFactory.java
deleted file mode 100644
index 0cfd37ffa0..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.model.port;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.Port;
-
-public class HttpPortFactory extends AbstractConfiguredObjectTypeFactory<HttpPortImpl>
-{
- public HttpPortFactory()
- {
- super(HttpPortImpl.class);
- }
-
- @Override
- public HttpPortImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- Broker broker = getParent(Broker.class, parents);
- return new HttpPortImpl(attributes, broker);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortImpl.java
index 47185659a7..a52b22a62c 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPortImpl.java
@@ -25,10 +25,12 @@ import java.util.Map;
import java.util.Set;
import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.Protocol;
public class HttpPortImpl extends AbstractPortWithAuthProvider<HttpPortImpl> implements HttpPort<HttpPortImpl>
{
+ @ManagedObjectFactoryConstructor
public HttpPortImpl(final Map<String, Object> attributes,
final Broker<?> broker)
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortFactory.java
deleted file mode 100644
index bb1b94f57d..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.model.port;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.Port;
-
-public class JmxPortFactory extends AbstractConfiguredObjectTypeFactory<JmxPortImpl>
-{
- public JmxPortFactory()
- {
- super(JmxPortImpl.class);
- }
-
- @Override
- public JmxPortImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- Broker broker = getParent(Broker.class, parents);
- return new JmxPortImpl(attributes, broker);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortImpl.java
index f908b1818e..a71298e0e1 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPortImpl.java
@@ -25,10 +25,12 @@ import java.util.Map;
import java.util.Set;
import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.Protocol;
public class JmxPortImpl extends AbstractPortWithAuthProvider<JmxPortImpl> implements JmxPort<JmxPortImpl>
{
+ @ManagedObjectFactoryConstructor
public JmxPortImpl(final Map<String, Object> attributes,
final Broker<?> broker)
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/PortFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/PortFactory.java
index 122421347e..99ec4b79cb 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/PortFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/PortFactory.java
@@ -31,10 +31,12 @@ import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Protocol.ProtocolType;
import org.apache.qpid.server.model.Transport;
import org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.ConfiguredObjectRecord;
import org.apache.qpid.server.store.UnresolvedConfiguredObject;
import org.apache.qpid.server.util.MapValueConverter;
+@PluggableService
public class PortFactory<X extends Port<X>> implements ConfiguredObjectTypeFactory<X>
{
public static final int DEFAULT_AMQP_SEND_BUFFER_SIZE = 262144;
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPort.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPort.java
index 69a61b3c12..b6beedd05d 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPort.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPort.java
@@ -27,12 +27,14 @@ import java.util.Set;
import org.apache.qpid.server.configuration.IllegalConfigurationException;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Transport;
@ManagedObject( category = false, type = "RMI")
public class RmiPort extends AbstractPort<RmiPort>
{
+ @ManagedObjectFactoryConstructor
public RmiPort(final Map<String, Object> attributes,
final Broker<?> broker)
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPortFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPortFactory.java
deleted file mode 100644
index f234ea3ba7..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPortFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.model.port;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.Port;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-public class RmiPortFactory extends AbstractConfiguredObjectTypeFactory<RmiPort>
-{
- public RmiPortFactory()
- {
- super(RmiPort.class);
- }
-
- @Override
- public RmiPort createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- Broker broker = getParent(Broker.class, parents);
- return new RmiPort(attributes, broker);
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueFactory.java
deleted file mode 100644
index ee2edf7961..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.queue;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class LastValueQueueFactory extends AbstractConfiguredObjectTypeFactory<LastValueQueueImpl>
-{
- public LastValueQueueFactory()
- {
- super(LastValueQueueImpl.class);
- }
-
- @Override
- protected LastValueQueueImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
-
- return new LastValueQueueImpl(attributes, (VirtualHostImpl<?,?,?>)virtualHost);
- }
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueImpl.java
index b1dff03329..4eef4bc6c8 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/LastValueQueueImpl.java
@@ -24,6 +24,7 @@ package org.apache.qpid.server.queue;
import java.util.Map;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
public class LastValueQueueImpl extends AbstractQueue<LastValueQueueImpl> implements LastValueQueue<LastValueQueueImpl>
@@ -33,7 +34,7 @@ public class LastValueQueueImpl extends AbstractQueue<LastValueQueueImpl> implem
@ManagedAttributeField
private String _lvqKey;
-
+ @ManagedObjectFactoryConstructor
public LastValueQueueImpl(Map<String, Object> attributes, VirtualHostImpl virtualHost)
{
super(attributes, virtualHost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueFactory.java
deleted file mode 100644
index d35ad2b0fe..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.queue;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class PriorityQueueFactory extends AbstractConfiguredObjectTypeFactory<PriorityQueueImpl>
-{
- public PriorityQueueFactory()
- {
- super(PriorityQueueImpl.class);
- }
-
- @Override
- protected PriorityQueueImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
-
- return new PriorityQueueImpl(attributes, (VirtualHostImpl<?,?,?>)virtualHost);
- }
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueImpl.java
index b06e196095..eb87748302 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/PriorityQueueImpl.java
@@ -26,6 +26,7 @@ import org.apache.qpid.server.logging.LogMessage;
import org.apache.qpid.server.logging.messages.QueueMessages;
import org.apache.qpid.server.model.LifetimePolicy;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
public class PriorityQueueImpl extends OutOfOrderQueue<PriorityQueueImpl> implements PriorityQueue<PriorityQueueImpl>
@@ -36,6 +37,7 @@ public class PriorityQueueImpl extends OutOfOrderQueue<PriorityQueueImpl> implem
@ManagedAttributeField
private int _priorities;
+ @ManagedObjectFactoryConstructor
public PriorityQueueImpl(Map<String, Object> attributes, VirtualHostImpl virtualHost)
{
super(attributes, virtualHost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueFactory.java
index d8575b17c0..19265ef453 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueFactory.java
@@ -27,9 +27,11 @@ import org.apache.qpid.server.model.ConfiguredObjectFactory;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Queue;
import org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.ConfiguredObjectRecord;
import org.apache.qpid.server.store.UnresolvedConfiguredObject;
+@PluggableService
public class QueueFactory<X extends Queue<X>> implements ConfiguredObjectTypeFactory<X>
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueFactory.java
deleted file mode 100644
index e584e7d8dd..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.queue;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class SortedQueueFactory extends AbstractConfiguredObjectTypeFactory<SortedQueueImpl>
-{
- public SortedQueueFactory()
- {
- super(SortedQueueImpl.class);
- }
-
- @Override
- protected SortedQueueImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
-
- return new SortedQueueImpl(attributes, (VirtualHostImpl<?,?,?>)virtualHost);
- }
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueImpl.java
index f04b3acfe3..1d61e6fc22 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/SortedQueueImpl.java
@@ -24,6 +24,7 @@ import java.util.Map;
import org.apache.qpid.server.message.MessageInstance;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.util.Action;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
@@ -38,6 +39,7 @@ public class SortedQueueImpl extends OutOfOrderQueue<SortedQueueImpl> implements
private String _sortKey;
private SortedQueueEntryList _entries;
+ @ManagedObjectFactoryConstructor
public SortedQueueImpl(Map<String, Object> attributes, VirtualHostImpl virtualHost)
{
super(attributes, virtualHost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueFactory.java
deleted file mode 100644
index b0a4e2a96e..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.queue;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-
-public class StandardQueueFactory extends AbstractConfiguredObjectTypeFactory<StandardQueueImpl>
-{
- public StandardQueueFactory()
- {
- super(StandardQueueImpl.class);
- }
-
- @Override
- protected StandardQueueImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- VirtualHost<?,?,?> virtualHost = getParent(VirtualHost.class, parents);
- if (!(virtualHost instanceof VirtualHostImpl))
- {
- throw new IllegalArgumentException("Unexpected virtual host is set as a parent. Expected instance of " + VirtualHostImpl.class.getName());
- }
-
- return new StandardQueueImpl(attributes, (VirtualHostImpl<?,?,?>)virtualHost);
- }
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueImpl.java
index 22390dde5f..6175cf3617 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/StandardQueueImpl.java
@@ -22,12 +22,14 @@ package org.apache.qpid.server.queue;
import java.util.Map;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
public class StandardQueueImpl extends AbstractQueue<StandardQueueImpl> implements StandardQueue<StandardQueueImpl>
{
private StandardQueueEntryList _entries;
+ @ManagedObjectFactoryConstructor
public StandardQueueImpl(final Map<String, Object> arguments, final VirtualHostImpl virtualHost)
{
super(arguments, virtualHost);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java
index ac5e334402..adfce94dc8 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java
@@ -45,6 +45,7 @@ import org.apache.qpid.server.model.IntegrityViolationException;
import org.apache.qpid.server.model.KeyStore;
import org.apache.qpid.server.model.ManagedAttributeField;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.security.access.Operation;
@@ -82,6 +83,7 @@ public class FileKeyStoreImpl extends AbstractConfiguredObject<FileKeyStoreImpl>
private Broker<?> _broker;
+ @ManagedObjectFactoryConstructor
public FileKeyStoreImpl(Map<String, Object> attributes, Broker<?> broker)
{
super(parentsMap(broker), attributes);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java
index aad09ca21e..08fccda4e8 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java
@@ -41,6 +41,7 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.model.IntegrityViolationException;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.model.TrustStore;
@@ -66,6 +67,7 @@ public class FileTrustStoreImpl extends AbstractConfiguredObject<FileTrustStoreI
private Broker<?> _broker;
+ @ManagedObjectFactoryConstructor
public FileTrustStoreImpl(Map<String, Object> attributes, Broker<?> broker)
{
super(parentsMap(broker), attributes);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerFactory.java
index 4c3324f038..7f37c4e39f 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AnonymousAuthenticationManagerFactory.java
@@ -19,16 +19,18 @@
*/
package org.apache.qpid.server.security.auth.manager;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
+import org.apache.qpid.server.plugin.PluggableService;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
+@PluggableService
public class AnonymousAuthenticationManagerFactory extends AbstractConfiguredObjectTypeFactory<AnonymousAuthenticationManager> implements AuthenticationManagerFactory<AnonymousAuthenticationManager>
{
public static final String PROVIDER_TYPE = "Anonymous";
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/Base64MD5PasswordFileAuthenticationManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/Base64MD5PasswordFileAuthenticationManagerFactory.java
index 18b2b00a6d..2fb9fd4ac3 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/Base64MD5PasswordFileAuthenticationManagerFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/Base64MD5PasswordFileAuthenticationManagerFactory.java
@@ -32,11 +32,13 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.model.ConfiguredObjectFactory;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.ConfiguredObjectRecord;
import org.apache.qpid.server.store.ResolvedObject;
import org.apache.qpid.server.store.UnresolvedConfiguredObject;
import org.apache.qpid.server.util.ResourceBundleLoader;
+@PluggableService
public class Base64MD5PasswordFileAuthenticationManagerFactory
extends AbstractConfiguredObjectTypeFactory<Base64MD5PasswordDatabaseAuthenticationManager>
implements AuthenticationManagerFactory<Base64MD5PasswordDatabaseAuthenticationManager>
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerFactory.java
index 327243fc71..967dbedc36 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ExternalAuthenticationManagerFactory.java
@@ -29,8 +29,10 @@ import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.util.ResourceBundleLoader;
+@PluggableService
public class ExternalAuthenticationManagerFactory extends AbstractConfiguredObjectTypeFactory<ExternalAuthenticationManagerImpl>
implements AuthenticationManagerFactory<ExternalAuthenticationManagerImpl>
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerFactory.java
index f8c2ac043e..36c389bbdd 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/KerberosAuthenticationManagerFactory.java
@@ -28,7 +28,9 @@ import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
+import org.apache.qpid.server.plugin.PluggableService;
+@PluggableService
public class KerberosAuthenticationManagerFactory
extends AbstractConfiguredObjectTypeFactory<KerberosAuthenticationManager>
implements AuthenticationManagerFactory<KerberosAuthenticationManager>
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/PlainPasswordFileAuthenticationManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/PlainPasswordFileAuthenticationManagerFactory.java
index 13755e52fc..5fa054a363 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/PlainPasswordFileAuthenticationManagerFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/PlainPasswordFileAuthenticationManagerFactory.java
@@ -32,11 +32,13 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.model.ConfiguredObjectFactory;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.ConfiguredObjectRecord;
import org.apache.qpid.server.store.ResolvedObject;
import org.apache.qpid.server.store.UnresolvedConfiguredObject;
import org.apache.qpid.server.util.ResourceBundleLoader;
+@PluggableService
public class PlainPasswordFileAuthenticationManagerFactory
extends AbstractConfiguredObjectTypeFactory<PlainPasswordDatabaseAuthenticationManager>
implements AuthenticationManagerFactory<PlainPasswordDatabaseAuthenticationManager>
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramAuthUser.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramAuthUser.java
new file mode 100644
index 0000000000..e9d4e00254
--- /dev/null
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramAuthUser.java
@@ -0,0 +1,223 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.security.auth.manager;
+
+import java.security.AccessControlException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.security.sasl.SaslException;
+
+import org.apache.qpid.server.configuration.updater.VoidTask;
+import org.apache.qpid.server.model.AbstractConfiguredObject;
+import org.apache.qpid.server.model.ConfiguredObject;
+import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
+import org.apache.qpid.server.model.PreferencesProvider;
+import org.apache.qpid.server.model.State;
+import org.apache.qpid.server.model.User;
+import org.apache.qpid.server.security.access.Operation;
+
+@ManagedObject( category = false, type = "scram")
+class ScramAuthUser extends AbstractConfiguredObject<ScramAuthUser> implements User<ScramAuthUser>
+{
+
+ private ScramSHA1AuthenticationManager _authenticationManager;
+ @ManagedAttributeField
+ private String _password;
+
+ @ManagedObjectFactoryConstructor
+ ScramAuthUser(final Map<String, Object> attributes, ScramSHA1AuthenticationManager parent)
+ {
+ super(parentsMap(parent), attributes);
+ _authenticationManager = parent;
+ if(!ScramSHA1AuthenticationManager.ASCII.newEncoder().canEncode(getName()))
+ {
+ throw new IllegalArgumentException("Scram SHA1 user names are restricted to characters in the ASCII charset");
+ }
+
+ }
+
+ @Override
+ protected void onOpen()
+ {
+ super.onOpen();
+ _authenticationManager.getUserMap().put(getName(), this);
+ }
+
+ @Override
+ public void validate()
+ {
+ super.validate();
+ if(!isDurable())
+ {
+ throw new IllegalArgumentException(getClass().getSimpleName() + " must be durable");
+ }
+ }
+
+ @Override
+ protected void validateChange(final ConfiguredObject<?> proxyForValidation, final Set<String> changedAttributes)
+ {
+ super.validateChange(proxyForValidation, changedAttributes);
+ if(changedAttributes.contains(DURABLE) && !proxyForValidation.isDurable())
+ {
+ throw new IllegalArgumentException(getClass().getSimpleName() + " must be durable");
+ }
+ }
+ @Override
+ protected boolean setState(final State currentState, final State desiredState)
+ {
+ if(desiredState == State.DELETED)
+ {
+ _authenticationManager.getSecurityManager().authoriseUserOperation(Operation.DELETE, getName());
+ _authenticationManager.getUserMap().remove(getName());
+ _authenticationManager.doDeleted();
+ deleted();
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ @Override
+ public void setAttributes(final Map<String, Object> attributes)
+ throws IllegalStateException, AccessControlException, IllegalArgumentException
+ {
+ runTask(new VoidTask()
+ {
+
+ @Override
+ public void execute()
+ {
+ Map<String, Object> modifiedAttributes = new HashMap<String, Object>(attributes);
+ final String newPassword = (String) attributes.get(User.PASSWORD);
+ if (attributes.containsKey(User.PASSWORD)
+ && !newPassword.equals(getActualAttributes().get(User.PASSWORD)))
+ {
+ try
+ {
+ modifiedAttributes.put(User.PASSWORD,
+ _authenticationManager.createStoredPassword(newPassword));
+ }
+ catch (SaslException e)
+ {
+ throw new IllegalArgumentException(e);
+ }
+ }
+ ScramAuthUser.super.setAttributes(modifiedAttributes);
+ }
+ });
+
+
+ }
+
+ @Override
+ public Object getAttribute(final String name)
+ {
+ return super.getAttribute(name);
+ }
+
+ @Override
+ public String getPassword()
+ {
+ return _password;
+ }
+
+ @Override
+ public void setPassword(final String password)
+ {
+ _authenticationManager.getSecurityManager().authoriseUserOperation(Operation.UPDATE, getName());
+
+ try
+ {
+ changeAttribute(User.PASSWORD, getAttribute(User.PASSWORD), _authenticationManager.createStoredPassword(
+ password));
+ }
+ catch (SaslException e)
+ {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ @Override
+ public State getState()
+ {
+ return State.ACTIVE;
+ }
+
+ @Override
+ public <C extends ConfiguredObject> Collection<C> getChildren(final Class<C> clazz)
+ {
+ return Collections.emptySet();
+ }
+
+ @Override
+ public Map<String, Object> getPreferences()
+ {
+ PreferencesProvider preferencesProvider = _authenticationManager.getPreferencesProvider();
+ if (preferencesProvider == null)
+ {
+ return null;
+ }
+ return preferencesProvider.getPreferences(this.getName());
+ }
+
+ @Override
+ public Object getPreference(String name)
+ {
+ Map<String, Object> preferences = getPreferences();
+ if (preferences == null)
+ {
+ return null;
+ }
+ return preferences.get(name);
+ }
+
+ @Override
+ public Map<String, Object> setPreferences(Map<String, Object> preferences)
+ {
+ PreferencesProvider preferencesProvider = _authenticationManager.getPreferencesProvider();
+ if (preferencesProvider == null)
+ {
+ return null;
+ }
+ return preferencesProvider.setPreferences(this.getName(), preferences);
+ }
+
+ @Override
+ public boolean deletePreferences()
+ {
+ PreferencesProvider preferencesProvider = _authenticationManager.getPreferencesProvider();
+ if (preferencesProvider == null)
+ {
+ return false;
+ }
+ String[] deleted = preferencesProvider.deletePreferences(this.getName());
+ return deleted.length == 1;
+ }
+
+}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManager.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManager.java
index 00091490c5..22e34edab1 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManager.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManager.java
@@ -22,17 +22,14 @@ package org.apache.qpid.server.security.auth.manager;
import java.io.IOException;
import java.nio.charset.Charset;
-import java.security.AccessControlException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.Principal;
import java.security.SecureRandom;
import java.util.Arrays;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
@@ -44,15 +41,11 @@ import javax.security.sasl.SaslServer;
import javax.xml.bind.DatatypeConverter;
import org.apache.qpid.server.configuration.updater.Task;
-import org.apache.qpid.server.configuration.updater.VoidTask;
import org.apache.qpid.server.configuration.updater.VoidTaskWithException;
-import org.apache.qpid.server.model.AbstractConfiguredObject;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.ManagedAttributeField;
import org.apache.qpid.server.model.ManagedObject;
import org.apache.qpid.server.model.PasswordCredentialManagingAuthenticationProvider;
-import org.apache.qpid.server.model.PreferencesProvider;
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.model.User;
import org.apache.qpid.server.security.SecurityManager;
@@ -67,7 +60,7 @@ public class ScramSHA1AuthenticationManager
implements PasswordCredentialManagingAuthenticationProvider<ScramSHA1AuthenticationManager>
{
public static final String SCRAM_USER_TYPE = "scram";
- private static final Charset ASCII = Charset.forName("ASCII");
+ static final Charset ASCII = Charset.forName("ASCII");
public static final String HMAC_SHA_1 = "HmacSHA1";
private final SecureRandom _random = new SecureRandom();
private int _iterationCount = 4096;
@@ -283,7 +276,7 @@ public class ScramSHA1AuthenticationManager
});
}
- private SecurityManager getSecurityManager()
+ SecurityManager getSecurityManager()
{
return getBroker().getSecurityManager();
}
@@ -357,187 +350,6 @@ public class ScramSHA1AuthenticationManager
}
- @ManagedObject( category = false, type = "scram")
- static class ScramAuthUser extends AbstractConfiguredObject<ScramAuthUser> implements User<ScramAuthUser>
- {
-
- private ScramSHA1AuthenticationManager _authenticationManager;
- @ManagedAttributeField
- private String _password;
-
- protected ScramAuthUser(final Map<String, Object> attributes, ScramSHA1AuthenticationManager parent)
- {
- super(parentsMap(parent), attributes);
- _authenticationManager = parent;
- if(!ASCII.newEncoder().canEncode(getName()))
- {
- throw new IllegalArgumentException("Scram SHA1 user names are restricted to characters in the ASCII charset");
- }
-
- }
-
- @Override
- protected void onOpen()
- {
- super.onOpen();
- _authenticationManager._users.put(getName(), this);
- }
-
- @Override
- public void validate()
- {
- super.validate();
- if(!isDurable())
- {
- throw new IllegalArgumentException(getClass().getSimpleName() + " must be durable");
- }
- }
-
- @Override
- protected void validateChange(final ConfiguredObject<?> proxyForValidation, final Set<String> changedAttributes)
- {
- super.validateChange(proxyForValidation, changedAttributes);
- if(changedAttributes.contains(DURABLE) && !proxyForValidation.isDurable())
- {
- throw new IllegalArgumentException(getClass().getSimpleName() + " must be durable");
- }
- }
- @Override
- protected boolean setState(final State currentState, final State desiredState)
- {
- if(desiredState == State.DELETED)
- {
- _authenticationManager.getSecurityManager().authoriseUserOperation(Operation.DELETE, getName());
- _authenticationManager._users.remove(getName());
- _authenticationManager.deleted();
- deleted();
- return true;
- }
- else
- {
- return false;
- }
- }
-
- @Override
- public void setAttributes(final Map<String, Object> attributes)
- throws IllegalStateException, AccessControlException, IllegalArgumentException
- {
- runTask(new VoidTask()
- {
-
- @Override
- public void execute()
- {
- Map<String, Object> modifiedAttributes = new HashMap<String, Object>(attributes);
- final String newPassword = (String) attributes.get(User.PASSWORD);
- if (attributes.containsKey(User.PASSWORD)
- && !newPassword.equals(getActualAttributes().get(User.PASSWORD)))
- {
- try
- {
- modifiedAttributes.put(User.PASSWORD,
- _authenticationManager.createStoredPassword(newPassword));
- }
- catch (SaslException e)
- {
- throw new IllegalArgumentException(e);
- }
- }
- ScramSHA1AuthenticationManager.ScramAuthUser.super.setAttributes(modifiedAttributes);
- }
- });
-
-
- }
-
- @Override
- public Object getAttribute(final String name)
- {
- return super.getAttribute(name);
- }
-
- @Override
- public String getPassword()
- {
- return _password;
- }
-
- @Override
- public void setPassword(final String password)
- {
- _authenticationManager.getSecurityManager().authoriseUserOperation(Operation.UPDATE, getName());
-
- try
- {
- changeAttribute(User.PASSWORD, getAttribute(User.PASSWORD), _authenticationManager.createStoredPassword(
- password));
- }
- catch (SaslException e)
- {
- throw new IllegalArgumentException(e);
- }
- }
-
- @Override
- public State getState()
- {
- return State.ACTIVE;
- }
-
- @Override
- public <C extends ConfiguredObject> Collection<C> getChildren(final Class<C> clazz)
- {
- return Collections.emptySet();
- }
-
- @Override
- public Map<String, Object> getPreferences()
- {
- PreferencesProvider preferencesProvider = _authenticationManager.getPreferencesProvider();
- if (preferencesProvider == null)
- {
- return null;
- }
- return preferencesProvider.getPreferences(this.getName());
- }
-
- @Override
- public Object getPreference(String name)
- {
- Map<String, Object> preferences = getPreferences();
- if (preferences == null)
- {
- return null;
- }
- return preferences.get(name);
- }
-
- @Override
- public Map<String, Object> setPreferences(Map<String, Object> preferences)
- {
- PreferencesProvider preferencesProvider = _authenticationManager.getPreferencesProvider();
- if (preferencesProvider == null)
- {
- return null;
- }
- return preferencesProvider.setPreferences(this.getName(), preferences);
- }
-
- @Override
- public boolean deletePreferences()
- {
- PreferencesProvider preferencesProvider = _authenticationManager.getPreferencesProvider();
- if (preferencesProvider == null)
- {
- return false;
- }
- String[] deleted = preferencesProvider.deletePreferences(this.getName());
- return deleted.length == 1;
- }
-
- }
-
@Override
public void recoverUser(final User user)
{
@@ -577,4 +389,13 @@ public class ScramSHA1AuthenticationManager
return super.addChild(childClass, attributes, otherParents);
}
+ void doDeleted()
+ {
+ deleted();
+ }
+
+ Map<String, ScramAuthUser> getUserMap()
+ {
+ return _users;
+ }
}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManagerFactory.java
index e4096f6055..30c97dfead 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManagerFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1AuthenticationManagerFactory.java
@@ -29,7 +29,9 @@ import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
+import org.apache.qpid.server.plugin.PluggableService;
+@PluggableService
public class ScramSHA1AuthenticationManagerFactory
extends AbstractConfiguredObjectTypeFactory<ScramSHA1AuthenticationManager>
implements AuthenticationManagerFactory<ScramSHA1AuthenticationManager>
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1UserRecoverer.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1UserRecoverer.java
deleted file mode 100644
index b5e369269c..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/ScramSHA1UserRecoverer.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.security.auth.manager;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.AuthenticationProvider;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-import java.util.Map;
-
-public class ScramSHA1UserRecoverer extends AbstractConfiguredObjectTypeFactory<ScramSHA1AuthenticationManager.ScramAuthUser>
-{
- public ScramSHA1UserRecoverer()
- {
- super(ScramSHA1AuthenticationManager.ScramAuthUser.class);
- }
-
- @Override
- public ScramSHA1AuthenticationManager.ScramAuthUser createInstance(final Map<String, Object> attributes,
- final ConfiguredObject<?>... parents)
- {
- return new ScramSHA1AuthenticationManager.ScramAuthUser(attributes, (ScramSHA1AuthenticationManager)getParent(AuthenticationProvider.class, parents));
- }
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerFactory.java
index 7dfa128a37..cce7864e26 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/SimpleLDAPAuthenticationManagerFactory.java
@@ -29,8 +29,10 @@ import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.util.ResourceBundleLoader;
+@PluggableService
public class SimpleLDAPAuthenticationManagerFactory
extends AbstractConfiguredObjectTypeFactory<SimpleLDAPAuthenticationManagerImpl>
implements AuthenticationManagerFactory<SimpleLDAPAuthenticationManagerImpl>
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStoreFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStoreFactory.java
index b69bd6f45f..ea1f41d7ab 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStoreFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/JsonFileConfigStoreFactory.java
@@ -22,9 +22,10 @@ package org.apache.qpid.server.store;
import java.util.Map;
-import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
+import org.apache.qpid.server.plugin.PluggableService;
+@PluggableService
public class JsonFileConfigStoreFactory implements DurableConfigurationStoreFactory
{
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java
index 9b61d1d037..f255e265a6 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/transport/TCPandSSLTransportProviderFactory.java
@@ -20,14 +20,16 @@
*/
package org.apache.qpid.server.transport;
-import org.apache.qpid.server.model.Transport;
-import org.apache.qpid.server.plugin.TransportProviderFactory;
-
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.PluggableService;
+import org.apache.qpid.server.plugin.TransportProviderFactory;
+
+@PluggableService
public class TCPandSSLTransportProviderFactory implements TransportProviderFactory
{
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHost.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHost.java
index 645ee7ceef..2568d7be97 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHost.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/StandardVirtualHost.java
@@ -25,6 +25,7 @@ import java.util.Map;
import org.apache.qpid.server.logging.subjects.MessageStoreLogSubject;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.VirtualHostNode;
import org.apache.qpid.server.plugin.MessageStoreFactory;
import org.apache.qpid.server.store.MessageStore;
@@ -38,6 +39,7 @@ public class StandardVirtualHost extends AbstractVirtualHost<StandardVirtualHost
private MessageStoreLogSubject _messageStoreLogSubject;
+ @ManagedObjectFactoryConstructor
public StandardVirtualHost(final Map<String, Object> attributes, VirtualHostNode<?> virtualHostNode)
{
super(attributes, virtualHostNode);
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java
index 87470fb3cf..72c619ec1c 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNode.java
@@ -28,7 +28,7 @@ import java.util.Map;
import javax.security.auth.Subject;
import org.apache.log4j.Logger;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
+
import org.apache.qpid.server.logging.messages.ConfigStoreMessages;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.BrokerModel;
@@ -48,9 +48,10 @@ public abstract class AbstractStandardVirtualHostNode<X extends AbstractStandard
{
private static final Logger LOGGER = Logger.getLogger(AbstractStandardVirtualHostNode.class);
- public AbstractStandardVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ public AbstractStandardVirtualHostNode(Map<String, Object> attributes,
+ Broker<?> parent)
{
- super(parent, attributes, taskExecutor);
+ super(parent, attributes);
}
@Override
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java
index 1db15003ed..0a67169e4b 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/AbstractVirtualHostNode.java
@@ -32,7 +32,7 @@ import java.util.concurrent.atomic.AtomicReference;
import javax.security.auth.Subject;
import org.apache.log4j.Logger;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
+
import org.apache.qpid.server.logging.EventLogger;
import org.apache.qpid.server.logging.messages.ConfigStoreMessages;
import org.apache.qpid.server.logging.subjects.MessageStoreLogSubject;
@@ -66,10 +66,10 @@ public abstract class AbstractVirtualHostNode<X extends AbstractVirtualHostNode<
@ManagedAttributeField
private boolean _messageStoreProvider;
- public AbstractVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ public AbstractVirtualHostNode(Broker<?> parent, Map<String, Object> attributes)
{
super(Collections.<Class<? extends ConfiguredObject>,ConfiguredObject<?>>singletonMap(Broker.class, parent),
- attributes, taskExecutor);
+ attributes);
_broker = parent;
SystemContext<?> systemContext = _broker.getParent(SystemContext.class);
_eventLogger = systemContext.getEventLogger();
@@ -286,4 +286,4 @@ public abstract class AbstractVirtualHostNode<X extends AbstractVirtualHostNode<
protected abstract void activate();
-} \ No newline at end of file
+}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeFactory.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeFactory.java
deleted file mode 100644
index 5a753444cc..0000000000
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.virtualhostnode;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class JsonVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<JsonVirtualHostNodeImpl>
-{
- public JsonVirtualHostNodeFactory()
- {
- super(JsonVirtualHostNodeImpl.class);
- }
-
- @Override
- public JsonVirtualHostNodeImpl createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- Broker<?> parent = getParent(Broker.class, parents);
- return new JsonVirtualHostNodeImpl(parent, attributes, parent.getTaskExecutor());
- }
-
-}
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java
index 8f697ada76..f41b794953 100644
--- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java
+++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhostnode/JsonVirtualHostNodeImpl.java
@@ -22,10 +22,10 @@ package org.apache.qpid.server.virtualhostnode;
import java.util.Map;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ManagedAttributeField;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.store.JsonFileConfigStoreFactory;
@@ -35,9 +35,10 @@ public class JsonVirtualHostNodeImpl extends AbstractStandardVirtualHostNode<Jso
@ManagedAttributeField
private String _storePath;
- public JsonVirtualHostNodeImpl(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ @ManagedObjectFactoryConstructor
+ public JsonVirtualHostNodeImpl(Map<String, Object> attributes, Broker<?> parent)
{
- super(parent, attributes, taskExecutor);
+ super(attributes, parent);
}
@Override
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AuthenticationManagerFactory b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AuthenticationManagerFactory
deleted file mode 100644
index a1139b386c..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AuthenticationManagerFactory
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.security.auth.manager.AnonymousAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.Base64MD5PasswordFileAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.ExternalAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.KerberosAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.PlainPasswordFileAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.ScramSHA1AuthenticationManagerFactory
-
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfigurationStoreFactory b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfigurationStoreFactory
deleted file mode 100644
index cd314abcae..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfigurationStoreFactory
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.configuration.store.factory.JsonConfigurationStoreFactory
-org.apache.qpid.server.configuration.store.factory.MemoryConfigurationStoreFactory
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index 6d8dd61ab1..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.security.FileKeyStoreFactory
-org.apache.qpid.server.security.FileTrustStoreFactory
-org.apache.qpid.server.security.auth.manager.AnonymousAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.Base64MD5PasswordFileAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.ExternalAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.KerberosAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.PlainPasswordFileAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.ScramSHA1AuthenticationManagerFactory
-org.apache.qpid.server.security.auth.manager.ScramSHA1UserRecoverer
-org.apache.qpid.server.model.port.AmqpPortFactory
-org.apache.qpid.server.model.port.HttpPortFactory
-org.apache.qpid.server.model.port.JmxPortFactory
-org.apache.qpid.server.model.port.RmiPortFactory
-org.apache.qpid.server.model.port.PortFactory
-org.apache.qpid.server.model.adapter.BrokerAdapterFactory
-org.apache.qpid.server.model.adapter.StandardVirtualHostFactory
-org.apache.qpid.server.model.adapter.FileBasedGroupProviderFactory
-org.apache.qpid.server.model.adapter.FileSystemPreferencesProviderFactory
-org.apache.qpid.server.queue.LastValueQueueFactory
-org.apache.qpid.server.queue.PriorityQueueFactory
-org.apache.qpid.server.queue.QueueFactory
-org.apache.qpid.server.queue.SortedQueueFactory
-org.apache.qpid.server.queue.StandardQueueFactory
-org.apache.qpid.server.exchange.DirectExchangeFactory
-org.apache.qpid.server.exchange.FanoutExchangeFactory
-org.apache.qpid.server.exchange.HeadersExchangeFactory
-org.apache.qpid.server.exchange.TopicExchangeFactory
-org.apache.qpid.server.binding.BindingFactory
-org.apache.qpid.server.virtualhostnode.JsonVirtualHostNodeFactory
-
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
deleted file mode 100644
index d183d91f18..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.JsonFileConfigStoreFactory
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ExchangeType b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ExchangeType
deleted file mode 100644
index 4ad646b7a0..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ExchangeType
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.exchange.DirectExchangeType
-org.apache.qpid.server.exchange.TopicExchangeType
-org.apache.qpid.server.exchange.FanoutExchangeType
-org.apache.qpid.server.exchange.HeadersExchangeType
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
deleted file mode 100644
index a744bfff53..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.message.internal.InternalMessageMetaDataType
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PreferencesProviderFactory b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PreferencesProviderFactory
deleted file mode 100644
index 9fe8379120..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PreferencesProviderFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.model.adapter.FileSystemPreferencesProviderFactory \ No newline at end of file
diff --git a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory b/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory
deleted file mode 100644
index 3838a9c39f..0000000000
--- a/qpid/java/broker-core/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.transport.TCPandSSLTransportProviderFactory \ No newline at end of file
diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactoryTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactoryTest.java
deleted file mode 100644
index 0e792a4929..0000000000
--- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderFactoryTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.server.model.adapter;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.qpid.server.configuration.IllegalConfigurationException;
-import org.apache.qpid.server.model.AuthenticationProvider;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.ConfiguredObjectFactory;
-import org.apache.qpid.server.model.PreferencesProvider;
-import org.apache.qpid.server.util.BrokerTestHelper;
-import org.apache.qpid.test.utils.QpidTestCase;
-import org.apache.qpid.test.utils.TestFileUtils;
-
-public class FileSystemPreferencesProviderFactoryTest extends QpidTestCase
-{
- private AuthenticationProvider _authenticationProvider;
- private Broker _broker;
- private FileSystemPreferencesProviderFactory _factory;
-
- public void setUp() throws Exception
- {
- super.setUp();
- BrokerTestHelper.setUp();
- _authenticationProvider = mock(AuthenticationProvider.class);
- _broker = BrokerTestHelper.createBrokerMock();
- when(_authenticationProvider.getParent(Broker.class)).thenReturn(_broker);
- ConfiguredObjectFactory objectFactory = _broker.getObjectFactory();
- when(_authenticationProvider.getModel()).thenReturn(objectFactory.getModel());
- when(_authenticationProvider.getObjectFactory()).thenReturn(objectFactory);
- when(_authenticationProvider.getCategoryClass()).thenReturn(AuthenticationProvider.class);
-
- _factory = new FileSystemPreferencesProviderFactory();
- }
-
- public void tearDown() throws Exception
- {
- try
- {
- BrokerTestHelper.tearDown();
- }
- finally
- {
- super.tearDown();
- }
- }
-
- public void testGetType()
- {
- assertEquals(FileSystemPreferencesProvider.PROVIDER_TYPE, _factory.getType());
- }
-
- public void testCreateInstanceRecovering()
- {
- Map<String, Object> attributes = new HashMap<String, Object>();
- UUID id = UUID.randomUUID();
- attributes.put(PreferencesProvider.TYPE, "FileSystemPreferences");
- attributes.put(PreferencesProvider.NAME, "test-provider");
- File file = TestFileUtils.createTempFile(this, ".prefs.json", "{\"test_user\":{\"pref1\": \"pref1Value\", \"pref2\": 1.0} }");
- try
- {
- attributes.put(FileSystemPreferencesProvider.PATH, file.getAbsolutePath());
- attributes.put(ConfiguredObject.ID, id);
- PreferencesProvider provider = _factory.create(null, attributes, _authenticationProvider);
- assertNotNull("Preferences provider was not instantiated", provider);
- assertEquals("Unexpected name", "test-provider", provider.getName());
- assertEquals("Unexpected id", id, provider.getId());
- assertEquals("Unexpected path", file.getAbsolutePath(),
- provider.getAttribute(FileSystemPreferencesProvider.PATH));
- }
- finally
- {
- file.delete();
- }
- }
-
- public void testCreateInstanceRecoveringWhenPrefStoreDoesNotExist()
- {
- Map<String, Object> attributes = new HashMap<String, Object>();
- UUID id = UUID.randomUUID();
- attributes.put(PreferencesProvider.TYPE, "FileSystemPreferences");
- attributes.put(PreferencesProvider.NAME, "test-provider");
- File file = new File(TMP_FOLDER, UUID.randomUUID() + "prefs.json");
- assertFalse("Preferences store file should not exist", file.exists());
- try
- {
- attributes.put(FileSystemPreferencesProvider.PATH, file.getAbsolutePath());
- attributes.put(ConfiguredObject.ID, id);
- _factory.create(null, attributes, _authenticationProvider);
- }
- catch (IllegalConfigurationException e)
- {
- // exception should be thrown if preferences store does not exist
- }
- }
-
- public void testCreateInstanceNotRecovering()
- {
- Map<String, Object> attributes = new HashMap<String, Object>();
- UUID id = UUID.randomUUID();
- attributes.put(PreferencesProvider.TYPE, "FileSystemPreferences");
- attributes.put(PreferencesProvider.NAME, "test-provider");
- File file = new File(TMP_FOLDER, UUID.randomUUID() + "prefs.json");
- assertFalse("Preferences store file should not exist", file.exists());
- try
- {
- attributes.put(FileSystemPreferencesProvider.PATH, file.getAbsolutePath());
- attributes.put(ConfiguredObject.ID, id);
- PreferencesProvider provider = _factory.create(null, attributes, _authenticationProvider);
- assertNotNull("Preferences provider was not recovered", provider);
- assertEquals("Unexpected name", "test-provider", provider.getName());
- assertEquals("Unexpected id", id, provider.getId());
- assertEquals("Unexpected path", file.getAbsolutePath(), provider.getAttribute(
- FileSystemPreferencesProvider.PATH));
- assertTrue("Preferences store file should exist", file.exists());
- }
- finally
- {
- file.delete();
- }
- }
-
-}
diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java
index dc13c24f5d..68fcf3b868 100644
--- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java
+++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/AbstractStandardVirtualHostNodeTest.java
@@ -108,7 +108,7 @@ public class AbstractStandardVirtualHostNodeTest extends QpidTestCase
nodeAttributes.put(VirtualHostNode.NAME, TEST_VIRTUAL_HOST_NODE_NAME);
nodeAttributes.put(VirtualHostNode.ID, _nodeId);
- VirtualHostNode<?> node = new TestVirtualHostNode(_broker, nodeAttributes, _taskExecutor, _configStore);
+ VirtualHostNode<?> node = new TestVirtualHostNode(_broker, nodeAttributes, _configStore);
node.open();
node.setDesiredState(node.getState(), State.ACTIVE);
@@ -138,7 +138,7 @@ public class AbstractStandardVirtualHostNodeTest extends QpidTestCase
nodeAttributes.put(VirtualHostNode.NAME, TEST_VIRTUAL_HOST_NODE_NAME);
nodeAttributes.put(VirtualHostNode.ID, _nodeId);
- VirtualHostNode<?> node = new TestVirtualHostNode(_broker, nodeAttributes, _taskExecutor, _configStore);
+ VirtualHostNode<?> node = new TestVirtualHostNode(_broker, nodeAttributes, _configStore);
node.open();
node.setDesiredState(node.getState(), State.ACTIVE);
diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java
index e129ce778f..eda07bd846 100644
--- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java
+++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNode.java
@@ -23,7 +23,6 @@ package org.apache.qpid.server.virtualhostnode;
import java.util.Collections;
import java.util.Map;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ManagedObject;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
@@ -36,14 +35,16 @@ public class TestVirtualHostNode extends AbstractStandardVirtualHostNode<TestVir
{
private final DurableConfigurationStore _store;
- public TestVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ public TestVirtualHostNode(Broker<?> parent, Map<String, Object> attributes)
{
- this(parent, attributes, taskExecutor, null);
+ this(parent, attributes, null);
}
- public TestVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor, DurableConfigurationStore store)
+ public TestVirtualHostNode(Broker<?> parent,
+ Map<String, Object> attributes,
+ DurableConfigurationStore store)
{
- super(parent, attributes, taskExecutor);
+ super(attributes, parent);
_store = store;
}
@@ -82,4 +83,4 @@ public class TestVirtualHostNode extends AbstractStandardVirtualHostNode<TestVir
{
return Collections.<String, Object>singletonMap(MessageStore.STORE_TYPE, TestMemoryMessageStore.TYPE);
}
-} \ No newline at end of file
+}
diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNodeFactory.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNodeFactory.java
index 2f21c21e67..5018e50e0d 100644
--- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNodeFactory.java
+++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/virtualhostnode/TestVirtualHostNodeFactory.java
@@ -37,7 +37,7 @@ public class TestVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFact
public TestVirtualHostNode createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
{
Broker<?> broker = getParent(Broker.class, parents);
- return new TestVirtualHostNode(broker, attributes, broker.getTaskExecutor());
+ return new TestVirtualHostNode(broker, attributes);
}
}
diff --git a/qpid/java/broker-plugins/access-control/build.xml b/qpid/java/broker-plugins/access-control/build.xml
index eea98937d4..abb205f439 100644
--- a/qpid/java/broker-plugins/access-control/build.xml
+++ b/qpid/java/broker-plugins/access-control/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins Access Control" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests management/common" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/access-control/pom.xml b/qpid/java/broker-plugins/access-control/pom.xml
index ae5f33cd53..ddb90974a7 100644
--- a/qpid/java/broker-plugins/access-control/pom.xml
+++ b/qpid/java/broker-plugins/access-control/pom.xml
@@ -42,6 +42,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java
index 9ba4618b29..1547adc6e5 100644
--- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java
+++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderFactory.java
@@ -26,8 +26,10 @@ import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.plugin.AccessControlProviderFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.util.ResourceBundleLoader;
+@PluggableService
public class ACLFileAccessControlProviderFactory extends AbstractConfiguredObjectTypeFactory<ACLFileAccessControlProviderImpl> implements AccessControlProviderFactory<ACLFileAccessControlProviderImpl>
{
public static final String RESOURCE_BUNDLE = "org.apache.qpid.server.security.access.plugins.FileAccessControlProviderAttributeDescriptions";
diff --git a/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AccessControlProviderFactory b/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AccessControlProviderFactory
deleted file mode 100644
index 2c5a643ab1..0000000000
--- a/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.AccessControlProviderFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.security.access.plugins.ACLFileAccessControlProviderFactory
diff --git a/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index 2c5a643ab1..0000000000
--- a/qpid/java/broker-plugins/access-control/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.security.access.plugins.ACLFileAccessControlProviderFactory
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml b/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml
index 3537be172d..d60861f847 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins AMQP 0-10 Protocol" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml b/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml
index 925c732c5f..b60cdd054f 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/pom.xml
@@ -38,6 +38,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java
index 0d43c84fdd..f9bf697a0d 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_Internal_to_v0_10.java
@@ -20,8 +20,11 @@
*/
package org.apache.qpid.server.protocol.v0_10;
+import java.nio.ByteBuffer;
+
import org.apache.qpid.server.message.internal.InternalMessage;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.StoreFuture;
import org.apache.qpid.server.store.StoredMessage;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
@@ -30,8 +33,7 @@ import org.apache.qpid.transport.Header;
import org.apache.qpid.transport.MessageDeliveryPriority;
import org.apache.qpid.transport.MessageProperties;
-import java.nio.ByteBuffer;
-
+@PluggableService
public class MessageConverter_Internal_to_v0_10 implements MessageConverter<InternalMessage, MessageTransferMessage>
{
@Override
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java
index e788eb071e..2a4aeb8b7e 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10.java
@@ -30,6 +30,7 @@ import java.util.Map;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.StoreFuture;
import org.apache.qpid.server.store.StoredMessage;
import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
@@ -40,6 +41,7 @@ import org.apache.qpid.transport.MessageDeliveryPriority;
import org.apache.qpid.transport.MessageProperties;
import org.apache.qpid.transport.codec.BBEncoder;
+@PluggableService
public class MessageConverter_v0_10 implements MessageConverter<ServerMessage, MessageTransferMessage>
{
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java
index f034f8159d..52bef63f7b 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageConverter_v0_10_to_Internal.java
@@ -20,9 +20,19 @@
*/
package org.apache.qpid.server.protocol.v0_10;
+import java.io.EOFException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
import org.apache.qpid.server.message.AMQMessageHeader;
import org.apache.qpid.server.message.internal.InternalMessage;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
import org.apache.qpid.transport.MessageProperties;
@@ -31,15 +41,7 @@ import org.apache.qpid.transport.codec.BBDecoder;
import org.apache.qpid.typedmessage.TypedBytesContentReader;
import org.apache.qpid.typedmessage.TypedBytesFormatException;
-import java.io.EOFException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
+@PluggableService
public class MessageConverter_v0_10_to_Internal implements MessageConverter<MessageTransferMessage, InternalMessage>
{
@Override
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java
index 56c7a358c0..bac7e2d01f 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/MessageMetaDataType_0_10.java
@@ -24,8 +24,10 @@ import java.nio.ByteBuffer;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.plugin.MessageMetaDataType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.StoredMessage;
+@PluggableService
public class MessageMetaDataType_0_10 implements MessageMetaDataType<MessageMetaData_0_10>
{
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java
index 7eab526a17..b1d9fbf676 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngineCreator_0_10.java
@@ -28,10 +28,12 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.plugin.ProtocolEngineCreator;
import org.apache.qpid.transport.ConnectionDelegate;
import org.apache.qpid.transport.network.NetworkConnection;
+@PluggableService
public class ProtocolEngineCreator_0_10 implements ProtocolEngineCreator
{
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
deleted file mode 100644
index dd115905a4..0000000000
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v0_10.MessageConverter_v0_10
-org.apache.qpid.server.protocol.v0_10.MessageConverter_Internal_to_v0_10
-org.apache.qpid.server.protocol.v0_10.MessageConverter_v0_10_to_Internal
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
deleted file mode 100644
index 36118fe053..0000000000
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v0_10.MessageMetaDataType_0_10
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator
deleted file mode 100644
index 3d94e26671..0000000000
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v0_10.ProtocolEngineCreator_0_10
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml b/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml
index 0ab2b0b833..67c0b7ab4f 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins AMQP 0-8 Protocol" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml b/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml
index 945b66b23a..35ec13709e 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/pom.xml
@@ -38,6 +38,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java
index 28c1e528f4..2ad6fc2ca6 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_Internal_to_v0_8.java
@@ -20,6 +20,15 @@
*/
package org.apache.qpid.server.protocol.v0_8;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
import org.apache.qpid.framing.ContentHeaderBody;
@@ -27,21 +36,14 @@ import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
import org.apache.qpid.server.message.internal.InternalMessage;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.StoreFuture;
import org.apache.qpid.server.store.StoredMessage;
import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
import org.apache.qpid.transport.codec.BBEncoder;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
+@PluggableService
public class MessageConverter_Internal_to_v0_8 implements MessageConverter<InternalMessage, AMQMessage>
{
private static final int BASIC_CLASS_ID = 60;
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java
index f077617446..0b98699b4a 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageConverter_v0_8_to_Internal.java
@@ -20,10 +20,21 @@
*/
package org.apache.qpid.server.protocol.v0_8;
+import java.io.EOFException;
+import java.net.URISyntaxException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.server.message.AMQMessageHeader;
import org.apache.qpid.server.message.internal.InternalMessage;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
import org.apache.qpid.transport.codec.BBDecoder;
@@ -31,16 +42,7 @@ import org.apache.qpid.typedmessage.TypedBytesContentReader;
import org.apache.qpid.typedmessage.TypedBytesFormatException;
import org.apache.qpid.url.AMQBindingURL;
-import java.io.EOFException;
-import java.net.URISyntaxException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
+@PluggableService
public class MessageConverter_v0_8_to_Internal implements MessageConverter<AMQMessage, InternalMessage>
{
@Override
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java
index dd91cb33b3..5e263cd3b0 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/MessageMetaDataType_0_8.java
@@ -24,8 +24,10 @@ import java.nio.ByteBuffer;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.plugin.MessageMetaDataType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.StoredMessage;
+@PluggableService
public class MessageMetaDataType_0_8 implements MessageMetaDataType<MessageMetaData>
{
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java
index f0893078df..d88d8c3c2a 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_8.java
@@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.plugin.ProtocolEngineCreator;
import org.apache.qpid.transport.network.NetworkConnection;
+@PluggableService
public class ProtocolEngineCreator_0_8 implements ProtocolEngineCreator
{
private static final byte[] AMQP_0_8_HEADER =
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java
index 1cc5c7603c..4f9198a509 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9.java
@@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.plugin.ProtocolEngineCreator;
import org.apache.qpid.transport.network.NetworkConnection;
+@PluggableService
public class ProtocolEngineCreator_0_9 implements ProtocolEngineCreator
{
private static final byte[] AMQP_0_9_HEADER =
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java
index e51d74c87d..5251e760ff 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ProtocolEngineCreator_0_9_1.java
@@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.plugin.ProtocolEngineCreator;
import org.apache.qpid.transport.network.NetworkConnection;
+@PluggableService
public class ProtocolEngineCreator_0_9_1 implements ProtocolEngineCreator
{
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
deleted file mode 100644
index d87bc2566f..0000000000
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v0_8.MessageConverter_Internal_to_v0_8
-org.apache.qpid.server.protocol.v0_8.MessageConverter_v0_8_to_Internal \ No newline at end of file
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
deleted file mode 100644
index 43ad3adf13..0000000000
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v0_8.MessageMetaDataType_0_8
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator b/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator
deleted file mode 100644
index 57ca615a04..0000000000
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v0_8.ProtocolEngineCreator_0_8
-org.apache.qpid.server.protocol.v0_8.ProtocolEngineCreator_0_9
-org.apache.qpid.server.protocol.v0_8.ProtocolEngineCreator_0_9_1
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml b/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml
index 00926c0787..2315ba557d 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins AMQP 1.0 Protocol" default="build">
- <property name="module.depends" value="common broker-core amqp-1-0-common" />
+ <property name="module.depends" value="common broker-core amqp-1-0-common broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml b/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml
index 8057af858e..754b53f443 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/pom.xml
@@ -39,6 +39,13 @@
<dependency>
<groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
<artifactId>qpid-amqp-1-0-common</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java
index 1764eec84d..0a6fec1200 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java
@@ -20,6 +20,15 @@
*/
package org.apache.qpid.server.protocol.v1_0;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
import org.apache.qpid.amqp_1_0.messaging.SectionEncoder;
import org.apache.qpid.amqp_1_0.type.Binary;
import org.apache.qpid.amqp_1_0.type.Section;
@@ -31,17 +40,10 @@ import org.apache.qpid.amqp_1_0.type.messaging.Data;
import org.apache.qpid.amqp_1_0.type.messaging.Header;
import org.apache.qpid.amqp_1_0.type.messaging.Properties;
import org.apache.qpid.server.message.internal.InternalMessage;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.util.ConnectionScopedRuntimeException;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
+@PluggableService
public class MessageConverter_Internal_to_v1_0 extends MessageConverter_to_1_0<InternalMessage>
{
private static final Charset UTF_8 = Charset.forName("UTF-8");
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java
index 077ea7819b..a17a9585c1 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java
@@ -23,8 +23,10 @@ package org.apache.qpid.server.protocol.v1_0;
import org.apache.qpid.amqp_1_0.type.codec.AMQPDescribedTypeRegistry;
import org.apache.qpid.server.message.internal.InternalMessage;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
+@PluggableService
public class MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage>
{
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java
index 15f1d5cad4..8f8a868365 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaDataType_1_0.java
@@ -24,8 +24,10 @@ import java.nio.ByteBuffer;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.plugin.MessageMetaDataType;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.StoredMessage;
+@PluggableService
public class MessageMetaDataType_1_0 implements MessageMetaDataType<MessageMetaData_1_0>
{
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java
index 4b7a6d0e55..8eb89cade6 100644
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java
+++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java
@@ -25,9 +25,11 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Protocol;
import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.plugin.ProtocolEngineCreator;
import org.apache.qpid.transport.network.NetworkConnection;
+@PluggableService
public class ProtocolEngineCreator_1_0_0_SASL implements ProtocolEngineCreator
{
private static final byte[] AMQP_SASL_1_0_0_HEADER =
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
deleted file mode 100644
index aa24847805..0000000000
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v1_0.MessageConverter_Internal_to_v1_0
-org.apache.qpid.server.protocol.v1_0.MessageConverter_v1_0_to_Internal \ No newline at end of file
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
deleted file mode 100644
index 91c673215c..0000000000
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageMetaDataType
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v1_0.MessageMetaDataType_1_0
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator
deleted file mode 100644
index 190574b7cc..0000000000
--- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ProtocolEngineCreator
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.v1_0.ProtocolEngineCreator_1_0_0_SASL
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml
index 161a4c394c..0e4a9f1120 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins AMQP 0.8 to 1.0 MessageConversion" default="build">
- <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-1-0-protocol broker-plugins/amqp-0-10-protocol" />
+ <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-1-0-protocol broker-plugins/amqp-0-10-protocol broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml
index 666aab338e..fc19c1b36e 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/pom.xml
@@ -39,6 +39,13 @@
<dependency>
<groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
<artifactId>qpid-common</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java
index 26dd8e5f37..84a57d474a 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_0_10_to_1_0.java
@@ -32,6 +32,7 @@ import org.apache.qpid.amqp_1_0.type.UnsignedInteger;
import org.apache.qpid.amqp_1_0.type.messaging.ApplicationProperties;
import org.apache.qpid.amqp_1_0.type.messaging.Header;
import org.apache.qpid.amqp_1_0.type.messaging.Properties;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage;
import org.apache.qpid.server.protocol.v1_0.MessageConverter_to_1_0;
import org.apache.qpid.server.protocol.v1_0.MessageMetaData_1_0;
@@ -39,6 +40,7 @@ import org.apache.qpid.transport.DeliveryProperties;
import org.apache.qpid.transport.MessageDeliveryMode;
import org.apache.qpid.transport.MessageProperties;
+@PluggableService
public class MessageConverter_0_10_to_1_0 extends MessageConverter_to_1_0<MessageTransferMessage>
{
@Override
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java
index 01477ebb05..3974198f62 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_10_v1_0/MessageConverter_1_0_to_v0_10.java
@@ -20,8 +20,11 @@
*/
package org.apache.qpid.server.protocol.converter.v0_10_v1_0;
+import java.nio.ByteBuffer;
+
import org.apache.qpid.server.message.AMQMessageHeader;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.protocol.v0_10.MessageMetaData_0_10;
import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage;
import org.apache.qpid.server.protocol.v1_0.MessageConverter_from_1_0;
@@ -35,8 +38,7 @@ import org.apache.qpid.transport.MessageDeliveryPriority;
import org.apache.qpid.transport.MessageProperties;
import org.apache.qpid.transport.ReplyTo;
-import java.nio.ByteBuffer;
-
+@PluggableService
public class MessageConverter_1_0_to_v0_10 implements MessageConverter<Message_1_0, MessageTransferMessage>
{
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
deleted file mode 100644
index 4c9e612f32..0000000000
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.converter.v0_10_v1_0.MessageConverter_0_10_to_1_0
-org.apache.qpid.server.protocol.converter.v0_10_v1_0.MessageConverter_1_0_to_v0_10
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml
index 26a89bfed9..d7f5898c4c 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins AMQP 0.8 to 0.10 MessageConversion" default="build">
- <property name="module.depends" value="common broker-core broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol" />
+ <property name="module.depends" value="common broker-core broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml
index 9898834055..6911ea8ae3 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/pom.xml
@@ -39,6 +39,13 @@
<dependency>
<groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
<artifactId>qpid-common</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java
index 9a28efbf1a..e9fe0b59fa 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_10_to_0_8.java
@@ -32,6 +32,7 @@ import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
import org.apache.qpid.server.exchange.ExchangeImpl;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage;
import org.apache.qpid.server.protocol.v0_8.AMQMessage;
import org.apache.qpid.server.protocol.v0_8.MessageMetaData;
@@ -44,6 +45,7 @@ import org.apache.qpid.transport.MessageDeliveryMode;
import org.apache.qpid.transport.MessageProperties;
import org.apache.qpid.transport.ReplyTo;
+@PluggableService
public class MessageConverter_0_10_to_0_8 implements MessageConverter<MessageTransferMessage, AMQMessage>
{
private static final int BASIC_CLASS_ID = 60;
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java
index c9f43b36f8..b8073d149b 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v0_10/MessageConverter_0_8_to_0_10.java
@@ -28,6 +28,7 @@ import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.protocol.v0_10.MessageMetaData_0_10;
import org.apache.qpid.server.protocol.v0_10.MessageTransferMessage;
import org.apache.qpid.server.protocol.v0_8.AMQMessage;
@@ -41,6 +42,7 @@ import org.apache.qpid.transport.MessageProperties;
import org.apache.qpid.transport.ReplyTo;
import org.apache.qpid.url.AMQBindingURL;
+@PluggableService
public class MessageConverter_0_8_to_0_10 implements MessageConverter<AMQMessage, MessageTransferMessage>
{
@Override
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
deleted file mode 100644
index 5aeef786ae..0000000000
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.converter.v0_8_v0_10.MessageConverter_0_8_to_0_10
-org.apache.qpid.server.protocol.converter.v0_8_v0_10.MessageConverter_0_10_to_0_8
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml
index f28b6760e5..d14c9b0680 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins AMQP 0.8 to 1.0 MessageConversion" default="build">
- <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-0-8-protocol broker-plugins/amqp-1-0-protocol" />
+ <property name="module.depends" value="common broker-core amqp-1-0-common broker-plugins/amqp-0-8-protocol broker-plugins/amqp-1-0-protocol broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml
index 957c4828cb..e25a758e84 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/pom.xml
@@ -39,6 +39,13 @@
<dependency>
<groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
<artifactId>qpid-common</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java
index a0026ccd8f..eb9d6842e4 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_0_8_to_1_0.java
@@ -35,11 +35,13 @@ import org.apache.qpid.amqp_1_0.type.messaging.Properties;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
import org.apache.qpid.framing.FieldTable;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.protocol.v0_8.AMQMessage;
import org.apache.qpid.server.protocol.v1_0.MessageConverter_to_1_0;
import org.apache.qpid.server.protocol.v1_0.MessageMetaData_1_0;
import org.apache.qpid.url.AMQBindingURL;
+@PluggableService
public class MessageConverter_0_8_to_1_0 extends MessageConverter_to_1_0<AMQMessage>
{
@Override
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java
index 576db8f83e..d6abe94f30 100644
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java
+++ b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/java/org/apache/qpid/server/protocol/converter/v0_8_v1_0/MessageConverter_1_0_to_v0_8.java
@@ -20,12 +20,17 @@
*/
package org.apache.qpid.server.protocol.converter.v0_8_v1_0;
+import java.nio.ByteBuffer;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
import org.apache.qpid.framing.ContentHeaderBody;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
import org.apache.qpid.server.plugin.MessageConverter;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.protocol.v0_8.AMQMessage;
import org.apache.qpid.server.protocol.v0_8.MessageMetaData;
import org.apache.qpid.server.protocol.v1_0.MessageConverter_from_1_0;
@@ -35,10 +40,7 @@ import org.apache.qpid.server.store.StoreFuture;
import org.apache.qpid.server.store.StoredMessage;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
-import java.nio.ByteBuffer;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
+@PluggableService
public class MessageConverter_1_0_to_v0_8 implements MessageConverter<Message_1_0, AMQMessage>
{
private static final int BASIC_CLASS_ID = 60;
diff --git a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter b/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
deleted file mode 100644
index 61259f870d..0000000000
--- a/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageConverter
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.protocol.converter.v0_8_v1_0.MessageConverter_0_8_to_1_0
-org.apache.qpid.server.protocol.converter.v0_8_v1_0.MessageConverter_1_0_to_v0_8
diff --git a/qpid/java/broker-plugins/derby-store/build.xml b/qpid/java/broker-plugins/derby-store/build.xml
index 95d3263fbc..fb71bc46a4 100644
--- a/qpid/java/broker-plugins/derby-store/build.xml
+++ b/qpid/java/broker-plugins/derby-store/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins Derby Store" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/derby-store/pom.xml b/qpid/java/broker-plugins/derby-store/pom.xml
index b39a4db4af..c3c45e62ee 100644
--- a/qpid/java/broker-plugins/derby-store/pom.xml
+++ b/qpid/java/broker-plugins/derby-store/pom.xml
@@ -37,6 +37,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>${derby-version}</version>
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
index 75711547e1..13c897135d 100644
--- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
+++ b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/store/derby/DerbyMessageStoreFactory.java
@@ -25,9 +25,11 @@ import java.util.Map;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.plugin.MessageStoreFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.store.MessageStore;
+@PluggableService
public class DerbyMessageStoreFactory implements MessageStoreFactory, DurableConfigurationStoreFactory
{
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java
index f01391c0bf..f65cc78f6a 100644
--- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java
+++ b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNode.java
@@ -23,10 +23,10 @@ package org.apache.qpid.server.virtualhostnode.derby;
import java.util.Map;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ManagedAttributeField;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.store.derby.DerbyMessageStoreFactory;
import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
@@ -38,9 +38,10 @@ public class DerbyVirtualHostNode extends AbstractStandardVirtualHostNode<DerbyV
@ManagedAttributeField
private String _storePath;
- public DerbyVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ @ManagedObjectFactoryConstructor
+ public DerbyVirtualHostNode(Map<String, Object> attributes, Broker<?> parent)
{
- super(parent, attributes, taskExecutor);
+ super(attributes, parent);
}
@Override
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNodeFactory.java b/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNodeFactory.java
deleted file mode 100644
index 7b01511036..0000000000
--- a/qpid/java/broker-plugins/derby-store/src/main/java/org/apache/qpid/server/virtualhostnode/derby/DerbyVirtualHostNodeFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.server.virtualhostnode.derby;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class DerbyVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<DerbyVirtualHostNode>
-{
-
- public DerbyVirtualHostNodeFactory()
- {
- super(DerbyVirtualHostNode.class);
- }
-
- @Override
- public DerbyVirtualHostNode createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- Broker<?> broker = getParent(Broker.class, parents);
- return new DerbyVirtualHostNode(broker, attributes, broker.getTaskExecutor());
- }
-
-}
diff --git a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index 9a942db521..0000000000
--- a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.virtualhostnode.derby.DerbyVirtualHostNodeFactory
diff --git a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory b/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
deleted file mode 100644
index 88ca1fed5e..0000000000
--- a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.derby.DerbyMessageStoreFactory
diff --git a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
deleted file mode 100644
index 88ca1fed5e..0000000000
--- a/qpid/java/broker-plugins/derby-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.derby.DerbyMessageStoreFactory
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/build.xml b/qpid/java/broker-plugins/jdbc-provider-bone/build.xml
index 8c8e44c072..5cc1edcef1 100644
--- a/qpid/java/broker-plugins/jdbc-provider-bone/build.xml
+++ b/qpid/java/broker-plugins/jdbc-provider-bone/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="jdbc-provider-bone" xmlns:ivy="antlib:org.apache.ivy.ant" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.genpom" value="true"/>
<property name="module.genpom.args" value="-Sqpid-common=provided -Sqpid-broker-core=provided"/>
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml b/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml
index 86f28e2af0..174b74bf00 100644
--- a/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml
+++ b/qpid/java/broker-plugins/jdbc-provider-bone/pom.xml
@@ -38,6 +38,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>com.jolbox</groupId>
<artifactId>bonecp</artifactId>
<version>${bonecp-version}</version>
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java
index 3668ba308e..c1345cfe54 100644
--- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java
+++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/org/apache/qpid/server/store/jdbc/bonecp/BoneCPConnectionProviderFactory.java
@@ -24,8 +24,10 @@ import java.sql.SQLException;
import java.util.Map;
import org.apache.qpid.server.plugin.JDBCConnectionProviderFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.jdbc.ConnectionProvider;
+@PluggableService
public class BoneCPConnectionProviderFactory implements JDBCConnectionProviderFactory
{
@Override
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory
deleted file mode 100644
index 70157b44c3..0000000000
--- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.jdbc.bonecp.BoneCPConnectionProviderFactory
diff --git a/qpid/java/broker-plugins/jdbc-store/build.xml b/qpid/java/broker-plugins/jdbc-store/build.xml
index 4a8e72898c..aa0f8aca94 100644
--- a/qpid/java/broker-plugins/jdbc-store/build.xml
+++ b/qpid/java/broker-plugins/jdbc-store/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins JDBC Store" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/jdbc-store/pom.xml b/qpid/java/broker-plugins/jdbc-store/pom.xml
index 6453cf53b5..78675e332b 100644
--- a/qpid/java/broker-plugins/jdbc-store/pom.xml
+++ b/qpid/java/broker-plugins/jdbc-store/pom.xml
@@ -38,6 +38,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java
index 191cc2ab7a..d528ab9253 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java
@@ -23,7 +23,9 @@ package org.apache.qpid.server.store.jdbc;
import java.util.Map;
import org.apache.qpid.server.plugin.JDBCConnectionProviderFactory;
+import org.apache.qpid.server.plugin.PluggableService;
+@PluggableService
public class DefaultConnectionProviderFactory implements JDBCConnectionProviderFactory
{
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
index b5a9d64a04..e1db859a98 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/JDBCMessageStoreFactory.java
@@ -25,9 +25,11 @@ import java.util.Map;
import org.apache.qpid.server.model.VirtualHost;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.plugin.MessageStoreFactory;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.store.MessageStore;
+@PluggableService
public class JDBCMessageStoreFactory implements MessageStoreFactory, DurableConfigurationStoreFactory
{
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeFactory.java
deleted file mode 100644
index aa3c38ce65..0000000000
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.server.virtualhostnode.jdbc;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class JDBCVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<JDBCVirtualHostNodeImpl>
-{
- public JDBCVirtualHostNodeFactory()
- {
- super(JDBCVirtualHostNodeImpl.class);
- }
-
- @Override
- public JDBCVirtualHostNodeImpl createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- Broker<?> broker = getParent(Broker.class, parents);
- return new JDBCVirtualHostNodeImpl(broker, attributes, broker.getTaskExecutor());
- }
-
-}
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
index 2a1279e74b..8d7c79b656 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/virtualhostnode/jdbc/JDBCVirtualHostNodeImpl.java
@@ -22,13 +22,11 @@ package org.apache.qpid.server.virtualhostnode.jdbc;
import java.util.Map;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ManagedAttribute;
import org.apache.qpid.server.model.ManagedAttributeField;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
-import org.apache.qpid.server.store.jdbc.JDBCMessageStore;
import org.apache.qpid.server.store.jdbc.JDBCMessageStoreFactory;
import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
@@ -53,9 +51,10 @@ public class JDBCVirtualHostNodeImpl extends AbstractStandardVirtualHostNode<JDB
@ManagedAttributeField
private String _blobType;
- public JDBCVirtualHostNodeImpl(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ @ManagedObjectFactoryConstructor
+ public JDBCVirtualHostNodeImpl(Map<String, Object> attributes, Broker<?> parent)
{
- super(parent, attributes, taskExecutor);
+ super(attributes, parent);
}
@Override
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index 03e3a963a5..0000000000
--- a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.virtualhostnode.jdbc.JDBCVirtualHostNodeFactory
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
deleted file mode 100644
index a77458f27d..0000000000
--- a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.DurableConfigurationStoreFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.jdbc.JDBCMessageStoreFactory
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory
deleted file mode 100644
index e0ae6e97cc..0000000000
--- a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.JDBCConnectionProviderFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.jdbc.DefaultConnectionProviderFactory
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
deleted file mode 100644
index a77458f27d..0000000000
--- a/qpid/java/broker-plugins/jdbc-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.jdbc.JDBCMessageStoreFactory
diff --git a/qpid/java/broker-plugins/management-amqp/build.xml b/qpid/java/broker-plugins/management-amqp/build.xml
index 542bb952f1..5ed0fa87f3 100644
--- a/qpid/java/broker-plugins/management-amqp/build.xml
+++ b/qpid/java/broker-plugins/management-amqp/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins AMQP Management" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/management-amqp/pom.xml b/qpid/java/broker-plugins/management-amqp/pom.xml
index b8aa40a72f..dd4c8d7fe5 100644
--- a/qpid/java/broker-plugins/management-amqp/pom.xml
+++ b/qpid/java/broker-plugins/management-amqp/pom.xml
@@ -39,7 +39,15 @@
<scope>provided</scope>
</dependency>
- </dependencies>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ </dependencies>
<build>
</build>
diff --git a/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java b/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java
index ab1fd7cf38..e977c027a1 100644
--- a/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java
+++ b/qpid/java/broker-plugins/management-amqp/src/main/java/org/apache/qpid/server/management/amqp/ManagementNodeCreator.java
@@ -20,8 +20,10 @@
*/
package org.apache.qpid.server.management.amqp;
+import org.apache.qpid.server.plugin.PluggableService;
import org.apache.qpid.server.plugin.SystemNodeCreator;
+@PluggableService
public class ManagementNodeCreator implements SystemNodeCreator
{
@Override
diff --git a/qpid/java/broker-plugins/management-amqp/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.SystemNodeCreator b/qpid/java/broker-plugins/management-amqp/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.SystemNodeCreator
deleted file mode 100644
index 767f93782b..0000000000
--- a/qpid/java/broker-plugins/management-amqp/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.SystemNodeCreator
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.management.amqp.ManagementNodeCreator
diff --git a/qpid/java/broker-plugins/management-http/build.xml b/qpid/java/broker-plugins/management-http/build.xml
index d921b91580..e4ad1d9e4b 100644
--- a/qpid/java/broker-plugins/management-http/build.xml
+++ b/qpid/java/broker-plugins/management-http/build.xml
@@ -18,7 +18,7 @@
-->
<project name="Qpid Broker-Plugins Management HTTP" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="broker-core/tests qpid-test-utils management/common client" />
<property name="module.genpom" value="true" />
diff --git a/qpid/java/broker-plugins/management-http/pom.xml b/qpid/java/broker-plugins/management-http/pom.xml
index c66bda224f..de6089dc1d 100644
--- a/qpid/java/broker-plugins/management-http/pom.xml
+++ b/qpid/java/broker-plugins/management-http/pom.xml
@@ -38,6 +38,13 @@
</dependency>
<dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
index 5c5f53f676..5b7c23ef2e 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
+++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
@@ -106,6 +106,7 @@ public class HttpManagement extends AbstractPluginAdapter<HttpManagement> implem
@ManagedAttributeField
private int _sessionTimeout;
+ @ManagedObjectFactoryConstructor
public HttpManagement(Map<String, Object> attributes, Broker broker)
{
super(attributes, broker);
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java
deleted file mode 100644
index 518788a3d3..0000000000
--- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.qpid.server.management.plugin;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class HttpManagementFactory extends AbstractConfiguredObjectTypeFactory<HttpManagement>
-{
-
- public HttpManagementFactory()
- {
- super(HttpManagement.class);
- }
-
- @Override
- public HttpManagement createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- Map<String,Object> attributesWithoutId = new HashMap<String, Object>(attributes);
- return new HttpManagement(attributes, getParent(Broker.class,parents));
- }
-
-}
diff --git a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index 316698a10e..0000000000
--- a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.management.plugin.HttpManagementFactory
-
-
diff --git a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory b/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory
deleted file mode 100644
index 7ffb9a9013..0000000000
--- a/qpid/java/broker-plugins/management-http/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.management.plugin.HttpManagementFactory
diff --git a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java
deleted file mode 100644
index 809b2405b1..0000000000
--- a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.qpid.server.management.plugin;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.BrokerModel;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.ConfiguredObjectFactory;
-import org.apache.qpid.server.model.ConfiguredObjectFactoryImpl;
-import org.apache.qpid.test.utils.QpidTestCase;
-
-public class HttpManagementFactoryTest extends QpidTestCase
-{
- private static final int SESSION_TIMEOUT = 3600;
-
- private HttpManagementFactory _pluginFactory = new HttpManagementFactory();
- private Map<String, Object> _attributes = new HashMap<String, Object>();
- private Broker _broker = mock(Broker.class);
- private UUID _id = UUID.randomUUID();
-
-
- public void testCreateInstance() throws Exception
- {
- _attributes.put(ConfiguredObject.NAME, getName());
- _attributes.put(ConfiguredObject.TYPE, HttpManagement.PLUGIN_TYPE);
- _attributes.put(HttpManagement.TIME_OUT, SESSION_TIMEOUT);
- _attributes.put(ConfiguredObject.ID, _id);
- when(_broker.getCategoryClass()).thenReturn(Broker.class);
- ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
- when(_broker.getObjectFactory()).thenReturn(objectFactory);
- when(_broker.getModel()).thenReturn(objectFactory.getModel());
-
- HttpManagement management = _pluginFactory.createInstance(_attributes, _broker);
- management.open();
-
- assertEquals(_broker, management.getParent(Broker.class));
- assertEquals(SESSION_TIMEOUT, management.getSessionTimeout());
- }
-
-}
diff --git a/qpid/java/broker-plugins/management-jmx/build.xml b/qpid/java/broker-plugins/management-jmx/build.xml
index 0209ecbd7a..ae7e410474 100644
--- a/qpid/java/broker-plugins/management-jmx/build.xml
+++ b/qpid/java/broker-plugins/management-jmx/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins Management JMX" default="build">
- <property name="module.depends" value="common broker-core management/common" />
+ <property name="module.depends" value="common broker-core management/common broker-codegen" />
<property name="module.test.depends" value="broker-core/tests qpid-test-utils management/common client" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/management-jmx/pom.xml b/qpid/java/broker-plugins/management-jmx/pom.xml
index 64d0db3cb2..f3fa0d5545 100644
--- a/qpid/java/broker-plugins/management-jmx/pom.xml
+++ b/qpid/java/broker-plugins/management-jmx/pom.xml
@@ -39,6 +39,13 @@
<dependency>
<groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
<artifactId>qpid-management-common</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementFactory.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementFactory.java
deleted file mode 100644
index 335e4fe50f..0000000000
--- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.qpid.server.jmx;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class JMXManagementFactory extends AbstractConfiguredObjectTypeFactory<JMXManagementPluginImpl>
-{
- public JMXManagementFactory()
- {
- super(JMXManagementPluginImpl.class);
- }
-
- @Override
- public JMXManagementPluginImpl createInstance(final Map<String, Object> attributes, final ConfiguredObject<?>... parents)
- {
- return new JMXManagementPluginImpl(attributes,getParent(Broker.class,parents));
- }
-}
diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java
index 82aa806bba..aa823d7f6a 100644
--- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java
+++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java
@@ -43,6 +43,7 @@ import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ConfigurationChangeListener;
import org.apache.qpid.server.model.ConfiguredObject;
import org.apache.qpid.server.model.ManagedAttributeField;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.model.PasswordCredentialManagingAuthenticationProvider;
import org.apache.qpid.server.model.Port;
import org.apache.qpid.server.model.Protocol;
@@ -80,6 +81,7 @@ public class JMXManagementPluginImpl
@ManagedAttributeField
private boolean _usePlatformMBeanServer;
+ @ManagedObjectFactoryConstructor
public JMXManagementPluginImpl(Map<String, Object> attributes, Broker broker)
{
super(attributes, broker);
diff --git a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index d77477e044..0000000000
--- a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.jmx.JMXManagementFactory
-
-
diff --git a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory b/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory
deleted file mode 100644
index 8fa778269e..0000000000
--- a/qpid/java/broker-plugins/management-jmx/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.PluginFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.jmx.JMXManagementFactory
diff --git a/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/JMXManagementFactoryTest.java b/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/JMXManagementFactoryTest.java
deleted file mode 100644
index 3014621913..0000000000
--- a/qpid/java/broker-plugins/management-jmx/src/test/java/org/apache/qpid/server/jmx/JMXManagementFactoryTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.qpid.server.jmx;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.BrokerModel;
-import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.ConfiguredObjectFactory;
-import org.apache.qpid.server.model.ConfiguredObjectFactoryImpl;
-import org.apache.qpid.test.utils.QpidTestCase;
-
-public class JMXManagementFactoryTest extends QpidTestCase
-{
- private final JMXManagementFactory _jmxManagementFactory = new JMXManagementFactory();
- private final Map<String, Object> _attributes = new HashMap<String, Object>();
- private final Broker _broker = mock(Broker.class);
- private UUID _id = UUID.randomUUID();
-
- public void testJMXConfigured() throws Exception
- {
- _attributes.put(ConfiguredObject.ID,UUID.randomUUID());
- _attributes.put(ConfiguredObject.TYPE, JMXManagementPlugin.PLUGIN_TYPE);
- _attributes.put(ConfiguredObject.NAME, getName());
- ConfiguredObjectFactory objectFactory = new ConfiguredObjectFactoryImpl(BrokerModel.getInstance());
-
- when(_broker.getObjectFactory()).thenReturn(objectFactory);
- when(_broker.getModel()).thenReturn(objectFactory.getModel());
- when(_broker.getCategoryClass()).thenReturn(Broker.class);
-
- JMXManagementPlugin jmxManagement = _jmxManagementFactory.createInstance( _attributes, _broker);
- jmxManagement.open();
- assertNotNull(jmxManagement);
- assertEquals("Unexpected plugin type", JMXManagementPlugin.PLUGIN_TYPE, jmxManagement.getType());
- assertEquals("Unexpected default mbean platform", Boolean.parseBoolean(JMXManagementPlugin.DEFAULT_USE_PLATFORM_MBEAN_SERVER), jmxManagement.getUsePlatformMBeanServer());
- }
-
-
-}
diff --git a/qpid/java/broker-plugins/memory-store/build.xml b/qpid/java/broker-plugins/memory-store/build.xml
index 6d107b7803..5bbc79f9c6 100644
--- a/qpid/java/broker-plugins/memory-store/build.xml
+++ b/qpid/java/broker-plugins/memory-store/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins Memory Store" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/memory-store/pom.xml b/qpid/java/broker-plugins/memory-store/pom.xml
index 8bec7ef981..e3bd07ab8d 100644
--- a/qpid/java/broker-plugins/memory-store/pom.xml
+++ b/qpid/java/broker-plugins/memory-store/pom.xml
@@ -37,6 +37,13 @@
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
<!-- test dependencies -->
<dependency>
<groupId>org.apache.qpid</groupId>
diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
index 92f1e05870..d5d5969a47 100644
--- a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
+++ b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/store/MemoryMessageStoreFactory.java
@@ -24,7 +24,9 @@ import java.util.Map;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.plugin.MessageStoreFactory;
+import org.apache.qpid.server.plugin.PluggableService;
+@PluggableService
public class MemoryMessageStoreFactory implements MessageStoreFactory, DurableConfigurationStoreFactory
{
diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java
index 89c4851b38..ce587388ce 100644
--- a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java
+++ b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNode.java
@@ -22,9 +22,9 @@ package org.apache.qpid.server.virtualhostnode.memory;
import java.util.Map;
-import org.apache.qpid.server.configuration.updater.TaskExecutor;
import org.apache.qpid.server.model.Broker;
import org.apache.qpid.server.model.ManagedObject;
+import org.apache.qpid.server.model.ManagedObjectFactoryConstructor;
import org.apache.qpid.server.plugin.DurableConfigurationStoreFactory;
import org.apache.qpid.server.store.MemoryMessageStoreFactory;
import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
@@ -33,9 +33,10 @@ import org.apache.qpid.server.virtualhostnode.AbstractStandardVirtualHostNode;
public class MemoryVirtualHostNode extends AbstractStandardVirtualHostNode<MemoryVirtualHostNode>
{
- public MemoryVirtualHostNode(Broker<?> parent, Map<String, Object> attributes, TaskExecutor taskExecutor)
+ @ManagedObjectFactoryConstructor
+ public MemoryVirtualHostNode(Map<String, Object> attributes, Broker<?> parent)
{
- super(parent, attributes, taskExecutor);
+ super(attributes, parent);
}
@Override
diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNodeFactory.java b/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNodeFactory.java
deleted file mode 100644
index f19ff037de..0000000000
--- a/qpid/java/broker-plugins/memory-store/src/main/java/org/apache/qpid/server/virtualhostnode/memory/MemoryVirtualHostNodeFactory.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.virtualhostnode.memory;
-
-import java.util.Map;
-
-import org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory;
-import org.apache.qpid.server.model.Broker;
-import org.apache.qpid.server.model.ConfiguredObject;
-
-public class MemoryVirtualHostNodeFactory extends AbstractConfiguredObjectTypeFactory<MemoryVirtualHostNode>
-{
-
- public MemoryVirtualHostNodeFactory()
- {
- super(MemoryVirtualHostNode.class);
- }
-
- @Override
- protected MemoryVirtualHostNode createInstance(Map<String, Object> attributes, ConfiguredObject<?>... parents)
- {
- Broker<?> broker = getParent(Broker.class, parents);
- return new MemoryVirtualHostNode(broker, attributes, broker.getTaskExecutor());
- }
-
-}
diff --git a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory b/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
deleted file mode 100644
index a29a1b43f9..0000000000
--- a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.ConfiguredObjectTypeFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.virtualhostnode.memory.MemoryVirtualHostNodeFactory
diff --git a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory b/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
deleted file mode 100644
index 02f22eb21a..0000000000
--- a/qpid/java/broker-plugins/memory-store/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.MessageStoreFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.store.MemoryMessageStoreFactory
diff --git a/qpid/java/broker-plugins/websocket/build.xml b/qpid/java/broker-plugins/websocket/build.xml
index fc3dd3b846..05fb0f3286 100644
--- a/qpid/java/broker-plugins/websocket/build.xml
+++ b/qpid/java/broker-plugins/websocket/build.xml
@@ -17,7 +17,7 @@
- under the License.
-->
<project name="Qpid Broker-Plugins Websocket Transport" default="build">
- <property name="module.depends" value="common broker-core" />
+ <property name="module.depends" value="common broker-core broker-codegen" />
<property name="module.test.depends" value="qpid-test-utils broker-core/tests" />
<property name="module.genpom" value="true"/>
diff --git a/qpid/java/broker-plugins/websocket/pom.xml b/qpid/java/broker-plugins/websocket/pom.xml
index 48fc79becd..deec92412b 100644
--- a/qpid/java/broker-plugins/websocket/pom.xml
+++ b/qpid/java/broker-plugins/websocket/pom.xml
@@ -37,6 +37,14 @@
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker-codegen</artifactId>
+ <version>${project.version}</version>
+ <optional>true</optional>
+ </dependency>
+
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
@@ -66,4 +74,4 @@
<build>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java b/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java
index e7c5a786b5..e3db7e3686 100644
--- a/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java
+++ b/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketTransportProviderFactory.java
@@ -20,16 +20,17 @@
*/
package org.apache.qpid.server.transport.websocket;
-import org.apache.qpid.server.model.Transport;
-import org.apache.qpid.server.plugin.TransportProviderFactory;
-import org.apache.qpid.server.transport.TransportProvider;
-
import java.util.Arrays;
-import java.util.Collections;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
+import org.apache.qpid.server.model.Transport;
+import org.apache.qpid.server.plugin.PluggableService;
+import org.apache.qpid.server.plugin.TransportProviderFactory;
+import org.apache.qpid.server.transport.TransportProvider;
+
+@PluggableService
public class WebSocketTransportProviderFactory implements TransportProviderFactory
{
diff --git a/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory b/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory
deleted file mode 100644
index 55b88cc7be..0000000000
--- a/qpid/java/broker-plugins/websocket/src/main/resources/META-INF/services/org.apache.qpid.server.plugin.TransportProviderFactory
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-org.apache.qpid.server.transport.websocket.WebSocketTransportProviderFactory \ No newline at end of file
diff --git a/qpid/java/build.xml b/qpid/java/build.xml
index f73c5b3588..97ae9675ee 100644
--- a/qpid/java/build.xml
+++ b/qpid/java/build.xml
@@ -34,7 +34,7 @@
<findSubProjects name="broker-plugins" dir="broker-plugins" excludes="${broker-plugins-exclude}"/>
<findSubProjects name="client-plugins" dir="client-plugins"/>
- <property name="modules.core" value="qpid-test-utils common management/common amqp-1-0-common broker-core broker client amqp-1-0-client amqp-1-0-client-jms amqp-1-0-client-websocket tools"/>
+ <property name="modules.core" value="qpid-test-utils common management/common amqp-1-0-common broker-codegen broker-core broker client amqp-1-0-client amqp-1-0-client-jms amqp-1-0-client-websocket tools"/>
<property name="modules.examples" value="client/example management/example amqp-1-0-client/example amqp-1-0-client-jms/example"/>
<property name="modules.tests" value="systests perftests qpid-perftests-systests"/>
<property name="modules.plugin" value="${broker-plugins} ${client-plugins}"/>
diff --git a/qpid/java/module.xml b/qpid/java/module.xml
index f6fac567c1..94063765b7 100644
--- a/qpid/java/module.xml
+++ b/qpid/java/module.xml
@@ -59,7 +59,7 @@
<property name="module.src.resources" location="src/main/resources"/>
<property name="module.src.resources.metainf" location="${module.src.resources}/META-INF"/>
<property name="module.resources.dir" location="resources/"/>
- <property name="module.metainf" location="${module.build}/META-INF"/>
+ <property name="module.metainf" location="${module.build}/classes/META-INF"/>
<property name="module.namever" value="${project.name}-${module.name}-${project.version}"/>
<property name="module.namever.osgi" value="${project.name}-${module.name}_${project.version}.0.osgi"/>
diff --git a/qpid/java/pom.xml b/qpid/java/pom.xml
index 69b4cb706c..eb4658ccc6 100644
--- a/qpid/java/pom.xml
+++ b/qpid/java/pom.xml
@@ -77,6 +77,7 @@
<module>amqp-1-0-client</module>
<module>amqp-1-0-client-jms</module>
<module>amqp-1-0-client-websocket</module>
+ <module>broker-codegen</module>
<module>broker-core</module>
<module>broker</module>
<module>broker-plugins/access-control</module>