Re: Aries JAXRS whiteboard question

2019-06-17 Thread Timothy Ward
Hi, I feel that the best place to ask this question would be the Apache Aries mail list (given that it’s an Aries project). I’m therefore cross posting this back to the Aries list. In general repackaging a library is intended to shield users from the underlying implementation details. In the

Re: How's config connected to a bundle

2017-12-07 Thread Timothy Ward
Hi Steinar, That does look like it should be working - what do the scr commands display when you look at your component? Note that your component will be activated without any configuration (for example if your configuration doesn’t exist when the component’s bundle is started) because it is

Re: What's the recommended way of reading configuration?

2017-12-03 Thread Timothy Ward
e use cases, it makes > sense. Look in Karaf Cellar for instance. > > Regards > JB > > On 12/03/2017 01:10 PM, Timothy Ward wrote: >>> I would more recommend a ManagedService or inject the ConfigAdmin service. >> This is really bad advice, and Steinar should defin

Re: What's the recommended way of reading configuration?

2017-12-03 Thread Timothy Ward
> I would more recommend a ManagedService or inject the ConfigAdmin service. This is really bad advice, and Steinar should definitely not do either of these things (nor should other readers of this mail chain). Steinar has already indicated that he wants to use Declarative Services, so

Re: What's the recommended way of reading configuration?

2017-12-03 Thread Timothy Ward
Hi Steinar, > What's the recommended way for an OSGi bundle running inside karaf to > access its configuration? > > Get an OSGi service of type ConfigMBean[1]? > Get an OSGi servie of type ConfigRepository[2]? > > Or maybe avoid karaf dependencies, and get an OSGi service of type >

Re: Pax JDBC DataSourceFactory connection pooling config

2017-11-22 Thread Timothy Ward
cake, you have to break some eggs. Oh well, one man’s opinion. Thanks for > the response, > > Scott > > From: Timothy Ward [mailto:tim.w...@paremus.com] > Sent: Wednesday, November 22, 2017 11:17 AM > To: user@karaf.apache.org > Subject: Re: Pax JDBC DataSourceFac

Re: Pax JDBC DataSourceFactory connection pooling config

2017-11-22 Thread Timothy Ward
le, as well > as any other deprecated APIs that are exposed. > > Regards, > > Scott > > From: Timothy Ward [mailto:tim.w...@paremus.com > <mailto:tim.w...@paremus.com>] > Sent: Tuesday, November 21, 2017 4:01 AM > To: user@karaf.apache.org <mailto:user@k

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread Timothy Ward
ontract=JavaJPA)(version=2.1.0))] > > > > Best regards, > Alex soto > > > >> On Nov 22, 2017, at 5:31 AM, Timothy Ward <tim.w...@paremus.com >> <mailto:tim.w...@paremus.com>> wrote: >> >> The contract requirement is the recommended way t

Re: Karaf 4.1.3 with Aries JPA missing requirement JavaJPA

2017-11-22 Thread Timothy Ward
The contract requirement is the recommended way to use the JPA API in OSGi. The versioning applied by most JSRs (JPA included) is not semantic, and so cannot be relied upon (for example JPA 2.0 is backward compatible with 1.0, Servlet 4 is backward compatible with 3.1). Portable Java Contract

Re: Pax JDBC DataSourceFactory connection pooling config

2017-11-21 Thread Timothy Ward
Hi Scott, If you’re interested in using JDBC with pooling in an OSGi environment then I really would recommend looking at the Transaction Control service. This is a new specification coming in OSGi release 7, and it provides significant extensions to the DataSourceFactory model, including

Re: Resolving one 3rd party bundle before another

2017-10-27 Thread Timothy Ward
If you put the findbugs annotations on the system classpath when launching the tests then they will be exposed through the system bundle alongside the annotations from the JRE using the javax.annotation package. Regards, Tim > On 26 Oct 2017, at 18:50, JT

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-15 Thread Timothy Ward
; internal one. If that is working, I'll let you know. >> >> >> >> >>> On 14 Sep 2017, at 10:46, Guillaume Nodet <gno...@apache.org >>> <mailto:gno...@apache.org>> wrote: >>> >>> >>> >>> 2017-09-14 11:40 GMT+02:00

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-14 Thread Timothy Ward
> On 14 Sep 2017, at 16:01, Guillaume Nodet <gno...@apache.org> wrote: > > > > 2017-09-14 14:17 GMT+02:00 Timothy Ward <tim.w...@paremus.com > <mailto:tim.w...@paremus.com>>: > Note that this work should be done as part of a new transaction control

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-14 Thread Timothy Ward
; On 14 Sep 2017, at 10:46, Guillaume Nodet <gno...@apache.org >> <mailto:gno...@apache.org>> wrote: >> >> >> >> 2017-09-14 11:40 GMT+02:00 Timothy Ward <tim.w...@paremus.com >> <mailto:tim.w...@paremus.com>>: >> Hi Alexand

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-14 Thread Timothy Ward
> On 14 Sep 2017, at 10:46, Guillaume Nodet <gno...@apache.org> wrote: > > > > 2017-09-14 11:40 GMT+02:00 Timothy Ward <tim.w...@paremus.com > <mailto:tim.w...@paremus.com>>: > Hi Alexander, > > As has been discussed on the Aries lists befor

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-14 Thread Timothy Ward
Hi Alexander, As has been discussed on the Aries lists before, I have no problem with someone creating a separate implementation of the Transaction Control service which leverages the OSGi JTA Service Specification. The reason that the current implementation doesn’t do this is twofold: By

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread Timothy Ward
Hi Alexander, That looks like it should be fine - what version of Aries JPA are you using? There were some fixes made to Aries JPA in 2.4.0 to add support for JPA 2.1 configuration properties which are needed by the transaction control implementation, and I think that there were then more

Re: Antw: Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread Timothy Ward
Hi Alexander, So what you’re doing is passing a fully configured EntityManagerFactory to the resource provider factory. If you create the provider this way then you are responsible for setting up all of the EntityManagerFactory’s configuration, including how it’s going to integrate with

Re: OSGi Transaction control fails with hibernate

2017-09-13 Thread Timothy Ward
Hi Alexander, Do you have a code example of how you’re obtaining and using the EntityManager? There should be no usage of the OSGiJtaPlatform from the tx-control XA JPA resource provider, which means that there’s either a bug in the resource provider, or something is misconfigured. If you are

Re: Class resolved/found on Karaf start but not on bundle restart

2017-09-04 Thread Timothy Ward
e I care about. > > Thanks for the link to the talk as well. A good refresher. > > Kevin > > > > On Mon, Sep 4, 2017 at 1:51 AM, Timothy Ward <tim.w...@paremus.com > <mailto:tim.w...@paremus.com>> wrote: > Hi Kevin, > > This problem occurs bec

Re: Class resolved/found on Karaf start but not on bundle restart

2017-09-04 Thread Timothy Ward
Hi Kevin, This problem occurs because you have incorrectly marked the import for the “com.foo.interfaces” package as “resolution:=optional”. This package is *not* optional as a type from it is is injected into your blueprint bean which in turn means that the type must be loadable for your

Re: Antw: Re: Require-Capability with effective:=active not ignored

2017-08-16 Thread Timothy Ward
t; ecosystems (blueprint, pax-cdi and scr/DS). > > Currently, I in fact use sort of busy-waiting in the BundleActivator (with > rxJava/retryWhen) failing after appox. 1 minute until the resource comes up. > But I will definitely give it a try with DS as is is for sure the cleaner &g

Re: Antw: Re: Require-Capability with effective:=active not ignored

2017-08-16 Thread Timothy Ward
Hi Alexander, > Using DS is currently not an option as the whole project uses blueprint and > the mix of DS and blueprint is not recommended as far as I know. By whom and why? OSGi services are OSGi services, it doesn’t matter which framework you use to register or consume them. I regularly

Re: Require-Capability with effective:=active not ignored

2017-08-16 Thread Timothy Ward
Hi Alexander, An active time capability is ignored by the OSGi framework. This means that it will not prevent your OSGi bundle moving from the INSTALLED state to the RESOLVED state. What you’re seeing is that the resolver can also be run elsewhere, for example to find or validate a set of

Re: DBCP2 & Karaf

2017-07-05 Thread Timothy Ward
As I did say in a previous email chain when you asked this question, the DBCP BasicDataSource does things that are fundamentally not going to work in OSGi. When you pass BasicDataSource a driver class name it is going to do something like: Class.forName(suppliedDbDriverClassName); This

Re: HotswapAgent and Karaf

2017-06-09 Thread Timothy Ward
Hi - have you tried using Bndtools? The support for running your code live in the IDE allows incremental build/redeploy which is a big productivity win. Regards, Tim > On 8 Jun 2017, at 15:23, Castor wrote: > > Hello! > > Since i'm losing some time with redeploys (

Re: Hibernate ORM with PostgresSql with Karaf 4.1.0

2017-06-08 Thread Timothy Ward
Hi Jack, As I posted in response to Stephen in another thread, Aries Transaction Control makes sorting out JPA quite a lot simpler. You end up with just one configuration to manage. I’m including that post below. The significant difference for you is that obviously you’ll want a Postgres

Re: Hibernate, JPA and Karaf 4

2017-06-06 Thread Timothy Ward
Hi, Have you considered using OSGi Transaction Control rather than blueprint’s integration? Apache Aries has an implementation of this pre-release OSGi R7 specification, and there are fewer moving parts. You can avoid deploying the blueprint/PAX JDBC pieces, and just use: A JPA provider

Re: Multiple bundles dependencies injection (pax-cdi or blueprint)

2017-03-06 Thread Timothy Ward
Hi, That sounds a lot like you’re building a persistence service with a defined API (a good thing!). As I think you’ve already realised, you will want to start by defining the persistence service and the DTOs that it is responsible for persisting/retrieving. These things should live in an API

Re: PAX JDBC 1.0.1 pools

2017-03-03 Thread Timothy Ward
h offhand I don’t see the use case > although I suspect that’s just because it hasn’t affected me yet. > > As always, thanks for your help. > > Scott > > From: Timothy Ward [mailto:tim.w...@paremus.com] > Sent: Friday, March 03, 2017 10:50 AM > To: user@karaf.apache

Re: PAX JDBC 1.0.1 pools

2017-03-03 Thread Timothy Ward
aults to 10,800,000 (3 hours). The > maximum time in milliseconds that a connection may remain open before being > closed. > > Scott > > From: Timothy Ward [mailto:tim.w...@paremus.com] > Sent: Wednesday, March 01, 2017 9:50 AM > To: user@karaf.apache.org > Subject: Re:

Re: PAX JDBC 1.0.1 pools

2017-03-01 Thread Timothy Ward
vice would also support > DataSources as services. So would would only need to teach people one > variante to configure them. > Transaction control is special in its config and it can not be reused for > other usages of a database. > > Christian > > 2017-03

Re: missing requirement [...] osgi.service; effective:=active; filter:="(objectClass=org.osgi.service.log.LogService)"

2017-02-22 Thread Timothy Ward
For this next step you’ll need someone more familiar with how Karaf adds its logging service in the “normal” distribution. Best Regards, Tim > On 22 Feb 2017, at 09:22, Olivier21 wrote: > > Tim, > > Thank you for your answer. > > I discovered with the

Re: missing requirement [...] osgi.service; effective:=active; filter:="(objectClass=org.osgi.service.log.LogService)"

2017-02-22 Thread Timothy Ward
The missing requirement indicates that you need a Log Service implementation (i.e. someone to provide you with the service). The dependency that you’re compiling against is just the API (which is a good thing to compile against) but you actually need an implementation at runtime. Your build

Re: DS components not Active

2017-02-03 Thread Timothy Ward
;>> fine. A change in the configuration after steady state causes the >>> Blueprint context to wait for the service forever. It does not matter if >>> the component’s immediate attribute is true or false; it fails in both >>> cases. >>> >>> Best reg

Re: Cannot inject blueprint exposed service with annotations

2017-02-02 Thread Timothy Ward
e maven-bundle-plugin with the "_dsannotations" > tag to process the declarative services annotations. Is there a better way? > > Thanks again, > > D > > On 02/02/2017 08:10 AM, Timothy Ward wrote: >> The next thing to check is, are you using a

Re: Bundle restart are hard to tackle

2017-01-31 Thread Timothy Ward
book that has a place of > choice in my library and brought me an unconditional love and interest for > the OSGI technology! > > > > Best regards to all :), > > > > 2017-01-31 15:35 GMT+01:00 Timothy Ward <tim.w...@paremus.com > <mailto:tim.w...@paremus.

Re: Bundle restart are hard to tackle

2017-01-31 Thread Timothy Ward
stributed accross bundles <3. > > Of course, life is made of tradeof, so if DS, Tx Control and JpaTemplate are > the only way to go the right way, Osgiliath will too. > > Best regards, > > 2017-01-31 10:50 GMT+01:00 Timothy Ward <tim.w...@paremus.com > <mailto

Re: Bundle restart are hard to tackle

2017-01-31 Thread Timothy Ward
Hi Charlie, One other question, have you tried using Aries Transaction Control? The big drivers for creating the Transaction Control Service were to simplify the service model and to handle dynamics better when performing transactional access to resources. The Aries implementation supports XA

Re: watch bundles by default

2017-01-18 Thread Timothy Ward
. Regards, Tim > On 18 Jan 2017, at 11:25, Christian Schneider <ch...@die-schneider.net> wrote: > > So what would you propose instead? > > Christian > > On 18.01.2017 12:24, Timothy Ward wrote: >> I have not opened this issue with Eclipse as I don’t think that

Re: watch bundles by default

2017-01-18 Thread Timothy Ward
gt; has to be done on M2E side.. > but I hope we also manage to get that done. > > Did you open an issue there already or should I take care of it? > > Christian > > On 18.01.2017 12:00, Timothy Ward wrote: >> Just to clarify, the Bndtools team are not working on th

Re: watch bundles by default

2017-01-18 Thread Timothy Ward
Just to clarify, the Bndtools team are not working on this function. It would need to be accepted as a function request and added to M2E by an Eclipse committer. Regards, Tim > On 18 Jan 2017, at 09:57, Christian Schneider wrote: > > Btw. Something that might be

Re: Unable to configure pool with more connections using dbcp2 and EL-2.6.2 - SOLVED

2016-12-22 Thread Timothy Ward
Can I recommend the Apache Aries Transaction Control Project as a much simpler way to configure and manage JPA resources. This is the prototype Reference Implementation for the upcoming OSGi standard, and allows you to do all of your JPA configuration using Configuration Admin, rather than

Re: Best practice for context-specific service instances?

2016-10-20 Thread Timothy Ward
Hi, It sounds as though the OSGi Async service would be helpful for you in doing asynchronous work (i.e. thread offloading) into services. Where those services need access to objects with state they can make use of prototype scoped services to do so. It could also be interesting to use

Re: Best practice for context-specific service instances?

2016-10-20 Thread Timothy Ward
Hi Christian, What is it that you’re trying to achieve? > is it possible to have multiple equal instances of a service or is this > breaking the principle rules of OSGI? Yes, you can have multiple service registrations for the same object instance, but this doesn’t make a whole lot of sense.

Re: Best practice for context-specific service instances?

2016-10-19 Thread Timothy Ward
Again - I would suggest that what you want is provided by the Transaction Control specification - you can begin a scope and then all work done within that scope remains isolated until the scope finishes. It’s trivial to provide a resource provider for a service, which gives you the scoping

Re: Best practice for context-specific service instances?

2016-10-18 Thread Timothy Ward
It sounds like you should look at the Transaction Control specification in the OSGi Release 7 specification draft (https://osgi.org/download/osgi.cmpn-7.0.0-earlydraft1.pdf ) There’s already a prototype implementation in Apache Aries

Re: Aries JPA 2.3.0: mapping file not used

2016-08-18 Thread Timothy Ward
That is exactly my point: https://github.com/apache/aries/blob/ebd8d1588b1a99d635bfc9c58fa72d7da1222a3e/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parser/impl/JPAHandler.java#L68

Re: Aries JPA 2.3.0: mapping file not used

2016-08-15 Thread Timothy Ward
There was a major rewrite of Aries JPA between version 1.x and 2.x. It appears as though the mapping file support was lost (I can find no reference to mapping files in the parser). This is obviously something that needs to be fixed - is there any way that you can supply a simplified version of

Re: Removal of start levels from Karaf 4.0.2 onwards - transaction manager not available in time

2016-07-11 Thread Timothy Ward
Hi Jochen, You’re absolutely right that start levels (and startup ordering) are anti-patterns in OSGi. It’s also the case that Aries Transaction and older versions of Aries JPA (the 1.x releases) are really hard to use. Aries JPA 1.x does not always wait correctly for the datasources that it

Re: pax-jdbc-dbcp2 and oracle connection pooling

2016-07-01 Thread Timothy Ward
(we are > also stuck with JBoss Fuse 6.2.1, based upon Karaf 2.4.x/Felix 4.4.1) if it > is backwards compatible with OSGi R5? > > Cheers > - Jörn > > Viele Grüße > Jörn > > On Fri, Jul 1, 2016 at 10:40 AM, Timothy Ward <tim.w...@paremus.com > <mailto:tim.w

Re: pax-jdbc-dbcp2 and oracle connection pooling

2016-07-01 Thread Timothy Ward
Hi Pravin, If you’re looking for a simpler way to manage database access when using OSGi then you should take a look at the Apache Aries Transaction Control service (http://aries.apache.org/modules/transactioncontrol.html ). This is an

Re: Jackson Module Afterburner not working in Karaf 3.0.5

2016-06-14 Thread Timothy Ward
An optional package import is “optional” meaning that it doesn’t need to be wired by the OSGi framework for the bundle to resolve. If the package isn’t wired then there will be no classes available from that package at runtime. As I said previously. Optional packages require a lot of thought

Re: Jackson Module Afterburner not working in Karaf 3.0.5

2016-06-14 Thread Timothy Ward
Hi Debra, I note that there are a lot of optional package imports in the manifest snippet that you’ve provided. Optional package imports require a lot of careful management and are hard to get right. In this case it looks as though the package import is declared as optional even though it

Re: Injecting service into command

2016-04-27 Thread Timothy Ward
Hi Alex, I would strongly recommend using the standard Declarative Services annotations (https://osgi.org/javadoc/r6/enterprise/org/osgi/service/component/annotations/package-summary.html )

Re: Communication between two Karaf containers

2016-04-05 Thread Timothy Ward
One thing to add is that Aries RSA is only one of a variety of OSGi Remote Services Admin implementations. There are multiple Open Source and commercial implementations available, and the entire specification is pluggable, so it’s possible to use discovery from one implementation with the

Re: Blueprint or DS or what to use?

2016-03-21 Thread Timothy Ward
Hi Christian, > On 21 Mar 2016, at 08:27, Christian Schneider wrote: > > Indeed it is difficult to predict where the OSGi community will go in the > future. I’m not sure that I agree with this. OSGi RFPs and RFCs are publicly available at

Re: Blueprint or DS or what to use?

2016-03-18 Thread Timothy Ward
Hi, From an OSGi standards perspective it’s worth pointing out that the Blueprint specification has not been touched since it was first released in OSGi 4.2. There are a few proposed extension RFCs for Blueprint, but none have seen much activity in five years or more. Declarative Services,