Re: quick question: can I use jakarta ee on Karaf?

2021-09-30 Thread Xad Kile
I see, thank you Jean-Baptiste :D

On Fri, Oct 1, 2021 at 11:30 AM Jean-Baptiste Onofré 
wrote:

> Hi Kile,
>
> Karaf by itself supports any versions (via spec bundles).
> So, yes, you can use updated versions, with for instance CXF as impl
> (for JAXRS I mean).
>
> Regards
> JB
>
> On 01/10/2021 06:28, Xad Kile wrote:
> > @Jean-Baptiste Onofré: Currently, I am using the old Java EE interfaces
> > (such as jax-rs 2.1) in my application, I am just curious if I can use
> > the new interfaces of Jakarta EE instead of the old one. If I am not
> > wrong, I think I can only use the new specification if the underlying
> > platform supports it. Is that correct?
> >
> > Regards,
> >
> > Kile
> >
> > On Fri, Oct 1, 2021 at 11:16 AM Jean-Baptiste Onofré  > > wrote:
> >
> > Hi,
> >
> > Not sure I fully get the question, but basically, I would say yes.
> >
> > Several Jakarta EE spec/impl are available in the enterprise feature
> > (JPA, JTA, etc).
> >
> > Regards
> > JB
> >
> > On 01/10/2021 06:14, Xad Kile wrote:
> >  > quick question: can I use Jakarta EE on Karaf?
> >  > Thanks :D
> >
>


Re: quick question: can I use jakarta ee on Karaf?

2021-09-30 Thread Jean-Baptiste Onofré

Hi Kile,

Karaf by itself supports any versions (via spec bundles).
So, yes, you can use updated versions, with for instance CXF as impl 
(for JAXRS I mean).


Regards
JB

On 01/10/2021 06:28, Xad Kile wrote:
@Jean-Baptiste Onofré: Currently, I am using the old Java EE interfaces 
(such as jax-rs 2.1) in my application, I am just curious if I can use 
the new interfaces of Jakarta EE instead of the old one. If I am not 
wrong, I think I can only use the new specification if the underlying 
platform supports it. Is that correct?


Regards,

Kile

On Fri, Oct 1, 2021 at 11:16 AM Jean-Baptiste Onofré > wrote:


Hi,

Not sure I fully get the question, but basically, I would say yes.

Several Jakarta EE spec/impl are available in the enterprise feature
(JPA, JTA, etc).

Regards
JB

On 01/10/2021 06:14, Xad Kile wrote:
 > quick question: can I use Jakarta EE on Karaf?
 > Thanks :D



Re: quick question: can I use jakarta ee on Karaf?

2021-09-30 Thread Xad Kile
@Jean-Baptiste Onofré: Currently, I am using the old Java EE interfaces
(such as jax-rs 2.1) in my application, I am just curious if I can use the
new interfaces of Jakarta EE instead of the old one. If I am not wrong, I
think I can only use the new specification if the underlying platform
supports it. Is that correct?

Regards,

Kile

On Fri, Oct 1, 2021 at 11:16 AM Jean-Baptiste Onofré 
wrote:

> Hi,
>
> Not sure I fully get the question, but basically, I would say yes.
>
> Several Jakarta EE spec/impl are available in the enterprise feature
> (JPA, JTA, etc).
>
> Regards
> JB
>
> On 01/10/2021 06:14, Xad Kile wrote:
> > quick question: can I use Jakarta EE on Karaf?
> > Thanks :D
>


Re: quick question: can I use jakarta ee on Karaf?

2021-09-30 Thread Jean-Baptiste Onofré

Hi,

Not sure I fully get the question, but basically, I would say yes.

Several Jakarta EE spec/impl are available in the enterprise feature 
(JPA, JTA, etc).


Regards
JB

On 01/10/2021 06:14, Xad Kile wrote:

quick question: can I use Jakarta EE on Karaf?
Thanks :D


quick question: can I use jakarta ee on Karaf?

2021-09-30 Thread Xad Kile
quick question: can I use Jakarta EE on Karaf?
Thanks :D


RE: Karaf 5

2021-09-30 Thread jgfrm
Hi JB,

Thank you very much.
I look forward to dig in to it.

Best,

-- Jaap

|-Oorspronkelijk bericht-
|Van: Jean-Baptiste Onofré 
|Verzonden: donderdag 30 september 2021 18:08
|Aan: user@karaf.apache.org
|Onderwerp: Re: Karaf 5
|
|Hi Jaap,
|
|let me rebase and polish a bit and I will push a first round (probably tomorrow
|night or during the weekend). I will keep you posted.
|
|Regards
|JB
|
|On 30/09/2021 14:40, jgfrm wrote:
|> Hi JB,
|>
|> That sounds interesting!
|> Is it possible to share what you developed?
|>
|> Best,
|>
|> -- Jaap
|>
|> |-Oorspronkelijk bericht-
|> |Van: Jean-Baptiste Onofré 
|> |Verzonden: donderdag 30 september 2021 11:34
|> |Aan: user@karaf.apache.org
|> |Onderwerp: Re: Karaf 5
|> |
|> |Hi Jaap,
|> |
|> |so, yes, we are talking about the same thing ;)
|> |
|> |There are actually two parts:
|> |
|> |- registering Spring bean in the K5 service registry and use it in
|> |another apps running in K5
|> |- registering "generic" services (like the json-config-loader,
|> |extractor, etc) that provide shared resources (like HTTP handler)
|> |
|> |Regards
|> |JB
|> |
|> |On 29/09/2021 23:30, jgfrm wrote:
|> |> Perhaps.
|> |>
|> |> I want to be able to use a bean in other Spring module.
|> |>
|> |> What is also an issue it that two (or more) modules obviously
|> |> result in two
|> |sockets to be opened, in my case both 8400.
|> |> A solution could be to open a different socket per module, e.g.
|> |> negotiated
|> |with a module for that purpose that also routes traffic for a
|> |particular endpoint to the socket of the module handling that endpoint.
|> |>
|> |> In https://github.com/hank-cp/sbp (based on pf4j) they have a
|> |> different
|> |strategy; there they have one socket for REST calls, and specific
|> |endpoints are forwarded to the appropriate plugin.
|> |>
|> |> Best,
|> |>
|> |> -- Jaap
|> |>
|> |>
|> |> |-Oorspronkelijk bericht-
|> |> |Van: JB Onofré 
|> |> |Verzonden: woensdag 29 september 2021 22:17
|> |> |Aan: user@karaf.apache.org
|> |> |Onderwerp: Re: Karaf 5
|> |> |
|> |> |I started a service bridge allowing to implicit push some spring
|> |> |bean to the k5 registry and so that can be used from other modules
|> |> |running in k5. It’s a local branch for now but I can push it on main.
|> |> |
|> |> |Is it what you are looking for ?
|> |> |
|> |> |Regards
|> |> |JB
|> |> |
|> |> |> Le 29 sept. 2021 à 21:43, jgfrm  a écrit :
|> |> |>
|> |> |> Is there already something working for exporting functionality
|> |> |> of a Spring
|> |> |modules to other modules?
|> |> |>
|> |> |> |-Oorspronkelijk bericht-
|> |> |> |Van: Jean-Baptiste Onofré 
|> |> |> |Verzonden: woensdag 29 september 2021 17:26
|> |> |> |Aan: user@karaf.apache.org
|> |> |> |Onderwerp: Re: Karaf 5
|> |> |> |
|> |> |> |Thanks for the update.
|> |> |> |
|> |> |> |I'm happy to say you are the first one to "use/launch" Karaf 5
|> |> |> |;)
|> |> |> |
|> |> |> |About the TomcatURLStreamHandlerFactory is known "issue":
|> |> |> |
|> |> |> |https://github.com/jbonofre/karaf5/blob/main/services/spring-bo
|> |> |> |ot-
|> |> |> |application-
|> |> |> |manager/src/main/java/org/apache/karaf/springboot/SpringBootApp
|> |> |> |lic
|> |> |> |ati
|> |> |> |on
|> |> |> |ManagerService.java#L110
|> |> |> |
|> |> |> |I have to improve this ;)
|> |> |> |
|> |> |> |Regards
|> |> |> |JB
|> |> |> |
|> |> |> |On 29/09/2021 17:19, jgfrm wrote:
|> |> |> |> The following works:
|> |> |> |>
|> |> |> |> Karaf.json:
|> |> |> |> 
|> |> |> |> {
|> |> |> |>"applications": [
|> |> |> |>  {
|> |> |> |>"name": "e3web",
|> |> |> |>"url": "file:///home/jaap/Karaf5Test/e3web-dev.jar",
|> |> |> |>"type": "spring-boot",
|> |> |> |>"properties": {
|> |> |> |>  "enableHttp": true,
|> |> |> |>  "enablePrometheus": true
|> |> |> |>}
|> |> |> |>  }
|> |> |> |>]
|> |> |> |> }
|> |> |> |> 
|> |> |> |>
|> |> |> |> Add to Spring boot application:
|> |> |> |> 
|> |> |> |> @SpringBootApplication
|> |> |> |> @ComponentScan
|> |> |> |> public class E3webApplication {
|> |> |> |>
|> |> |> |>   ...
|> |> |> |>  public static void main(String[] args) {
|> |> |> |>  TomcatURLStreamHandlerFactory.disable();  // see
|> |> |> |https://github.com/spring-projects/spring-boot/issues/21535
|> |> |> |>  SpringApplication.run(E3webApplication.class, args);
|> |> |> |>  }
|> |> |> |> 
|> |> |> |>
|> |> |> |> Start with
|> |> |> |> java --add-modules jdk.security.jgss -cp
|> |> |> |> ../karaf5/assemblies/k4/target/k4-5.0-SNAPSHOT.jar:target/e3w
|> |> |> |> eb-
|> |> |> |> tes
|> |> |> |> t-1
|> |> |> |> .0-SNAPSHOT.jar:../karaf5/services/spring-boot-application-ma
|> |> |> |> nag er/ tar
|> |> |> |> get/spring-boot-application-manager-5.0-SNAPSHOT.jar
|> |> |> |> -Dkaraf.config=src/main/resources/karaf.json
|> |> |> |> org.apache.karaf.boot.Main
|> |> |> |>
|> |> |> |> |-Oorspronkelijk bericht-
|> |> |> |> |Van: JB Onofré 
|> 

Re: Karaf 5

2021-09-30 Thread Jean-Baptiste Onofré

Hi Jaap,

let me rebase and polish a bit and I will push a first round (probably 
tomorrow night or during the weekend). I will keep you posted.


Regards
JB

On 30/09/2021 14:40, jgfrm wrote:

Hi JB,

That sounds interesting!
Is it possible to share what you developed?

Best,

-- Jaap

|-Oorspronkelijk bericht-
|Van: Jean-Baptiste Onofré 
|Verzonden: donderdag 30 september 2021 11:34
|Aan: user@karaf.apache.org
|Onderwerp: Re: Karaf 5
|
|Hi Jaap,
|
|so, yes, we are talking about the same thing ;)
|
|There are actually two parts:
|
|- registering Spring bean in the K5 service registry and use it in another apps
|running in K5
|- registering "generic" services (like the json-config-loader, extractor, etc) 
that
|provide shared resources (like HTTP handler)
|
|Regards
|JB
|
|On 29/09/2021 23:30, jgfrm wrote:
|> Perhaps.
|>
|> I want to be able to use a bean in other Spring module.
|>
|> What is also an issue it that two (or more) modules obviously result in two
|sockets to be opened, in my case both 8400.
|> A solution could be to open a different socket per module, e.g. negotiated
|with a module for that purpose that also routes traffic for a particular
|endpoint to the socket of the module handling that endpoint.
|>
|> In https://github.com/hank-cp/sbp (based on pf4j) they have a different
|strategy; there they have one socket for REST calls, and specific endpoints are
|forwarded to the appropriate plugin.
|>
|> Best,
|>
|> -- Jaap
|>
|>
|> |-Oorspronkelijk bericht-
|> |Van: JB Onofré 
|> |Verzonden: woensdag 29 september 2021 22:17
|> |Aan: user@karaf.apache.org
|> |Onderwerp: Re: Karaf 5
|> |
|> |I started a service bridge allowing to implicit push some spring bean
|> |to the k5 registry and so that can be used from other modules running
|> |in k5. It’s a local branch for now but I can push it on main.
|> |
|> |Is it what you are looking for ?
|> |
|> |Regards
|> |JB
|> |
|> |> Le 29 sept. 2021 à 21:43, jgfrm  a écrit :
|> |>
|> |> Is there already something working for exporting functionality of
|> |> a Spring
|> |modules to other modules?
|> |>
|> |> |-Oorspronkelijk bericht-
|> |> |Van: Jean-Baptiste Onofré 
|> |> |Verzonden: woensdag 29 september 2021 17:26
|> |> |Aan: user@karaf.apache.org
|> |> |Onderwerp: Re: Karaf 5
|> |> |
|> |> |Thanks for the update.
|> |> |
|> |> |I'm happy to say you are the first one to "use/launch" Karaf 5 ;)
|> |> |
|> |> |About the TomcatURLStreamHandlerFactory is known "issue":
|> |> |
|> |> |https://github.com/jbonofre/karaf5/blob/main/services/spring-boot-
|> |> |application-
|> |> |manager/src/main/java/org/apache/karaf/springboot/SpringBootApplic
|> |> |ati
|> |> |on
|> |> |ManagerService.java#L110
|> |> |
|> |> |I have to improve this ;)
|> |> |
|> |> |Regards
|> |> |JB
|> |> |
|> |> |On 29/09/2021 17:19, jgfrm wrote:
|> |> |> The following works:
|> |> |>
|> |> |> Karaf.json:
|> |> |> 
|> |> |> {
|> |> |>"applications": [
|> |> |>  {
|> |> |>"name": "e3web",
|> |> |>"url": "file:///home/jaap/Karaf5Test/e3web-dev.jar",
|> |> |>"type": "spring-boot",
|> |> |>"properties": {
|> |> |>  "enableHttp": true,
|> |> |>  "enablePrometheus": true
|> |> |>}
|> |> |>  }
|> |> |>]
|> |> |> }
|> |> |> 
|> |> |>
|> |> |> Add to Spring boot application:
|> |> |> 
|> |> |> @SpringBootApplication
|> |> |> @ComponentScan
|> |> |> public class E3webApplication {
|> |> |>
|> |> |>   ...
|> |> |>  public static void main(String[] args) {
|> |> |>  TomcatURLStreamHandlerFactory.disable();  // see
|> |> |https://github.com/spring-projects/spring-boot/issues/21535
|> |> |>  SpringApplication.run(E3webApplication.class, args);
|> |> |>  }
|> |> |> 
|> |> |>
|> |> |> Start with
|> |> |> java --add-modules jdk.security.jgss -cp
|> |> |> ../karaf5/assemblies/k4/target/k4-5.0-SNAPSHOT.jar:target/e3web-
|> |> |> tes
|> |> |> t-1
|> |> |> .0-SNAPSHOT.jar:../karaf5/services/spring-boot-application-manag
|> |> |> er/ tar get/spring-boot-application-manager-5.0-SNAPSHOT.jar
|> |> |> -Dkaraf.config=src/main/resources/karaf.json
|> |> |> org.apache.karaf.boot.Main
|> |> |>
|> |> |> |-Oorspronkelijk bericht-
|> |> |> |Van: JB Onofré 
|> |> |> |Verzonden: dinsdag 28 september 2021 06:34
|> |> |> |Aan: user@karaf.apache.org
|> |> |> |Onderwerp: Re: Karaf 5
|> |> |> |
|> |> |> |Hi
|> |> |> |
|> |> |> |No it’s not this because k5 don’t use OSGi for the spring boot
|> |> |> |launcher. I still think it’s a missing add modules as Jvm arg.
|> |> |> |I will check
|> |> |today.
|> |> |> |
|> |> |> |Regards
|> |> |> |JB
|> |> |> |
|> |> |> |> Le 27 sept. 2021 à 23:39, jgfrm  a écrit :
|> |> |> |>
|> |> |> |> While Googling, I came across on of your blogs
|> |> |> |(http://nanthrax.blogspot.com/2021/04/whats-new-in-apache-karaf
|> |> |> |-
|> |> |> |431.html) that one of the changes in Karaf was to export the
|> |> |> |java.*
|> |> |packages.
|> |> |> |Could that be 

Re: Possible to replace Classloader of a Bundle

2021-09-30 Thread Matthias Leinweber
Ok i am not completely sure that i understand what you are doing in
CellarExtender/CombinedClassLoader/HazelcastBundleListener... or do i have
to explicitly use the CombinedClassLoader in my other bundle?
The goal was that I want to create CamelProcessors during runtime and use
them in Blueprints. My actual approach is to automatically register them as
a Service and inject them into my blueprint. This works but it can not
access a BundleContext via FramWorkUtils so I can't get a Servicetracker.

br,
Matthias

Am Mi., 29. Sept. 2021 um 14:46 Uhr schrieb Jean-Baptiste Onofré <
j...@nanthrax.net>:

> Hi,
>
> No it's not really possible without a framework extension.
> Bundle classloader is directly managed by the framework.
>
> However, you can create/federate/control classloader. It's what we do in
> Cellar using the ClassLoaderService:
>
>
> https://github.com/apache/karaf-cellar/blob/main/core/src/main/java/org/apache/karaf/cellar/core/utils/CombinedClassLoader.java
>
> You can create groovy classloader and extend it.
>
> NB: a similar ClassLoader service is in preparation in K5:
>
> https://github.com/jbonofre/karaf5/blob/main/boot/src/main/java/org/apache/karaf/boot/service/ClassLoaderService.java
> (WIP)
>
> Regards
> JB
>
> On 29/09/2021 14:42, Matthias Leinweber wrote:
> > Hello,
> >
> > Is it possible to replace the bundle classloader with another? The idea
> > behind this is that you have a groovy class loader which uses the bundle
> > class loader as a parent. Then after the initialization of the groovy
> > class loader this class loader loads additional classes during runtime.
> >
> > When I add dynamic-import to a bundle which is using my groovy dynamic
> > bundle it should be possible to use the dynamically loaded classes in
> > the other bundle.
> >
> > But unfortunately i don't find a way to replace the bundle class loader
> > .. any ideas about this?
> >
> > best regards
> > Matthias
>


RE: Karaf 5

2021-09-30 Thread jgfrm
Hi JB,

That sounds interesting!
Is it possible to share what you developed?

Best,

-- Jaap

|-Oorspronkelijk bericht-
|Van: Jean-Baptiste Onofré 
|Verzonden: donderdag 30 september 2021 11:34
|Aan: user@karaf.apache.org
|Onderwerp: Re: Karaf 5
|
|Hi Jaap,
|
|so, yes, we are talking about the same thing ;)
|
|There are actually two parts:
|
|- registering Spring bean in the K5 service registry and use it in another apps
|running in K5
|- registering "generic" services (like the json-config-loader, extractor, etc) 
that
|provide shared resources (like HTTP handler)
|
|Regards
|JB
|
|On 29/09/2021 23:30, jgfrm wrote:
|> Perhaps.
|>
|> I want to be able to use a bean in other Spring module.
|>
|> What is also an issue it that two (or more) modules obviously result in two
|sockets to be opened, in my case both 8400.
|> A solution could be to open a different socket per module, e.g. negotiated
|with a module for that purpose that also routes traffic for a particular
|endpoint to the socket of the module handling that endpoint.
|>
|> In https://github.com/hank-cp/sbp (based on pf4j) they have a different
|strategy; there they have one socket for REST calls, and specific endpoints are
|forwarded to the appropriate plugin.
|>
|> Best,
|>
|> -- Jaap
|>
|>
|> |-Oorspronkelijk bericht-
|> |Van: JB Onofré 
|> |Verzonden: woensdag 29 september 2021 22:17
|> |Aan: user@karaf.apache.org
|> |Onderwerp: Re: Karaf 5
|> |
|> |I started a service bridge allowing to implicit push some spring bean
|> |to the k5 registry and so that can be used from other modules running
|> |in k5. It’s a local branch for now but I can push it on main.
|> |
|> |Is it what you are looking for ?
|> |
|> |Regards
|> |JB
|> |
|> |> Le 29 sept. 2021 à 21:43, jgfrm  a écrit :
|> |>
|> |> Is there already something working for exporting functionality of
|> |> a Spring
|> |modules to other modules?
|> |>
|> |> |-Oorspronkelijk bericht-
|> |> |Van: Jean-Baptiste Onofré 
|> |> |Verzonden: woensdag 29 september 2021 17:26
|> |> |Aan: user@karaf.apache.org
|> |> |Onderwerp: Re: Karaf 5
|> |> |
|> |> |Thanks for the update.
|> |> |
|> |> |I'm happy to say you are the first one to "use/launch" Karaf 5 ;)
|> |> |
|> |> |About the TomcatURLStreamHandlerFactory is known "issue":
|> |> |
|> |> |https://github.com/jbonofre/karaf5/blob/main/services/spring-boot-
|> |> |application-
|> |> |manager/src/main/java/org/apache/karaf/springboot/SpringBootApplic
|> |> |ati
|> |> |on
|> |> |ManagerService.java#L110
|> |> |
|> |> |I have to improve this ;)
|> |> |
|> |> |Regards
|> |> |JB
|> |> |
|> |> |On 29/09/2021 17:19, jgfrm wrote:
|> |> |> The following works:
|> |> |>
|> |> |> Karaf.json:
|> |> |> 
|> |> |> {
|> |> |>"applications": [
|> |> |>  {
|> |> |>"name": "e3web",
|> |> |>"url": "file:///home/jaap/Karaf5Test/e3web-dev.jar",
|> |> |>"type": "spring-boot",
|> |> |>"properties": {
|> |> |>  "enableHttp": true,
|> |> |>  "enablePrometheus": true
|> |> |>}
|> |> |>  }
|> |> |>]
|> |> |> }
|> |> |> 
|> |> |>
|> |> |> Add to Spring boot application:
|> |> |> 
|> |> |> @SpringBootApplication
|> |> |> @ComponentScan
|> |> |> public class E3webApplication {
|> |> |>
|> |> |>   ...
|> |> |>  public static void main(String[] args) {
|> |> |>  TomcatURLStreamHandlerFactory.disable();  // see
|> |> |https://github.com/spring-projects/spring-boot/issues/21535
|> |> |>  SpringApplication.run(E3webApplication.class, args);
|> |> |>  }
|> |> |> 
|> |> |>
|> |> |> Start with
|> |> |> java --add-modules jdk.security.jgss -cp
|> |> |> ../karaf5/assemblies/k4/target/k4-5.0-SNAPSHOT.jar:target/e3web-
|> |> |> tes
|> |> |> t-1
|> |> |> .0-SNAPSHOT.jar:../karaf5/services/spring-boot-application-manag
|> |> |> er/ tar get/spring-boot-application-manager-5.0-SNAPSHOT.jar
|> |> |> -Dkaraf.config=src/main/resources/karaf.json
|> |> |> org.apache.karaf.boot.Main
|> |> |>
|> |> |> |-Oorspronkelijk bericht-
|> |> |> |Van: JB Onofré 
|> |> |> |Verzonden: dinsdag 28 september 2021 06:34
|> |> |> |Aan: user@karaf.apache.org
|> |> |> |Onderwerp: Re: Karaf 5
|> |> |> |
|> |> |> |Hi
|> |> |> |
|> |> |> |No it’s not this because k5 don’t use OSGi for the spring boot
|> |> |> |launcher. I still think it’s a missing add modules as Jvm arg.
|> |> |> |I will check
|> |> |today.
|> |> |> |
|> |> |> |Regards
|> |> |> |JB
|> |> |> |
|> |> |> |> Le 27 sept. 2021 à 23:39, jgfrm  a écrit :
|> |> |> |>
|> |> |> |> While Googling, I came across on of your blogs
|> |> |> |(http://nanthrax.blogspot.com/2021/04/whats-new-in-apache-karaf
|> |> |> |-
|> |> |> |431.html) that one of the changes in Karaf was to export the
|> |> |> |java.*
|> |> |packages.
|> |> |> |Could that be the cause?
|> |> |> |>
|> |> |> |> |-Oorspronkelijk bericht-
|> |> |> |> |Van: Jean-Baptiste Onofre 
|> |> |> |> |Verzonden: zondag 26 september 2021 18:02
|> |> |> |> |Aan: 

Re: Karaf 5

2021-09-30 Thread Jean-Baptiste Onofré

Hi Jaap,

so, yes, we are talking about the same thing ;)

There are actually two parts:

- registering Spring bean in the K5 service registry and use it in 
another apps running in K5
- registering "generic" services (like the json-config-loader, 
extractor, etc) that provide shared resources (like HTTP handler)


Regards
JB

On 29/09/2021 23:30, jgfrm wrote:

Perhaps.

I want to be able to use a bean in other Spring module.

What is also an issue it that two (or more) modules obviously result in two 
sockets to be opened, in my case both 8400.
A solution could be to open a different socket per module, e.g. negotiated with 
a module for that purpose that also routes traffic for a particular endpoint to 
the socket of the module handling that endpoint.

In https://github.com/hank-cp/sbp (based on pf4j) they have a different 
strategy; there they have one socket for REST calls, and specific endpoints are 
forwarded to the appropriate plugin.

Best,

-- Jaap


|-Oorspronkelijk bericht-
|Van: JB Onofré 
|Verzonden: woensdag 29 september 2021 22:17
|Aan: user@karaf.apache.org
|Onderwerp: Re: Karaf 5
|
|I started a service bridge allowing to implicit push some spring bean to the k5
|registry and so that can be used from other modules running in k5. It’s a local
|branch for now but I can push it on main.
|
|Is it what you are looking for ?
|
|Regards
|JB
|
|> Le 29 sept. 2021 à 21:43, jgfrm  a écrit :
|>
|> Is there already something working for exporting functionality of a Spring
|modules to other modules?
|>
|> |-Oorspronkelijk bericht-
|> |Van: Jean-Baptiste Onofré 
|> |Verzonden: woensdag 29 september 2021 17:26
|> |Aan: user@karaf.apache.org
|> |Onderwerp: Re: Karaf 5
|> |
|> |Thanks for the update.
|> |
|> |I'm happy to say you are the first one to "use/launch" Karaf 5 ;)
|> |
|> |About the TomcatURLStreamHandlerFactory is known "issue":
|> |
|> |https://github.com/jbonofre/karaf5/blob/main/services/spring-boot-
|> |application-
|> |manager/src/main/java/org/apache/karaf/springboot/SpringBootApplicati
|> |on
|> |ManagerService.java#L110
|> |
|> |I have to improve this ;)
|> |
|> |Regards
|> |JB
|> |
|> |On 29/09/2021 17:19, jgfrm wrote:
|> |> The following works:
|> |>
|> |> Karaf.json:
|> |> 
|> |> {
|> |>"applications": [
|> |>  {
|> |>"name": "e3web",
|> |>"url": "file:///home/jaap/Karaf5Test/e3web-dev.jar",
|> |>"type": "spring-boot",
|> |>"properties": {
|> |>  "enableHttp": true,
|> |>  "enablePrometheus": true
|> |>}
|> |>  }
|> |>]
|> |> }
|> |> 
|> |>
|> |> Add to Spring boot application:
|> |> 
|> |> @SpringBootApplication
|> |> @ComponentScan
|> |> public class E3webApplication {
|> |>
|> |>   ...
|> |>  public static void main(String[] args) {
|> |>  TomcatURLStreamHandlerFactory.disable();  // see
|> |https://github.com/spring-projects/spring-boot/issues/21535
|> |>  SpringApplication.run(E3webApplication.class, args);
|> |>  }
|> |> 
|> |>
|> |> Start with
|> |> java --add-modules jdk.security.jgss -cp
|> |> ../karaf5/assemblies/k4/target/k4-5.0-SNAPSHOT.jar:target/e3web-tes
|> |> t-1
|> |> .0-SNAPSHOT.jar:../karaf5/services/spring-boot-application-manager/
|> |> tar get/spring-boot-application-manager-5.0-SNAPSHOT.jar
|> |> -Dkaraf.config=src/main/resources/karaf.json
|> |> org.apache.karaf.boot.Main
|> |>
|> |> |-Oorspronkelijk bericht-
|> |> |Van: JB Onofré 
|> |> |Verzonden: dinsdag 28 september 2021 06:34
|> |> |Aan: user@karaf.apache.org
|> |> |Onderwerp: Re: Karaf 5
|> |> |
|> |> |Hi
|> |> |
|> |> |No it’s not this because k5 don’t use OSGi for the spring boot
|> |> |launcher. I still think it’s a missing add modules as Jvm arg. I
|> |> |will check
|> |today.
|> |> |
|> |> |Regards
|> |> |JB
|> |> |
|> |> |> Le 27 sept. 2021 à 23:39, jgfrm  a écrit :
|> |> |>
|> |> |> While Googling, I came across on of your blogs
|> |> |(http://nanthrax.blogspot.com/2021/04/whats-new-in-apache-karaf-
|> |> |431.html) that one of the changes in Karaf was to export the
|> |> |java.*
|> |packages.
|> |> |Could that be the cause?
|> |> |>
|> |> |> |-Oorspronkelijk bericht-
|> |> |> |Van: Jean-Baptiste Onofre 
|> |> |> |Verzonden: zondag 26 september 2021 18:02
|> |> |> |Aan: user@karaf.apache.org
|> |> |> |Onderwerp: Re: Karaf 5
|> |> |> |
|> |> |> |Hi
|> |> |> |
|> |> |> |No sure, it’s only class loader issue. I remember this issue in
|> |> |> |pure spring boot with JDK11.
|> |> |> |
|> |> |> |Let me check.
|> |> |> |
|> |> |> |Regards
|> |> |> |JB
|> |> |> |
|> |> |> |> Le 26 sept. 2021 à 17:59, jgfrm  a écrit :
|> |> |> |>
|> |> |> |> Hi JB,
|> |> |> |>
|> |> |> |> Fully understand that it is still work in progress.
|> |> |> |>
|> |> |> |> Regarding the .NoClassDefFoundError:
|> |> |> |> org/ietf/jgss/GSSException --add-modules java.security.jgss does
|not solve it?
|> |> |> |> Is it a class loader problem?
|> |> |> |>
|> |> |> |> Best,
|> |> |> |>
|> |> |>