NO-JIRA: a few additions and tweaks around OSGI

This commit is contained in:
Clebert Suconic 2016-10-19 13:15:59 -04:00
parent b1804da00c
commit b7d79f328f
3 changed files with 23 additions and 14 deletions

View File

@ -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());
}

View File

@ -6,10 +6,12 @@ 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
```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
@ -18,6 +20,7 @@ This will add Artemis related features
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

View File

@ -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,6 +107,7 @@ 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"),
// uncomment this to debug it.
// debugConfiguration("5005", true),
features(getArtemisMQKarafFeatureUrl(), f.toArray(new String[f.size()]))};