Re: Using SpringMVC in Karaf 4.2.6

2019-10-30 Thread duan2ping DL•
Thanks JB,I will study blueprint, scr, to replace spring.
Regards
Duan

Jean-Baptiste Onofré  于2019年10月31日周四 下午1:06写道:

> Hi,
>
> Karaf 4.2.6 still supports spring-dm if you add the spring-legacy
> features repo:
>
> feature:repo-add spring-legacy
>
> The reason is that spring-dm only works if old Spring version (and it's
> deprecated now).
> So, you can still use it with spring-legacy, but I recommend to move to
> something else (scr, blueprint, ...).
>
> Regards
> JB
>
> On 31/10/2019 04:35, duan2ping DL• wrote:
> > Hi All,
> >
> > I am trying to upgrade from karaf3.0.9 to karaf4.2.6. However,
> > karaf4.2.6 does not support spring-dm. I want to continue using
> > SpringMVC in karaf. What should I do ? Thanks!
> >
> > Best Regards!
> > Duan
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


Re: Using SpringMVC in Karaf 4.2.6

2019-10-30 Thread Jean-Baptiste Onofré
Hi,

Karaf 4.2.6 still supports spring-dm if you add the spring-legacy
features repo:

feature:repo-add spring-legacy

The reason is that spring-dm only works if old Spring version (and it's
deprecated now).
So, you can still use it with spring-legacy, but I recommend to move to
something else (scr, blueprint, ...).

Regards
JB

On 31/10/2019 04:35, duan2ping DL• wrote:
> Hi All,
> 
> I am trying to upgrade from karaf3.0.9 to karaf4.2.6. However,
> karaf4.2.6 does not support spring-dm. I want to continue using
> SpringMVC in karaf. What should I do ? Thanks!
> 
> Best Regards!
> Duan

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Using SpringMVC in Karaf 4.2.6

2019-10-30 Thread duan2ping DL•
Hi All,

I am trying to upgrade from karaf3.0.9 to karaf4.2.6. However, karaf4.2.6
does not support spring-dm. I want to continue using SpringMVC in karaf.
What should I do ? Thanks!

Best Regards!
Duan


Re: Create my own Whiteboard/Application with extensions

2019-10-30 Thread Jean-Baptiste Onofré
FYI:

https://github.com/apache/karaf/tree/master/examples/karaf-rest-example/karaf-rest-example-whiteboard

Regards
JB

On 30/10/2019 09:45, j...@nanthrax.net wrote:
> Hi
> 
> There's also an example in the karaf-rest-example.
> 
> Regards
> JB
> 
> Le 30 oct. 2019 08:36, Christian Schneider  a
> écrit :
> 
> I created an example of an application that uses jax-rs-whiteboard.
> 
> 
> https://github.com/cschneider/osgi-best-practices/blob/master/backend/src/main/java/net/lr/tasklist/resource/TaskResource.java
> 
> It uses the jackson extension. As you see the only thing you need in
> your code is this:
> @Component(service = TaskResource.class)
> @JaxrsResource
> @Produces(MediaType.APPLICATION_JSON)
> @JSONRequired
> @Path("tasks")
> 
> Alternatively you can also publish a jax-rs Application as an OSGi
> service but I did not try this.
> 
> Christian
> 
> Am Mi., 30. Okt. 2019 um 01:36 Uhr schrieb Oleg Cohen
> mailto:oleg.co...@assurebridge.com>>:
> 
> Greetings,
> 
> I am using Aries HTTP Whiteboard in Karaf 4.2.7. All is working
> fine with the default Whiteboard instance. I would like to
> create my own Jax-RS Application with the same extensions that
> are configured in the default Whiteboard, for example jaxb-json
> one. Is there a convenient way to clone the default Whiteboard
> or create a fully-featured Application?
> 
> I would appreciate any guidance in this!
> 
> Thank you,
> Oleg
> 
> 
> 
> **
> 
> 
> 
> -- 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Computer Scientist
> http://www.adobe.com
> 
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: Create my own Whiteboard/Application with extensions

2019-10-30 Thread Oleg Cohen
Hi JB,

Thank you for replying! Yes, there is an example of whiteboard, but the
resource is using the default one. Unless I missed something.

Best,
Oleg

On Wed, Oct 30, 2019 at 5:10 AM  wrote:

> Hi
>
> There's also an example in the karaf-rest-example.
>
> Regards
> JB
>
> Le 30 oct. 2019 08:36, Christian Schneider  a
> écrit :
>
> I created an example of an application that uses jax-rs-whiteboard.
>
>
> https://github.com/cschneider/osgi-best-practices/blob/master/backend/src/main/java/net/lr/tasklist/resource/TaskResource.java
>
> It uses the jackson extension. As you see the only thing you need in your
> code is this:
> @Component(service = TaskResource.class)
> @JaxrsResource
> @Produces(MediaType.APPLICATION_JSON)
> @JSONRequired
> @Path("tasks")
>
> Alternatively you can also publish a jax-rs Application as an OSGi service
> but I did not try this.
>
> Christian
>
> Am Mi., 30. Okt. 2019 um 01:36 Uhr schrieb Oleg Cohen <
> oleg.co...@assurebridge.com>:
>
> Greetings,
>
> I am using Aries HTTP Whiteboard in Karaf 4.2.7. All is working fine with
> the default Whiteboard instance. I would like to create my own Jax-RS
> Application with the same extensions that are configured in the default
> Whiteboard, for example jaxb-json one. Is there a convenient way to clone
> the default Whiteboard or create a fully-featured Application?
>
> I would appreciate any guidance in this!
>
> Thank you,
> Oleg
>
>
>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com
>
>
>

-- 
*Oleg Cohen  |  Principal  |  **A S S U R E B R I D G E*
*Office: +1 617 564 0737  |  Mobile: +1 617 455 7927  |  Fax: +1 888 409
6995*
*Email: oleg.co...@assurebridge.com   **|
 www.assurebridge.com *


Re: Create my own Whiteboard/Application with extensions

2019-10-30 Thread jb
HiThere's also an example in the karaf-rest-example.RegardsJBLe 30 oct. 2019 08:36, Christian Schneider  a écrit :I created an example of an application that uses jax-rs-whiteboard.https://github.com/cschneider/osgi-best-practices/blob/master/backend/src/main/java/net/lr/tasklist/resource/TaskResource.javaIt uses the jackson extension. As you see the only thing you need in your code is this:@Component(service = TaskResource.class)@JaxrsResource@Produces(MediaType.APPLICATION_JSON)@JSONRequired@Path("tasks")Alternatively you can also publish a jax-rs Application as an OSGi service but I did not try this.ChristianAm Mi., 30. Okt. 2019 um 01:36 Uhr schrieb Oleg Cohen :Greetings,I am using Aries HTTP Whiteboard in Karaf 4.2.7. All is working fine with the default Whiteboard instance. I would like to create my own Jax-RS Application with the same extensions that are configured in the default Whiteboard, for example jaxb-json one. Is there a convenient way to clone the default Whiteboard or create a fully-featured Application?I would appreciate any guidance in this!Thank you,Oleg
-- -- 

Christian Schneiderhttp://www.liquid-reality.deComputer Scientisthttp://www.adobe.com


Re: Create my own Whiteboard/Application with extensions

2019-10-30 Thread Christian Schneider
I created an example of an application that uses jax-rs-whiteboard.

https://github.com/cschneider/osgi-best-practices/blob/master/backend/src/main/java/net/lr/tasklist/resource/TaskResource.java

It uses the jackson extension. As you see the only thing you need in your
code is this:
@Component(service = TaskResource.class)
@JaxrsResource
@Produces(MediaType.APPLICATION_JSON)
@JSONRequired
@Path("tasks")

Alternatively you can also publish a jax-rs Application as an OSGi service
but I did not try this.

Christian

Am Mi., 30. Okt. 2019 um 01:36 Uhr schrieb Oleg Cohen <
oleg.co...@assurebridge.com>:

> Greetings,
>
> I am using Aries HTTP Whiteboard in Karaf 4.2.7. All is working fine with
> the default Whiteboard instance. I would like to create my own Jax-RS
> Application with the same extensions that are configured in the default
> Whiteboard, for example jaxb-json one. Is there a convenient way to clone
> the default Whiteboard or create a fully-featured Application?
>
> I would appreciate any guidance in this!
>
> Thank you,
> Oleg
>
>
>
>

-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com