Re: CDI?

2017-08-07 Thread Matt Sicker
I'm not so sure about deprecated, but DS is the only dependency injection
standard in OSGi that respects the dynamic nature of services. CDI,
blueprint, etc., all have to rely on hacky proxies to emulate support while
adding nonstandard extensions at times.

On 7 August 2017 at 17:02,  wrote:

> I posted this to the Karaf forum but it may more appropriately belong
> here. It's going to be one or the other.
>
> Has CDI been deprecated from the OSGi specification. I was hoping to use
> it in the future instead of Blueprint or DS or in addition to them. I re
> all last year a new OSGi service export and reference annotations were
> added. So this surprised me a bit.
>
> https://issues.apache.org/jira/browse/CAMEL-11029
>
> According to that issue, Camel's CDI support for OSGi doesn't work because
> CDI on OSGi is deprecated.
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Sicker 

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PaxWeb: Whiteboard and compliance to the R6 specification

2017-08-07 Thread Marc Schlegel
Hi Jérémie

We definately want to be spec-compliant and I didnt realize that there are 
so many points missing. I know we have some parts missing regarding the 
whiteboard-dtos (mostly error cases).

Do you already have access to our Jira? If not, we can add you there so you 
can submit a bug-report. Since we need to check the spec, it would be 
helpfull if you could provide a section where we can find the missing 
requirements.

We usually keep track of the features by integration-tests [1] and samples 
provided by Pax-Web. For example, we have a sample project which uses R6 
whiteboard services [2].
It would be highly appreciated if you could send us a pull-request with an 
updated integration-test or sample which uses the missing pieces.

regards
Marc

[1] 
https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty/WhiteboardR6IntegrationTest.java
[2] 
https://github.com/ops4j/org.ops4j.pax.web/tree/master/samples/whiteboard-ds/src/main/java/org/ops4j/pax/web/samples/whiteboard/ds

Am Montag, 7. August 2017 20:42:34 UTC+2 schrieb Jérémie Brébec:
>
> Hello,
>
> I don't know if PaxWeb intends to be compliant to the whiteboard R6 
> specification. However, the following items are not compliant :
>
> - Every Whiteboard component which doesn't target a ServletContextHelper 
> should use a default shared ServletContext (linked to a 
> ServletContextHelper named "default"). Today, these elements doesn't share 
> the same ServletContext
> - It should be possible for a Whiteboard component to target multiple 
> ServletContextHelper (the spec advises to use the "prototype" scope when 
> implementing a whiteboard component) : the whiteboard implementation should 
> instantiate (with ServiceObjects) a new instance for every target
> - It should be possible to target a ServletContextHelper with an osgi 
> filter : Today, PaxWeb assume the filter is only matching the name of the 
> ServletContextHelper
> - It should be possible to override any ServletContextHelper (including 
> the "default" one)
> - Every ServletContextHelper should be resolved in the context of the 
> bundle of the whiteboard component using it (the spec advises to use the 
> "prototype" scope when implementing a ServletContextHelper)
> - Every Whiteboard component have a delegating "ServletContext", which 
> delegate to the shared ServletContext, and the ServletContextHelper
>
> Is there a planned roadmap on these items/jira issues ?
>
> Regards,
> Jérémie
>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PaxWeb: WebSocketTracker and Object

2017-08-07 Thread 'Achim Nierbeck' via OPS4J
BTW, just created the following improvement:
https://ops4j1.jira.com/browse/PAXWEB-1119

2017-08-07 18:22 GMT+02:00 Achim Nierbeck :

> Hi,
>
> the problem I see with this is, if one registers a WebSocket as Service,
> it usually doesn't need to be of a special Interface ...
> I can see that a property might help. Will think about this a bit more.
>
> Right now you can't disable it.
>
> regards, Achim
>
>
> 2017-08-07 14:00 GMT+02:00 Jérémie Brébec :
>
>> Hello,
>>
>> In pax web 6, a WebSocketTracker is created. This tracker "track" with a
>> ServiceTracker every registration of services with the class "Object". This
>> tracker resolves every service through bundleContext.getService().
>> As a consequence, every component registered with "Object" are resolved,
>> breaking the Declaratives Services lazy properties.
>>
>> Is there a way to deactivate this tracker, or at least make it activate
>> only with the presence of a property ? This tracker is not precise enough,
>> imho, to systematically calls getService on every references.
>>
>> Regard,
>> Jérémie
>>
>> --
>> --
>> --
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Apache Member
> Apache Karaf  Committer & PMC
> OPS4J Pax Web  Committer &
> Project Lead
> blog 
> Co-Author of Apache Karaf Cookbook 
>
> Software Architect / Project Manager / Scrum Master
>
>


-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PaxWeb: WebSocketTracker and Object

2017-08-07 Thread 'Achim Nierbeck' via OPS4J
Hi,

the problem I see with this is, if one registers a WebSocket as Service, it
usually doesn't need to be of a special Interface ...
I can see that a property might help. Will think about this a bit more.

Right now you can't disable it.

regards, Achim


2017-08-07 14:00 GMT+02:00 Jérémie Brébec :

> Hello,
>
> In pax web 6, a WebSocketTracker is created. This tracker "track" with a
> ServiceTracker every registration of services with the class "Object". This
> tracker resolves every service through bundleContext.getService().
> As a consequence, every component registered with "Object" are resolved,
> breaking the Declaratives Services lazy properties.
>
> Is there a way to deactivate this tracker, or at least make it activate
> only with the presence of a property ? This tracker is not precise enough,
> imho, to systematically calls getService on every references.
>
> Regard,
> Jérémie
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf  Committer & PMC
OPS4J Pax Web  Committer &
Project Lead
blog 
Co-Author of Apache Karaf Cookbook 

Software Architect / Project Manager / Scrum Master

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


PaxWeb: WebSocketTracker and Object

2017-08-07 Thread Jérémie Brébec
Hello,

In pax web 6, a WebSocketTracker is created. This tracker "track" with a 
ServiceTracker every registration of services with the class "Object". This 
tracker resolves every service through bundleContext.getService().
As a consequence, every component registered with "Object" are resolved, 
breaking the Declaratives Services lazy properties.

Is there a way to deactivate this tracker, or at least make it activate 
only with the presence of a property ? This tracker is not precise enough, 
imho, to systematically calls getService on every references.

Regard,
Jérémie

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [pax-exam] How to simulate beforeClass / afterClass hook *outside* of the OSGi container

2017-08-07 Thread Nicolas Brasey
Hi Christoph,

Yes, that is exactly what I tried already, to bundle neo4j and all the
dependencies with the maven shade plugin (like the ones in service mix
bundles). I realized that this is not really ideal for the following
reasons:

1) The build time exploded, to create this huge jar takes more than
1minutes and 30 secs
2) The pom.xml is far from being straight forward to write, you need to
have a good understanding of the internal structure of neo4j in order to
maintain it. Also, I'm afraid this is time consuming on the long term and
will requires tricky changes for each major release of neo4j.
3) It was not even working! I had issues with neo4j internal way of loading
modules with the java 6 ServiceLoader mechanism, which did not find http
services for reasons I still ignore...

Anyway, I finally gave up fighting with it ;-)





On Sat, Aug 5, 2017 at 1:50 PM, 'Christoph Läubrich' via OPS4J <
ops4j@googlegroups.com> wrote:

> Even though neo4j is not "osgi-friendly" (what ever that means ;-) you can
> create abundle that embedds all that neo4j requires, add an Activator that
> starts up your db and provide a custom service to trigger
> "after-test-checks" in whatever way you need. In your test you can the
> collect the service to
>
> a) make sure the db is up and running
> b) fire your checks whenever needed
>
> Am 04.08.2017 11:59, schrieb Nicolas Brasey:
>
> Hi,
>
> Context: I want to use pax-exam for our business integration tests that
> needs to have a database (neo4j) that is not OSGi friendly running before
> the test are executed. we use maven.
>
> Also, neo4j provides a embedded server that works extremely well outside
> of an OSGi container, but I can't find a way to start this embedded server
> with pax-exam outside of the container before the pax-exam machinery is
> starting.
>
> The idea is to start the database in the non-OSGi context when the
> pax-runner is starting, something like the beforeClass, and stop the
> database after all the tests are finished ala afterClass.
>
> Does anyone has an idea how to do this ?
>
> Thanks
> Nicolas
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> --
> --
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "OPS4J" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ops4j/RlgwSX04-O8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
--
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.