ARTEMIS-898 Documenting where to add the plugin jar

This commit is contained in:
Clebert Suconic 2017-05-08 12:22:50 -04:00
parent 890e381371
commit c53f6168c9
2 changed files with 8 additions and 3 deletions

View File

@ -597,6 +597,7 @@ public class Create extends InputAbstract {
new File(directory, "etc").mkdirs();
new File(directory, "log").mkdirs();
new File(directory, "tmp").mkdirs();
new File(directory, "lib").mkdirs();
File dataFolder = new File(directory, "data");
dataFolder.mkdirs();

View File

@ -8,11 +8,15 @@ is always executed first).
Creating a plugin is very simple. It requires implementing the [`ActiveMQServerPlugin`](../../../artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/ActiveMQServerPlugin.java)
interface, making sure the plugin is on the classpath, and registering it with the broker. Only the methods that you want to add behavior for need to be implemented as all of the interface methods are default methods.
## Adding the plugin to the classpath
The proper place to add your jar would be under $ARTEMIS_INSTANCE/lib.
If you are using an embed system than you will need the jar under the regular classpath of your embedded application.
## Registering a Plugin
To register a plugin with by XML you need to add the `broker-plugins` element.
`broker.xml` in your classpath:
To register a plugin with by XML you need to add the `broker-plugins` element at the `broker.xml`.
```xml
<configuration ...>