Commit 90ebdc87 authored by bseeger's avatar bseeger
Browse files

Merge branch 'jndi-names' into 'master'

Jndi names

Resolves #16 


See merge request !66
parents 98f8bf60 f1ce6fbf
......@@ -14,7 +14,7 @@
</cm:default-properties>
</cm:property-placeholder>
<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=acrepobroker)"/>
<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=acrepo/Broker)"/>
<camelContext id="AcrepoConnectorBroadcast" xmlns="http://camel.apache.org/schema/blueprint">
<route id="MessageBroadcaster">
......
......@@ -22,15 +22,15 @@
</cm:default-properties>
</cm:property-placeholder>
<reference id="dataSource" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=idiomaticds)"/>
<reference id="dataService" interface="javax.sql.DataSource" filter="(osgi.jndi.service.name=jdbc/idiomaticds)"/>
<reference id="minterService" interface="java.util.function.Supplier" filter="(osgi.jndi.service.name=minter)" />
<reference id="minterService" interface="java.util.function.Supplier" filter="(osgi.jndi.service.name=acrepo/Minter)"/>
<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=acrepobroker)"/>
<reference id="broker" interface="org.apache.camel.Component" filter="(osgi.jndi.service.name=acrepo/Broker)"/>
<!-- component-wide configuration of jdbc -->
<bean id="sql" class="org.apache.camel.component.sql.SqlComponent">
<property name="dataSource" ref="dataSource"/>
<property name="dataSource" ref="dataService"/>
</bean>
<camelContext xmlns="http://camel.apache.org/schema/blueprint">
......
......@@ -85,11 +85,11 @@ public class RouteTest extends CamelBlueprintTestSupport {
@Override
protected void addServicesOnStartup(final Map<String, KeyValueHolder<Object, Dictionary>> services) {
services.put(DataSource.class.getName(),
asService(new EmbeddedDataSource(), "osgi.jndi.service.name", "idiomaticds"));
asService(new EmbeddedDataSource(), "osgi.jndi.service.name", "jdbc/idiomaticds"));
services.put(Supplier.class.getName(),
asService(new MinterService(MINT_LENGTH), "osgi.jndi.service.name", "minter"));
asService(new MinterService(MINT_LENGTH), "osgi.jndi.service.name", "acrepo/Minter"));
services.put(Component.class.getName(),
asService(new SedaComponent(), "osgi.jndi.service.name", "acrepobroker"));
asService(new SedaComponent(), "osgi.jndi.service.name", "acrepo/Broker"));
}
@Test
......
......@@ -18,7 +18,7 @@
</cm:default-properties>
</cm:property-placeholder>
<reference id="jsonldService" interface="edu.amherst.acdc.services.jsonld.JsonLdService" filter="(osgi.jndi.service.name=jsonld)" />
<reference id="jsonldService" interface="edu.amherst.acdc.services.jsonld.JsonLdService" filter="(osgi.jndi.service.name=acrepo/JsonLD)" />
<camelContext id="AcrepoJsonLdService" xmlns="http://camel.apache.org/schema/blueprint">
<package>edu.amherst.acdc.exts.jsonld</package>
......
......@@ -18,7 +18,7 @@
</cm:default-properties>
</cm:property-placeholder>
<reference id="pcdmService" interface="edu.amherst.acdc.services.pcdm.PcdmService" filter="(osgi.jndi.service.name=pcdm)" />
<reference id="pcdmService" interface="edu.amherst.acdc.services.pcdm.PcdmService" filter="(osgi.jndi.service.name=acrepo/Pcdm)" />
<camelContext id="AcrepoExtPcdm" xmlns="http://camel.apache.org/schema/blueprint">
<package>edu.amherst.acdc.exts.pcdm</package>
......
......@@ -21,7 +21,7 @@
</cm:default-properties>
</cm:property-placeholder>
<reference id="jsonldService" interface="edu.amherst.acdc.services.jsonld.JsonLdService" filter="(osgi.jndi.service.name=jsonld)" />
<reference id="jsonldService" interface="edu.amherst.acdc.services.jsonld.JsonLdService" filter="(osgi.jndi.service.name=acrepo/JsonLD)" />
<camelContext id="AcrepoTemplateService" xmlns="http://camel.apache.org/schema/blueprint" streamCache="false">
<package>edu.amherst.acdc.exts.template</package>
......
......@@ -10,15 +10,9 @@
</parent>
<artifactId>acrepo-itests</artifactId>
<packaging>bundle</packaging>
<name>Karaf Integration tests for repository services</name>
<properties>
<!-- osgi bundle configuration -->
<osgi.import.packages>*</osgi.import.packages>
</properties>
<dependencies>
<dependency>
<groupId>org.fcrepo.camel</groupId>
......@@ -388,12 +382,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<!-- to generate the MANIFEST-FILE of the bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
</plugin>
<!--Bring in fcrepo webapp for integration testing-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......
......@@ -74,7 +74,7 @@ public class AcrepoPcdmIT extends AbstractOSGiIT {
.versionAsInProject().type("zip"))
.unpackDirectory(new File("target", "exam"))
.useDeployFolder(false),
logLevel(LogLevel.INFO),
logLevel(LogLevel.WARN),
keepRuntimeFolder(),
configureConsole().ignoreLocalConsole(),
features(maven().groupId("org.apache.karaf.features").artifactId("standard")
......@@ -169,7 +169,6 @@ public class AcrepoPcdmIT extends AbstractOSGiIT {
final String page4 = post(members);
final String response = get(baseSvcUrl + pcdmObj.replace(baseUrl, ""), "application/ld+json");
LOGGER.info(response);
final InputStream input = new ByteArrayInputStream(response.getBytes(UTF_8));
final Model model = createDefaultModel();
......
......@@ -73,13 +73,16 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
configureConsole().ignoreLocalConsole(),
features(maven().groupId("org.apache.karaf.features").artifactId("standard")
.versionAsInProject().classifier("features").type("xml"), "scr"),
features(maven().groupId("org.ops4j.pax.jdbc").artifactId("pax-jdbc-features")
.type("xml").classifier("features"), "pax-jdbc-config",
"pax-jdbc-h2"),
features(maven().groupId("org.apache.camel.karaf").artifactId("apache-camel")
.type("xml").classifier("features").versionAsInProject(), "camel-blueprint"),
features(maven().groupId("org.apache.activemq").artifactId("activemq-karaf")
.type("xml").classifier("features").versionAsInProject(), "activemq-camel"),
features(maven().groupId("edu.amherst.acdc").artifactId("acrepo-karaf")
.type("xml").classifier("features").versionAsInProject(),
"acrepo-connector-broadcast", "acrepo-connector-idiomatic", "acrepo-connector-idiomatic-pgsql",
"acrepo-connector-broadcast", "acrepo-connector-idiomatic",
"acrepo-exts-fits", "acrepo-exts-image", "acrepo-exts-jsonld", "acrepo-exts-pcdm",
"acrepo-exts-serialize-xml", "acrepo-exts-template",
......@@ -88,7 +91,8 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
"acrepo-libs-jackson", "acrepo-libs-marmotta",
"acrepo-services-activemq", "acrepo-services-inference", "acrepo-services-jsonld",
"acrepo-services-ldcache", "acrepo-services-mint", "acrepo-services-pcdm"),
"acrepo-services-ldcache", "acrepo-services-ldcache-file", "acrepo-services-mint",
"acrepo-services-pcdm"),
editConfigurationFilePut("etc/edu.amherst.acdc.exts.fits.cfg", "rest.port", fitsPort),
editConfigurationFilePut("etc/edu.amherst.acdc.exts.image.cfg", "rest.port", imagePort),
......@@ -97,6 +101,9 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
editConfigurationFilePut("etc/edu.amherst.acdc.exts.serialize.xml.cfg", "rest.port", metadataPort),
editConfigurationFilePut("etc/edu.amherst.acdc.exts.template.cfg", "rest.port", templatePort),
editConfigurationFilePut("etc/edu.amherst.acdc.connector.idiomatic.cfg", "rest.port", idiomaticPort),
editConfigurationFilePut("etc/org.ops4j.datasource-idiomatic.cfg", "osgi.jdbc.driver.name", "H2-pool-xa"),
editConfigurationFilePut("etc/org.ops4j.datasource-idiomatic.cfg", "url", "jdbc:h2:mem:idiomatic"),
editConfigurationFilePut("etc/org.ops4j.datasource-idiomatic.cfg", "dataSourceName", "idiomaticds"),
editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiRegistryPort", rmiRegistryPort),
editConfigurationFilePut("etc/org.apache.karaf.management.cfg", "rmiServerPort", rmiServerPort),
editConfigurationFilePut("etc/org.apache.karaf.shell.cfg", "sshPort", sshPort)
......@@ -109,7 +116,6 @@ public class AcrepoServicesIT extends AbstractOSGiIT {
assertTrue(featuresService.isInstalled(featuresService.getFeature("fcrepo-camel")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-connector-broadcast")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-connector-idiomatic")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-connector-idiomatic-pgsql")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-exts-fits")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-exts-image")));
assertTrue(featuresService.isInstalled(featuresService.getFeature("acrepo-exts-jsonld")));
......
......@@ -9,6 +9,7 @@
<details>Installs the id mapping service</details>
<feature>jndi</feature>
<feature>jdbc</feature>
<feature version="${camel.version}">camel</feature>
<feature version="${camel.version}">camel-blueprint</feature>
......@@ -32,8 +33,7 @@
<feature>transaction</feature>
<feature>pax-jdbc-config</feature>
<feature>pax-jdbc-postgresql</feature>
<bundle>mvn:org.postgresql/postgresql/${postgresql.version}</bundle>
<feature>pax-jdbc-pool-dbcp2</feature>
<configfile finalname="/etc/org.ops4j.datasource-idiomatic.cfg">mvn:edu.amherst.acdc/acrepo-connector-idiomatic-pgsql/${project.version}/cfg/configuration</configfile>
</feature>
......
......@@ -25,7 +25,7 @@
<service ref="activemq" interface="org.apache.camel.Component">
<service-properties>
<entry key="osgi.jndi.service.name" value="acrepobroker"/>
<entry key="osgi.jndi.service.name" value="acrepo/Broker"/>
</service-properties>
</service>
......
......@@ -11,7 +11,7 @@
<service ref="inferenceServiceBean" interface="edu.amherst.acdc.services.inference.InferenceService">
<service-properties>
<entry key="osgi.jndi.service.name" value="inference"/>
<entry key="osgi.jndi.service.name" value="acrepo/Inference"/>
</service-properties>
</service>
......
......@@ -11,7 +11,7 @@
<service ref="jsonLdServiceBean" interface="edu.amherst.acdc.services.jsonld.JsonLdService">
<service-properties>
<entry key="osgi.jndi.service.name" value="jsonld"/>
<entry key="osgi.jndi.service.name" value="acrepo/JsonLD"/>
</service-properties>
</service>
......
......@@ -7,7 +7,7 @@
http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd"
default-activation="lazy">
<cm:property-placeholder persistent-id="edu.amherst.acdc.services.ldcache" update-strategy="reload" >
<cm:property-placeholder persistent-id="edu.amherst.acdc.services.ldcache.file" update-strategy="reload" >
<cm:default-properties>
<cm:property name="ldcache.cacheDir" value="/tmp/ldcache"/>
</cm:default-properties>
......@@ -19,7 +19,7 @@
<service ref="ldcacheBackendBean" interface="org.apache.marmotta.ldcache.api.LDCachingBackend">
<service-properties>
<entry key="osgi.jndi.service.name" value="cachingbackend"/>
<entry key="osgi.jndi.service.name" value="acrepo/LDCacheBackend"/>
</service-properties>
</service>
......
......@@ -13,7 +13,7 @@
</cm:default-properties>
</cm:property-placeholder>
<reference id="cachingBackend" interface="org.apache.marmotta.ldcache.api.LDCachingBackend" filter="(osgi.jndi.service.name=cachingbackend)"/>
<reference id="cachingBackend" interface="org.apache.marmotta.ldcache.api.LDCachingBackend" filter="(osgi.jndi.service.name=acrepo/LDCacheBackend)"/>
<bean id="ldcacheServiceBean" class="edu.amherst.acdc.services.ldcache.LDCacheServiceImpl">
<argument ref="cachingBackend"/>
......@@ -22,7 +22,7 @@
<service ref="ldcacheServiceBean" interface="edu.amherst.acdc.services.ldcache.LDCacheService">
<service-properties>
<entry key="osgi.jndi.service.name" value="ldcache"/>
<entry key="osgi.jndi.service.name" value="acrepo/LDCache"/>
</service-properties>
</service>
......
......@@ -3,7 +3,7 @@ Repository ID Minting Service
This module mints random IDs for use with a repository. The service is used with
the `acrepo-idiomatic` service, but it can be replaced with any service that
implements the same interface, using `osgi.jndi.service.name=minter`.
implements the same interface, using `osgi.jndi.service.name=acrepo/Minter`.
Building
--------
......
......@@ -19,7 +19,7 @@
<service ref="minterServiceBean" interface="java.util.function.Supplier">
<service-properties>
<entry key="osgi.jndi.service.name" value="minter"/>
<entry key="osgi.jndi.service.name" value="acrepo/Minter"/>
</service-properties>
</service>
......
......@@ -11,7 +11,7 @@
<service ref="pcdmServiceBean" interface="edu.amherst.acdc.services.pcdm.PcdmService">
<service-properties>
<entry key="osgi.jndi.service.name" value="pcdm"/>
<entry key="osgi.jndi.service.name" value="acrepo/Pcdm"/>
</service-properties>
</service>
......
......@@ -90,7 +90,7 @@
<!-- test gear -->
<fcrepo.version>4.5.1</fcrepo.version>
<karaf.version>4.0.5</karaf.version>
<karaf.version>4.0.4</karaf.version>
<pax-exam.version>4.8.0</pax-exam.version>
<jena.fuseki.version>2.3.1</jena.fuseki.version>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment