NO-JIRA: a few additions and tweaks around OSGI
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b7d79f32 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b7d79f32 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b7d79f32 Branch: refs/heads/ARTEMIS-780 Commit: b7d79f328fc9d52e05b05fd2d5fcb5b9464dd76d Parents: b1804da Author: Clebert Suconic <[email protected]> Authored: Wed Oct 19 13:15:59 2016 -0400 Committer: Clebert Suconic <[email protected]> Committed: Wed Oct 19 13:19:10 2016 -0400 ---------------------------------------------------------------------- .../core/server/reload/ReloadManagerImpl.java | 4 ++-- docs/user-manual/en/karaf.md | 25 +++++++++++--------- .../integration/karaf/ArtemisFeatureTest.java | 8 ++++++- 3 files changed, 23 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b7d79f32/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/reload/ReloadManagerImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/reload/ReloadManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/reload/ReloadManagerImpl.java index cad3f33..2ff04f4 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/reload/ReloadManagerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/reload/ReloadManagerImpl.java @@ -93,9 +93,9 @@ public class ReloadManagerImpl extends ActiveMQScheduledComponent implements Rel ReloadRegistry(URL uri) { try { - file = new File(uri.toURI()); + file = new File(uri.toURI());//"file:etc/artemis.xml" } catch (Exception e) { - logger.warn(e.getMessage(), e); + logger.debug(e.getMessage(), e); file = new File(uri.getPath()); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b7d79f32/docs/user-manual/en/karaf.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/karaf.md b/docs/user-manual/en/karaf.md index 4756b9b..3dd0844 100644 --- a/docs/user-manual/en/karaf.md +++ b/docs/user-manual/en/karaf.md @@ -6,18 +6,21 @@ Apache ActiveMQ Artemis is OSGi ready. Below you can find instruction on how to Apache ActiveMQ Artemis provides features that makes it easy to install the broker on Apache Karaf (4.x or later). First you need to define the feature URL, like - karaf@root()> feature:repo-add mvn:org.apache.activemq/artemis-features/1.3.0-SNAPSHOT/xml/features +```sh +karaf@root()> feature:repo-add mvn:org.apache.activemq/artemis-features/1.3.0-SNAPSHOT/xml/features +``` This will add Artemis related features - - karaf@root()> feature:list | grep artemis - artemis | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | Full ActiveMQ Artemis broker with default configuration - netty-core | 4.0.32.Final | | Uninstalled | artemis-1.3.0-SNAPSHOT | Netty libraries - artemis-core | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis broker libraries - artemis-amqp | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis AMQP protocol libraries - artemis-stomp | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis Stomp protocol libraries - artemis-mqtt | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis MQTT protocol libraries - artemis-hornetq | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis HornetQ protocol libraries +``` +karaf@root()> feature:list | grep artemis +artemis | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | Full ActiveMQ Artemis broker with default configuration +netty-core | 4.0.32.Final | | Uninstalled | artemis-1.3.0-SNAPSHOT | Netty libraries +artemis-core | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis broker libraries +artemis-amqp | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis AMQP protocol libraries +artemis-stomp | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis Stomp protocol libraries +artemis-mqtt | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis MQTT protocol libraries +artemis-hornetq | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis HornetQ protocol libraries +``` Feature named `artemis` contains full broker installation, so running @@ -41,4 +44,4 @@ The broker is installed as `org.apache.activemq.artemis` OSGi component, so it's | domain | JAAS domain to use for security | karaf | | rolePrincipalClass | Class name used for role authorization purposes | org.apache.karaf.jaas.boot.principal.RolePrincipal | -The default broker configuration file is located in `${KARAF_BASE}/etc/artemis.xml` \ No newline at end of file +The default broker configuration file is located in `${KARAF_BASE}/etc/artemis.xml` http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b7d79f32/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java ---------------------------------------------------------------------- diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java index d1193c6..850be12 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/karaf/ArtemisFeatureTest.java @@ -64,7 +64,12 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfi import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel; +// uncomment this to be able to debug it +// import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.debugConfiguration; +/** + * Useful docs about this test: https://ops4j1.jira.com/wiki/display/paxexam/FAQ + */ @RunWith(PaxExam.class) public class ArtemisFeatureTest extends Assert { @@ -102,7 +107,8 @@ public class ArtemisFeatureTest extends Assert { Option[] options = new Option[]{karafDistributionConfiguration().frameworkUrl(maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").versionAsInProject()).unpackDirectory(new File("target/paxexam/unpack/")), KarafDistributionOption.keepRuntimeFolder(), logLevel(LogLevelOption.LogLevel.INFO), editConfigurationFilePut("etc/config.properties", "karaf.startlevel.bundle", "50"), - //debugConfiguration("5005", true), + // uncomment this to debug it. + // debugConfiguration("5005", true), features(getArtemisMQKarafFeatureUrl(), f.toArray(new String[f.size()]))}; return options;
