Re: [osgi-dev] [FDC-External]: Re: Enroute Tutorial - generating indexes

2019-08-22 Thread Matthews, Kevin via osgi-dev
Hi Tim,

I was referring to the bundle versions not automatically generated in the 
bundle list. I am using Bndtools eclipse plugin and I drag and drop bundles but 
it doesn’t create semantic version of those bundles only the bundle symbolic 
names so I still have to manually add the version for each bundle from running 
mvn package output. Also, the  requirement bundle is different from the example 
in the enroute tutorial. As enroute tutorial has bnd.entity this is not in bnd 
generation output. Would this be a problem using the requirement output from 
Eclipse

[cid:image001.png@01D558FC.8D627320]


bnd.identity;version='0.0.1.201801031655';id='org.osgi.enroute.examples.microservice.rest-app'

index: target/index.xml;name="acm"

-standalone: ${index}

-runrequires: 
osgi.identity;filter:='(osgi.identity=com.abc.zyx.men.cbs-service)',\
osgi.identity;filter:='(osgi.identity=org.apache.johnzon.core)',\
osgi.identity;filter:='(osgi.identity=org.h2)',\
osgi.identity;filter:='(osgi.identity=com.abc.zyx.xbs)'
-runfw: org.eclipse.osgi
-runee: JavaSE-1.8

I am also getting  error below as javax.persistence.spi.PersistenceProvider is 
required when I try to resolve. <- Do I need to add this bundle?

[ERROR] Resolution failed. Capabilities satisfying the following requirements 
could not be found:
[<>]
  ? osgi.identity: (osgi.identity=com.abc.xyz.acm)
[org.apache.aries.jpa.container version=2.7.0]
  ? osgi.service: (objectClass=javax.persistence.spi.PersistenceProvider)
The following requirements are optional:


Thanks,

Kevin Matthews
Sr Application Analyst – Rapid Connect Development
Global Business Solutions
Office: 954-845-4222 | Mobile: 561-465-6694
kevin.matth...@firstdata.com

[../../542772%20Day%20One%20Collateral/DayOne%20Logo%20Files%202-22-19/Primary-Stair-stepped-SMALL%20USAGE/FirstData-Fiserv-PrimaryLogoLockup2-small-RGB.png]

Fiserv | Join Our 
Team | Twitter | 
LinkedIn | 
Facebook
FORTUNE Magazine World's Most Admired Companies® 2014 | 2015 | 2016 | 2017 | 
2018 | 2019
© 2019 Fiserv, Inc. or its affiliates. Fiserv is a registered trademark of 
Fiserv, Inc. Privacy 
Policy






From: Tim Ward 
Sent: Thursday, August 22, 2019 12:24 PM
To: Matthews, Kevin ; OSGi Developer Mail List 

Subject: [FDC-External]: Re: [osgi-dev] Enroute Tutorial - generating indexes

Hi Kevin,

Have you installed Bndtools? If not then it is highly recommended to make your 
development more productive. You can see how it is used in 
https://enroute.osgi.org/tutorial/020-tutorial_qs.html#resolving-the-application
 - you can also drag and drop bundles from the repository view into the run 
requirements.

I hope this helps,

Best Regards,

Tim


On 22 Aug 2019, at 17:20, Matthews, Kevin via osgi-dev 
mailto:osgi-dev@mail.osgi.org>> wrote:

Hello,
I am using eclipse and osgi archetypes as define in osgi enroute tutorial. When 
I run mvn package to generate my indexes and resolve requirement capabilities 
using both eclipse and windows cmd, is there an easier way to add the required 
dependencies to the run bundles and run requirements? Or do we have to manually 
look  at all the dependencies and add to my run bundle?


[ERROR] Resolution failed. Capabilities satisfying the following requirements 
could not be found:
[<>]
  ? osgi.identity: (osgi.identity=com.abc.service.app)
[org.apache.aries.jpa.container version=2.7.0]
  ? osgi.service: (objectClass=javax.persistence.spi.PersistenceProvider)
The following requirements are optional:
[tx-control-provider-jdbc-xa version=1.0.0]
  ? osgi.service: (objectClass=org.osgi.service.jdbc.DataSourceFactory)
[org.apache.aries.jax.rs.whiteboard version=1.0.1]
  ? osgi.extender: (osgi.extender=osgi.serviceloader.registrar)
[com.abc.acm.cc.cm-service version=0.0.1.201908221510]
  ? osgi.service: (osgi.jaxrs.media.type=application/json)
[org.apache.felix.scr version=2.1.10]
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.apache.felix.shell)(&(version>=1.0.0)(!(version>=1.1.0
  ? osgi.wiring.package: 

Re: [osgi-dev] Enroute Tutorial - generating indexes

2019-08-22 Thread Tim Ward via osgi-dev
Hi Kevin,

Have you installed Bndtools? If not then it is highly recommended to make your 
development more productive. You can see how it is used in 
https://enroute.osgi.org/tutorial/020-tutorial_qs.html#resolving-the-application
 

 - you can also drag and drop bundles from the repository view into the run 
requirements.

I hope this helps,

Best Regards,

Tim

> On 22 Aug 2019, at 17:20, Matthews, Kevin via osgi-dev 
>  wrote:
> 
> Hello,
> I am using eclipse and osgi archetypes as define in osgi enroute tutorial. 
> When I run mvn package to generate my indexes and resolve requirement 
> capabilities using both eclipse and windows cmd, is there an easier way to 
> add the required dependencies to the run bundles and run requirements? Or do 
> we have to manually look  at all the dependencies and add to my run bundle?
>  
>  
> [ERROR] Resolution failed. Capabilities satisfying the following requirements 
> could not be found:
> [<>]
>   ? osgi.identity: (osgi.identity=com.abc.service.app)
> [org.apache.aries.jpa.container version=2.7.0]
>   ? osgi.service: (objectClass=javax.persistence.spi.PersistenceProvider)
> The following requirements are optional:
> [tx-control-provider-jdbc-xa version=1.0.0]
>   ? osgi.service: (objectClass=org.osgi.service.jdbc.DataSourceFactory)
> [org.apache.aries.jax.rs.whiteboard version=1.0.1]
>   ? osgi.extender: (osgi.extender=osgi.serviceloader.registrar)
> [com.abc.acm.cc.cm-service version=0.0.1.201908221510]
>   ? osgi.service: (osgi.jaxrs.media.type=application/json)
> [org.apache.felix.scr version=2.1.10]
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.apache.felix.shell)(&(version>=1.0.0)(!(version>=1.1.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.apache.felix.service.command)(&(version>=1.0.0)(!(version>=2.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.osgi.service.metatype)(&(version>=1.2.0)(!(version>=2.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.osgi.service.cm)(&(version>=1.6.0)(!(version>=2.0.0
> [org.apache.geronimo.specs.geronimo-saaj_1.3_spec version=1.1.0]
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.apache.geronimo.osgi.registry.api))
> [ch.qos.logback.core version=1.2.3]
>   ? osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.janino))
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.commons.compiler))
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.fusesource.jansi)(&(version>=1.9.0)(!(version>=2.0.0
>   ? osgi.wiring.package: (&(osgi.wiring.package=javax.mail.internet))
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=javax.servlet)(&(version>=3.1.0)(!(version>=4.0.0
>   ? osgi.wiring.package: (&(osgi.wiring.package=javax.mail))
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=javax.servlet.http)(&(version>=3.1.0)(!(version>=4.0.0
> [tx-control-provider-jpa-xa version=1.0.0]
>   ? osgi.service: (objectClass=org.osgi.service.jdbc.DataSourceFactory)
>   ? osgi.service: 
> (objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder)
> [org.apache.felix.configadmin version=1.9.8]
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.osgi.service.coordinator)(&(version>=1.0.0)(!(version>=2.0.0
> [ch.qos.logback.classic version=1.2.3]
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.runtime.callsite)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.runtime.wrappers)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: (&(osgi.wiring.package=sun.reflect))
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=javax.servlet)(&(version>=3.1.0)(!(version>=4.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.reflection)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.runtime.typehandling)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.runtime)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=groovy.lang)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.control.customizers)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.control)(&(version>=2.4.0)(!(version>=3.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=javax.servlet.http)(&(version>=3.1.0)(!(version>=4.0.0
>   ? osgi.wiring.package: 
> (&(osgi.wiring.package=org.codehaus.groovy.transform)(&(version>=2.4.0)(!(version>=3.0.0
> [org.apache.felix.http.jetty version=4.0.6]
>

[osgi-dev] Enroute Tutorial - generating indexes

2019-08-22 Thread Matthews, Kevin via osgi-dev
Hello,
I am using eclipse and osgi archetypes as define in osgi enroute tutorial. When 
I run mvn package to generate my indexes and resolve requirement capabilities 
using both eclipse and windows cmd, is there an easier way to add the required 
dependencies to the run bundles and run requirements? Or do we have to manually 
look  at all the dependencies and add to my run bundle?


[ERROR] Resolution failed. Capabilities satisfying the following requirements 
could not be found:
[<>]
  ? osgi.identity: (osgi.identity=com.abc.service.app)
[org.apache.aries.jpa.container version=2.7.0]
  ? osgi.service: (objectClass=javax.persistence.spi.PersistenceProvider)
The following requirements are optional:
[tx-control-provider-jdbc-xa version=1.0.0]
  ? osgi.service: (objectClass=org.osgi.service.jdbc.DataSourceFactory)
[org.apache.aries.jax.rs.whiteboard version=1.0.1]
  ? osgi.extender: (osgi.extender=osgi.serviceloader.registrar)
[com.abc.acm.cc.cm-service version=0.0.1.201908221510]
  ? osgi.service: (osgi.jaxrs.media.type=application/json)
[org.apache.felix.scr version=2.1.10]
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.apache.felix.shell)(&(version>=1.0.0)(!(version>=1.1.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.apache.felix.service.command)(&(version>=1.0.0)(!(version>=2.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.osgi.service.metatype)(&(version>=1.2.0)(!(version>=2.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.osgi.service.cm)(&(version>=1.6.0)(!(version>=2.0.0
[org.apache.geronimo.specs.geronimo-saaj_1.3_spec version=1.1.0]
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.apache.geronimo.osgi.registry.api))
[ch.qos.logback.core version=1.2.3]
  ? osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.janino))
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.commons.compiler))
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.fusesource.jansi)(&(version>=1.9.0)(!(version>=2.0.0
  ? osgi.wiring.package: (&(osgi.wiring.package=javax.mail.internet))
  ? osgi.wiring.package: 
(&(osgi.wiring.package=javax.servlet)(&(version>=3.1.0)(!(version>=4.0.0
  ? osgi.wiring.package: (&(osgi.wiring.package=javax.mail))
  ? osgi.wiring.package: 
(&(osgi.wiring.package=javax.servlet.http)(&(version>=3.1.0)(!(version>=4.0.0
[tx-control-provider-jpa-xa version=1.0.0]
  ? osgi.service: (objectClass=org.osgi.service.jdbc.DataSourceFactory)
  ? osgi.service: 
(objectClass=org.osgi.service.jpa.EntityManagerFactoryBuilder)
[org.apache.felix.configadmin version=1.9.8]
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.osgi.service.coordinator)(&(version>=1.0.0)(!(version>=2.0.0
[ch.qos.logback.classic version=1.2.3]
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.runtime.callsite)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.runtime.wrappers)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: (&(osgi.wiring.package=sun.reflect))
  ? osgi.wiring.package: 
(&(osgi.wiring.package=javax.servlet)(&(version>=3.1.0)(!(version>=4.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.reflection)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.runtime.typehandling)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.runtime)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=groovy.lang)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.control.customizers)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.control)(&(version>=2.4.0)(!(version>=3.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=javax.servlet.http)(&(version>=3.1.0)(!(version>=4.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.codehaus.groovy.transform)(&(version>=2.4.0)(!(version>=3.0.0
[org.apache.felix.http.jetty version=4.0.6]
  ? osgi.wiring.package: (&(osgi.wiring.package=org.slf4j.helpers))
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.osgi.service.cm)(&(version>=1.3.0)(!(version>=2.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.osgi.service.metatype)(&(version>=1.1.0)(!(version>=2.0.0
  ? osgi.wiring.package: (&(osgi.wiring.package=org.slf4j.spi))
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.osgi.service.event)(&(version>=1.2.0)(!(version>=2.0.0
  ? osgi.wiring.package: 
(&(osgi.wiring.package=org.osgi.service.useradmin)(&(version>=1.1.0)(!(version>=2.0.0
  ? osgi.wiring.package: (&(osgi.wiring.package=org.slf4j))

[osgi-dev] Recent comparison of OSGi and JPMS

2019-08-22 Thread Leschke, Scott via osgi-dev
Would anybody be able point me to a recent comparison of OSGi (R7 preferable) 
and JPMS (and Spring perhaps)?

Regards,

Scott Leschke
Medline Industries Inc.
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Migrating a service provider interface to OSGi that's similar to SPI

2019-08-22 Thread Peter Firmstone via osgi-dev

Thanks Tim,

The strings are URL's for configuration files, from the client.

I'll go with the additional level of indirection.

It's interesting that you're from Paremus, this was the last part of the 
codebase that needed to be converted to OSGi, everything has now been 
converted to bundles and all ServiceFactory's converted to OSGi services.


So here's why I thought it interesting; the codebase is a fork of Apache 
River, most of it will make its way back to River.  Of course, there 
have been a lot of changes since when Paremus was using it in the Jini 
days, many, many, many bug fixes, no need for codebase annotations in 
streams, proxy bundles are identical at both endpoints, the service 
depends on the proxy bundle, the client and the proxy bundle both depend 
on the service interface.  No more proxy verification after 
deserialization, authentication first, followed by hardened atomic 
deserialization (using constructors), then constraints.  Supports the 
latest TLS protocols. There's also a lookup service that returns results 
without causing service proxy downloads, that now happens after 
authentication and local filtering.  It also has an extremely fast and 
parallel policy provider,it avoids unnecessary DNS calls, has a RFC3986 
compliant Uri class that also normalizes IPv6 addresses following 
RFC5952 recommendations. It has an RFC3986URLClassLoader, so 
SecureClassLoader doesn't make unnessary DNS calls. Oh it also has IPv6 
muticast discovery.   Built with Maven now, no more ClassDepandJar.


That's just a summary of course.  Never really did get why many Jini 
people didn't recognise the benefit OSGi would have provided way back.


Thanks for your help, perhaps if you're interest you might cast an eye 
over it for me. :)


Cheers,

Peter.


On 22/08/2019 7:40 PM, Tim Ward wrote:

Hello,

When you say that each client needs a different service instance, would a 
bundle need more than one instance (i.e. would a ServiceFactory be sufficient 
or does it need to be a PrototypeServiceFactory)?

Also, where are the Strings in the String array coming from? If those are 
passed in by the client then you may need an intermediate “factory service” 
from which the bundles request instances of the provider.

Otherwise, it sounds as though this would be pretty simple to achieve. The 
ServiceFactory gives you access to the requesting bundle, which in turn gives 
you the class loader that you need.

All the best,

Tim


On 22 Aug 2019, at 05:58, Peter Firmstone via osgi-dev  
wrote:

Hello,

I'm trying to migrate a custom provider interface to register OSGi services.

This is a pre existing implementation, functionally similar to Java's SPI, with 
one caveat; it doesn't use a zero arg constructor.

The constructor has two arguments an array of strings, and a ClassLoader.

Otherwise for all intents and purposes, it's an SPI, implementing services use 
a META-INF services file.

The interface for the service exists and has implementations.

The ClassLoader passed in is used to resolve classes from the service client.

It doesn't use the Java SPI mechanism, so we have access to the code that 
creates the service.

Each client will require a different Service instance.

I was thinking something like a Service Factory might do the job, any thoughts 
or advice?

Thanks in adv,

Peter.
___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev


___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Migrating a service provider interface to OSGi that's similar to SPI

2019-08-22 Thread Tim Ward via osgi-dev
Hello,

When you say that each client needs a different service instance, would a 
bundle need more than one instance (i.e. would a ServiceFactory be sufficient 
or does it need to be a PrototypeServiceFactory)?

Also, where are the Strings in the String array coming from? If those are 
passed in by the client then you may need an intermediate “factory service” 
from which the bundles request instances of the provider.

Otherwise, it sounds as though this would be pretty simple to achieve. The 
ServiceFactory gives you access to the requesting bundle, which in turn gives 
you the class loader that you need.

All the best,

Tim 

> On 22 Aug 2019, at 05:58, Peter Firmstone via osgi-dev 
>  wrote:
> 
> Hello,
> 
> I'm trying to migrate a custom provider interface to register OSGi services.
> 
> This is a pre existing implementation, functionally similar to Java's SPI, 
> with one caveat; it doesn't use a zero arg constructor.
> 
> The constructor has two arguments an array of strings, and a ClassLoader.
> 
> Otherwise for all intents and purposes, it's an SPI, implementing services 
> use a META-INF services file.
> 
> The interface for the service exists and has implementations.
> 
> The ClassLoader passed in is used to resolve classes from the service client.
> 
> It doesn't use the Java SPI mechanism, so we have access to the code that 
> creates the service.
> 
> Each client will require a different Service instance.
> 
> I was thinking something like a Service Factory might do the job, any 
> thoughts or advice?
> 
> Thanks in adv,
> 
> Peter.
> ___
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

___
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev