Re: Different result between Linux and Windows

2021-10-25 Thread Tim Ward
What version of Java are you using on Windows, and what flavour/version is your OSGi framework? It’s possible that the JVM you are using is too new to be recognised by an older framework implementation, and could result in it failing to match ee requirements. Tim > > On 25 Oct 2021, at

Re: Enabling multipart support on Aries JAX-RS 1.0.10

2020-12-04 Thread Tim Ward
tem.out.printf("File %s, %s, %d%n", part.getName(), >> part.getContentType(), part.getSize()); >> } >> } >> >> >> >> This is also failing, so it may be something else with the Karaf st

Re: Enabling multipart support on Aries JAX-RS 1.0.10

2020-12-04 Thread Tim Ward
down to the >> lower layer (Servlet), don’t you think? >> >> Specifically, a Servlet can be customized by the @MultipartConfig >> annotation, but the ability to pass this down from JAX-RS is not there, or >> at least, not clear enough. >>

Re: Enabling multipart support on Aries JAX-RS 1.0.10

2020-12-03 Thread Tim Ward
in the examples and documentation? > > > Best regards, > Alex soto > > > > >> On Dec 3, 2020, at 11:23 AM, Tim Ward > <mailto:tim.w...@paremus.com>> wrote: >> >> Hello, >> >> Having seen the class included in this email cha

Re: Enabling multipart support on Aries JAX-RS 1.0.10

2020-12-03 Thread Tim Ward
he JAX-RS whiteboard from operating properly. Have you tried testing your JAX-RS resource in a plain OSGi framework using either the Felix or Equinox Http Whiteboards? If this works then it will narrow the search space considerably. All the best, Tim Ward > On 3 Dec 2020, at 12:49, Alex So

Re: Is it possible to activate a DS component only when an HTTP request is completed?

2020-09-02 Thread Tim Ward
If you’re stuck with the async startup then the best way to approach this sort of thing is to take the “service” bit out of the component and manage the service registration lifecycle yourself. It is much less pretty, but at least DS can manage the service and configuration dependencies for

Re: Are there rules for DS components' constructors and @Activate methods?

2020-09-02 Thread Tim Ward
> On 1 Sep 2020, at 20:09, Steinar Bang wrote: > >>>>>> Tim Ward : > >>> 1. Not run for a too long time (e.g. not block, waiting for an HTTP >>> response) > >> Basic answer: >> Yes, you should avoid blocking in callbacks genera

Re: Are there rules for DS components' constructors and @Activate methods?

2020-09-01 Thread Tim Ward
> Are there rules that should be followed for DS components' constructors > and @Activate methods? > > I.e. stuff like > 1. Not run for a too long time (e.g. not block, waiting for an HTTP response) Basic answer: Yes, you should avoid blocking in callbacks generally. The thread is not your own

Re: Shutting down many bundles takes a lot of time

2020-05-04 Thread Tim Ward
Hi, When an OSGi bundle is stopped it will run whatever shutdown code it contains. This will unregister any services provided by that bundle. If there are other bundles depending on those services then they will react to the unregistration of that service by doing something, typically

Re: Karaf Cellar Osgi Event Admin timeout

2020-05-01 Thread Tim Ward
Blacklisting happens when an Event Admin implementation determines that an Event Handler is “stuck” or “too slow” . If you put a breakpoint into your event handler then this will almost certainly trigger

Re: ServiceUnavailableException after bundle restart

2020-03-26 Thread Tim Ward
Hi, It is indeed likely that you are running into one of the “features” of the blueprint specification. The proxying behaviour is required by the OSGi blueprint specification, and it means that any service object that you use is wrapped in a delegating proxy - this means that the blueprint

Re: Announce: Simplified js frontend delivery and jersey REST APIs from karaf

2020-03-23 Thread Tim Ward
Hi Steinar, I’m pleased to see people doing work with Karaf and React, but it looks as though this is at least partly duplicating/rebuilding the existing functionality provided by the HTTP and JAX-RS whiteboard specifications. I’m thinking specifically: > Loads and serves up resources from

Re: CNF javax.ws.rs.client.ClientBuilder.newBuilder(ClientBuilder.java:50)

2020-03-14 Thread Tim Ward
Have you considered creating the clients as described in the JAX-RS Whiteboard specification (https://osgi.org/specification/osgi.cmpn/7.0.0/service.jaxrs.html#d0e134114)? This avoids the reflective loading pain that you’re hitting in a reliable way. All the best, Tim Sent from my iPhone >

Re: JAXRS whiteboard service with client certificate authentication

2020-03-04 Thread Tim Ward
Hi Alex, Did you consider using something like Apache Shiro? The Apache Aries JAX-RS whiteboard has a number of integration projects for relevant technologies, and one of them adds support for Apache Shiro .

Re: Change in Pax-JDBC configuration file

2020-02-19 Thread Tim Ward
Hi, I’m not a PAX expert, but the osgi.jdbc.driver.name property from the OSGi JDBC service specification is supposed to be a human readable name for the driver, and could easily change between versions/packagings. If you want something to use as an identifier to find a particular

Re: JAX-RS Whiteboard is eclipsing war app. (Was: Angular Test app gives HTTP ERROR 403)

2020-01-28 Thread Tim Ward
Hi Erwin, Did you try configuring the Aries JAX-RS whiteboard to use a non-root context path? That would allow you to separate the JAX-RS whiteboard from other uses of the HTTP whiteboard, helping to avoid path conflicts. Note that this will also set up an isolated servlet context for your

Re: Persistence.xml

2020-01-15 Thread Tim Ward
ryBuilde emfBuilder > > @Activate > public void init(){ > Map props = new HashMap(); > props.put("eclipselink.target-database", "Oracle"); > EntityManagerFactory emf = emfBuilder.createEntityManagerFactory(props); > EntityManager em = emf.createEntityManager(); > }

Re: Persistence.xml

2020-01-14 Thread Tim Ward
Your best option would be to specify an incomplete persistence unit and then use an EntityManagerFactoryBuilder or a configuration admin

Re: Multiple version of JPA managed classes in a karaf instance

2020-01-06 Thread Tim Ward
Hi, The “tricky” part comes from the fact that the EntityManager Service API isn’t coupled to any of your domain classes, meaning that your “client” bundles can see EntityManager services registered by all of the persistence units, not just the one that they are wired to by Import-Package.

Re: Missing requirement of org.osgi.service.component

2019-12-17 Thread Tim Ward
ely though karaf supported DS1.3 specification (in constrast to the > recent DS 1.4, which it shouldn't be supported yet): do you know the link > where the DS support is publicly announced? Thanks > >> Il giorno mar 17 dic 2019 alle ore 18:39 Tim Ward ha >> scritto: >

Re: Missing requirement of org.osgi.service.component

2019-12-17 Thread Tim Ward
Hi Massimo, > Am I doing something which is invalid? Long story short, annotation inheritance is something that you are strongly discouraged from doing. The DS annotations are not designed to be inherited by child classes, technically this is a violation of encapsulation because the DS

Re: Aries jax-rs whiteboard

2019-11-18 Thread Tim Ward
at all. > > kr, > Matthias > > So somehow the extension selection logic looks odd. Or is this made > media-type mapping? > > > Tim Ward mailto:tim.w...@paremus.com>> schrieb am Fr., > 15. Nov. 2019, 17:23: > Hi Matthias, > > So from the example

Re: Aries jax-rs whiteboard

2019-11-15 Thread Tim Ward
gt; <http://osgi.jaxrs.name/>=jaxb-json)" <- i tried it also here >> }) >> public class MyApp extends Application {} >> >> @Path("/service") >> @Component( >> service = MyService.class, >> property = { >&

Re: Aries jax-rs whiteboard

2019-11-15 Thread Tim Ward
> but that doesn't work. > How does the injection mechanism work? I couldn't figure it out reading the > aries source code. > > regards, > Matthias > > Am Fr., 8. Nov. 2019 um 10:28 Uhr schrieb Tim Ward <mailto:tim.w...@paremus.com>>: > Hi, > > Yes,

Re: Aries jax-rs whiteboard

2019-11-08 Thread Tim Ward
gi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#d0e120961> > I didn't test it yet but does it work? I don't see that the aries JaxRs > whiteboard impl somewhere defined > osgi.http.whiteboard.servlet.multipart.enabled=true > > Best regards, > Matthias > > Am Do., 7. Nov. 2

Re: Aries jax-rs whiteboard

2019-11-07 Thread Tim Ward
right? then I think, I understood the thing and i like it :) > > Best regards > Matthias > > Am Do., 7. Nov. 2019 um 13:24 Uhr schrieb Tim Ward <mailto:tim.w...@paremus.com>>: >> in OSGI 6 I think we should be able to use >> @Component(property = {"

Re: Aries jax-rs whiteboard

2019-11-07 Thread Tim Ward
> in OSGI 6 I think we should be able to use > @Component(property = {"osgi.jaxrs.name =myApp", > "osgi.jaxrs.application.base=/foo"}, service = A.class) > class... > That does not work or did I misunderstood something? If you want to register an application with the

Re: Create my own Whiteboard/Application with extensions

2019-10-31 Thread Tim Ward
HI all, There is also an example in the JAX-RS whiteboard specification (https://osgi.org/specification/osgi.cmpn/7.0.0/service.jaxrs.html#d0e133933 ) showing how you can register a whiteboard application (rather than

Re: Remote services with Karaf question.

2019-08-05 Thread Tim Ward
I’m pretty sure that Aries RSA has Karaf features defined too. https://github.com/apache/aries-rsa/tree/master/features Best Regards, Tim > On 5 Aug 2019, at 05:50, Jean-Baptiste Onofré wrote: > > Hi Ryan, > > Cellar doesn't support R7 remote services yet (it's on the way). > > However,

Re: Aries JAXRS whiteboard question

2019-06-19 Thread Tim Ward
Yes, we’re really proud of the JAX-RS whiteboard - particularly when you can use it with the DS 1.4 Component Property annotations. It’s brilliantly simple to use. All the best, Tim > On 19 Jun 2019, at 14:32, Ryan Moquin wrote: > > Yes, you are correct Tim. I forgot there is an Aries

Re: AW: Service Sisibility

2019-05-15 Thread Tim Ward
ch day I am discovering something like this i like OSGI and Karaf a >> bit more. >> >> >> br, >> >> Matthias >> >> >> *Von:* Tim Ward >> *Gesendet:* Mittwoch, 15. Mai 2019 15:45:20 >> *An:* user@karaf.a

Re: Service Sisibility

2019-05-15 Thread Tim Ward
Declarative Services is amazing, so this is trivially easy to do. In this case you should add the configuration property service.target to your configuration dictionary with the value being an LDAP filter selecting the service you want to inject. Note that “service” is the name of your

Re: ExceptionMapper on Aries JAX-RS Whiteboard on karaf 4.2.3 and above.

2019-04-02 Thread Tim Ward
I note that you’re using the Component Property annotations for the extension, but a raw property entry for the resource. If your build plugin is able to cope with Component Property annotations then you can use the @JaxrsResource annotation instead of a magic string. If your build plugin can’t

Re: ExceptionMapper on Aries JAX-RS Whiteboard on karaf 4.2.3 and above.

2019-04-02 Thread Tim Ward
>> I don't know if, the aries withboard project (1.0.4) has implemented the >> spec? As Aries JAX-RS Whiteboard is the reference implementation I can say with reasonable confidence that it has implemented the specification. The issue is that the application code you have supplied isn’t using

Re: ExceptionMapper on Aries JAX-RS Whiteboard on karaf 4.2.3 and above.

2019-04-02 Thread Tim Ward
Hi Xavier, The JAX-RS whiteboard works as a whiteboard, not an extender. In order to register your extension service (the ExceptionMapper) with the whiteboard you need to supply the correct service properties. In this case you need. osgi.jaxrs.extension=true If you’re using OSGi R7

Re: ComponentFactory

2019-03-25 Thread Tim Ward
Hi, If you are using Component Factories then you are not also using Managed Service Factories, the two are simply not possible to use together. A component factory lets you supply custom configuration to programmatically create multiple instances of a component. These are combined with any

Re: Error Creating XA DataSource

2019-02-14 Thread Tim Ward
es 2.7.0, 2.7.1 and 2.7.2. If you’re still having an issue then I would suggest looking at the package wiring for the “org.osgi.service.jpa” and “javax.persistence” packages to see whether there’s something odd going on. Best Regards, Tim > On 14 Feb 2019, at 08:00, cobusstroebel wrote: &g

Re: Error Creating XA DataSource

2019-02-10 Thread Tim Ward
Hi, The XA support that you are trying to use was added in https://github.com/apache/aries/commit/6d1943b4d7c019968610256353abd36b34c54285 and so isn’t part of the (rather elderly) 0.0.3 release that you are using. If you want working XA transactions with EclipseLink 2.6.0 then you will need

Re: Error Creating XA DataSource

2019-02-09 Thread Tim Ward
Hi, So using the EntityManagerFactoryBuilder and the JPAEntityManagerProviderFactory services is the lowest level way to set this up, and it requires a bit more setup than you are currently doing. I would normally recommend using configuration to directly create the JPAEntityManagerProvider

Re: How to provide a transactional entity manager to a third party

2019-02-07 Thread Tim Ward
Hi, If you want to use a managed EntityManager (rather than one that you create and destroy yourself) then you need to do so within managed scope. In Transaction Control (which you may have seen emails about on this list in the last few days) this would be by creating a scoped EntityManager

Re: Karaf and Transaction Control Service Specification

2019-02-07 Thread Tim Ward
behaviour. The whole thing is much more reliable. Totally worth it :) Tim > On 7 Feb 2019, at 15:42, Alex Soto wrote: > > Thank you Tim, I am glad I asked. > > Best regards, > Alex soto > > > > >> On Feb 7, 2019, at 9:26 AM, Tim Ward > <mail

Re: Karaf and Transaction Control Service Specification

2019-02-07 Thread Tim Ward
ation that creates a single EM > and have the various repositories use that one from the Service Registry? > > Best regards, > Alex soto > > > > >> On Feb 6, 2019, at 4:40 PM, Tim Ward > <mailto:tim.w...@paremus.com>> wrote: >> >> The re

Re: Error Creating XA DataSource

2019-02-07 Thread Tim Ward
Hi, I don’t know the specifics of what is going on here, but it is not recommended to use a pooled datasource factory wrapper with Transaction Control (which does its own pooling). You would be better off using the vanilla DataSourceFactory service for mysql. Also, you may wish to update to

Re: Karaf and Transaction Control Service Specification

2019-02-06 Thread Tim Ward
The relevant specification for learning about scoped resources (which is what the ResourceProvider gives you) is the Transaction Control Specification. In this case your question is covered by Section 147.2.5 Multi Threading

Re: JAX-RS Whiteboard and CXF Mechanics

2019-01-03 Thread Tim Ward
al pointer to the Aries > implementation and a happy new year. > > Best regards, > > Oliver > > > Le 2 janv. 2019 à 13:13, Tim Ward <mailto:tim.w...@paremus.com>> a écrit : > >>>> 1. Some of the providers I configure programmatic

Re: JAX-RS Whiteboard and CXF Mechanics

2019-01-02 Thread Tim Ward
>> 1. Some of the providers I configure programmatically implement JAX-RS >> interfaces and are provided by CXF or other frameworks, >> e.g. CrossOriginResourceSharingFilter, MultipartProvider, >> JacksonJsonProvider, WebApplicationExceptionMapper. >> How do I make these known to my JAX-RS

Re: Aries JAX-RS Whiteboard

2018-11-24 Thread Tim Ward
Hi Tom, It looks like you’re having a lot of success. The NPE that you have identified for void methods is a known bug in 1.0.1 (introduced by a fix for a different problem in 1.0.0) and is already fixed in 1.0.2-SNAPSHOT. The release of 1.0.2 is planned soon - the vote would probably be

Re: Using Shiro 1.4.x in OSGi

2018-11-23 Thread Tim Ward
ote: > > Since JB and Tim have been working out how to get Aries JAX-RS setup in > Karaf, one possibly nice solution would be to just drop in the shiro (1.4.0) > integration that Tim Ward wrote for the JAX-RS Whiteboard [1]. > > Sincerely, > - Ray > > [1] > https

Re: Aries JAX-RS Whiteboard

2018-11-23 Thread Tim Ward
> does the enRoute examples work in Karaf ? (as we are on the Karaf > mailing list ;)) > > Regards > JB > > On 22/11/2018 20:53, Tim Ward wrote: >> There are some fairly simple examples available in the enRoute project. In >> general things should work as you expect, as

Re: Aries JAX-RS Whiteboard

2018-11-22 Thread Tim Ward
There are some fairly simple examples available in the enRoute project. In general things should work as you expect, as long as you use the JAX-RS API, not the Jersey API :) The SSE from JAX-RS 2.1 definitely works (client and server side) with the Aries implementation, so hopefully that will

Re: Aries JAX-RS Whiteboard

2018-11-22 Thread Tim Ward
gi.util.promise right ? > > Regards > JB > > On 22/11/2018 18:19, Tim Ward wrote: >> That’s part of the JAX-RS Whiteboard spec API. You can find the JAX-RS >> Whiteboard spec API as a standalone jar in Maven >> Central >> https://mvnreposit

Re: Aries JAX-RS Whiteboard

2018-11-22 Thread Tim Ward
; the missing package is org.osgi.service.jaxrs.client (required by Aries > JAXRS Whiteboard bundle) which seems to be only in Compendium R7 (not R6). > > Regards > JB > > > On 22/11/2018 17:10, Tim Ward wrote: >>> that won't work out of the box as Karaf 4.2.x is still R6

Re: Aries JAX-RS Whiteboard

2018-11-22 Thread Tim Ward
> I'll hold off for now then. Honestly, it sounds like you’re about 30 minutes away from having the Aries JAX-RS Whiteboard working... > On 22 Nov 2018, at 16:14, t...@quarendon.net wrote: > >> that won't work out of the box as Karaf 4.2.x is still R6. >> >> It will work with Karaf 4.3.x

Re: Aries JAX-RS Whiteboard

2018-11-22 Thread Tim Ward
> that won't work out of the box as Karaf 4.2.x is still R6. Aries JAX-RS Whiteboard runs quite happily on R6. Obviously the DS component property annotations would create a DS 1.4 requirement, but the DS reference implementation also runs on R6. Even if you aren’t able to use DS 1.4, it’s

Re: Aries JAX-RS Whiteboard

2018-11-22 Thread Tim Ward
Hi, This is the set of bundles needed to get enRoute apps up and running: https://github.com/osgi/osgi.enroute/blob/7d534c287aa6e3ee9391f815d03ca4f81e480356/examples/quickstart/app/app.bndrun#L11-L25

Re: Aries JAX-RS Whiteboard

2018-11-22 Thread Tim Ward
> Is aries-jax-rs-whiteboard compatible with karaf does any one know? Or does > it depend on things that aren't provided, or rely on other things from later > OSGi specs that it doesn't support? I'm finding I'm having to add in a bunch > of bundles, and I'm wondering whether ultimately it's a

Re: Troubles upgrading to Karaf-4.2.1/DOSGi-2.3.0

2018-11-05 Thread Tim Ward
Hi > On 5 Nov 2018, at 12:59, Erwin Hogeweg wrote: > > Thanks Tim, > >> It looks like you haven’t installed the XML discovery provider. > Actually I did add the aries-rsa-discovery-local feature but that didn’t make > a difference. > >> Also, did you put the XML file(s) in the right place in

Re: Troubles upgrading to Karaf-4.2.1/DOSGi-2.3.0

2018-11-05 Thread Tim Ward
It looks like you haven’t installed the XML discovery provider. Also, did you put the XML file(s) in the right place in your bundle and add the relevant manifest header to point the discovery at the location in the bundle containing your XML file(s)? See: Aries RSA local discovery

Re: Enabling HTTPS

2018-10-26 Thread Tim Ward
The standard properties are described here https://osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html#d0e121935 Neither of the properties that you’ve named appear to be part of any standard,

Re: Http Whiteboard

2018-10-23 Thread Tim Ward
You should be able to do: HTTP_WHITEBOARD_SERVLET_PATTERN + ‘=’ + PATTERN_1, HTTP_WHITEBOARD_SERVLET_PATTERN + ‘=’ + PATTERN_2, HTTP_WHITEBOARD_SERVLET_PATTERN + ‘=’ + PATTERN_3, HTTP_WHITEBOARD_SERVLET_PATTERN + ‘=’ + PATTERN_4, ... Sent from my iPhone > On 23 Oct 2018, at 18:06, Leschke,

Re: Http Whiteboard

2018-10-23 Thread Tim Ward
seem that it’s still > necessary to define > Web-ContextPath .bnd file as it doesn’t appear to work without that. Is that > right? > > From: Tim Ward > Sent: Monday, October 22, 2018 4:28 PM > To: user@karaf.apache.org > Subject: Re: Http Whiteboard > > I

Re: Http Whiteboard

2018-10-22 Thread Tim Ward
I’m pretty sure that your ServletContextHelper isn’t advertised as a service and is therefore invisible to the whiteboard. ServletContextHelper is not an interface so you need to be explicit. Tim Sent from my iPhone > On 22 Oct 2018, at 23:04, Leschke, Scott wrote: > > > I’ve in the

Re: Running Camel in a Karaf OSGi container

2018-10-18 Thread Tim Ward
This is an argument that I hear a lot. I’m not a Camel expert, but it really sounds as though the DSL needs some work. The whole point of a DSL is that by being domain specific it is supposed to be natural and easy. Instead it sounds as though it is forcing people into using Blueprint despite

Re: DB Connection pool n ot getting created with KARAF 4.2.1 (Open JPA 3.0.0)

2018-10-05 Thread Tim Ward
Have you considered using the OSGi Transaction Control specification to manage all of this? It provides support for pooling and reliable resource management in a Database vendor independent way. The Reference implementation from Apache Aries supports both resource local and XA when using JPA.

Re: use JAXP compliant XML parser by OSGi service

2018-09-19 Thread Tim Ward
> * if it is safe to use "SAXParserFactory.newInstance();" static method call > or are there any reasons not to use it This method will use reflection to try to find and load an instance of SAXParserFactory. If you have one built into your Java runtime then this will be found because the

Re: use JAXP compliant XML parser by OSGi service

2018-09-18 Thread Tim Ward
It is similar, but the specification explains how to expose the SAXParserFactory from a bundle using the specification defined Activator. If you don’t have an implementation that has already been enhanced then you can create one based on the instructions in the specification chapter. Tim > On

Re: use JAXP compliant XML parser by OSGi service

2018-09-18 Thread Tim Ward
Hi, There’s an OSGi spec all about parsing XML. You can read it at https://osgi.org/specification/osgi.cmpn/7.0.0/util.xml.html . In summary, you want to be injected with a SAXParserFactory service and use that. Best Regards, Tim

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

2018-09-14 Thread Tim Ward
Also, Java 8 is still officially supported, Java 9 is no longer being updated, and Java 10 will go end of life (stop receiving updates) at the same time as Java 8. Tim > On 14 Sep 2018, at 16:20, Jean-Baptiste Onofré wrote: > > By the way, if you are not familiar with jigsaw module, maybe

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

2018-09-14 Thread Tim Ward
Yes, you’re tripping over one of the packages that was removed from Java because it was technically a Java EE package and could not be upgraded without upgrading Java. You either need to launch with the relevant modules enabled, or, as in the email below, add the API into your framework. The

Re: REST - Declarative Services

2018-09-06 Thread Tim Ward
Hi, So there have been a number of suggestions on this thread which are unnecessary, and will confuse matters. There is no need to provide a JAX-RS Application to use the JAX-RS whiteboard. The whiteboard always has a default application which is, unsurprisingly, what is used by default. The

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
gt; is only Maven after all! >> >> Tim >> >>> On 5 Sep 2018, at 15:32, Jean-Baptiste Onofré >> <mailto:j...@nanthrax.net>> wrote: >>> >>> Does it run in Karaf ? >>> >>> Regards >>> JB >>> >>

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
ng that Karaf doesn't make sense and other blabla. > That's why I didn't find the motivation to help ;) > > Anyway, back on the user request, @Adnan I will add an example using Aries > JAXRS in Karaf. > > Thanks, > Regards > > On 05/09/2018 16:41, Tim Ward wrote: >&

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
> > On 05/09/2018 16:30, Tim Ward wrote: >> OSGi enRoute contains tutorials and examples which cover using the JAX-RS >> whiteboard. They’re pretty quick to run through. >> >> https://enroute.osgi.org/Tutorial/ <https://enroute.osgi.org/Tutorial/> >>

Re: REST - Declarative Services

2018-09-05 Thread Tim Ward
OSGi enRoute contains tutorials and examples which cover using the JAX-RS whiteboard. They’re pretty quick to run through. https://enroute.osgi.org/Tutorial/ Best Regards, Tim > On 5 Sep 2018, at 15:18, atouat wrote: > > Hello to everybody, > > I wanted

Re: Examples of using Jersey with pax web whiteboard extender?

2018-07-24 Thread Tim Ward
> On 24 Jul 2018, at 17:00, Steinar Bang wrote: > >>>>>> Tim Ward : > >> Would it not be easier to: >> Use the Http Service Whiteboard support for resource serving, rather than >> having the ReactServlet? That’s a big bit of boilerplate for servi

Re: Examples of using Jersey with pax web whiteboard extender?

2018-07-24 Thread Tim Ward
Would it not be easier to: Use the Http Service Whiteboard support for resource serving, rather than having the ReactServlet? That’s a big bit of boilerplate for serving some static content. It should be much simpler using component properties/annotations - see

Re: aries remote service admin: Why needs consumer implementation?

2018-07-23 Thread Tim Ward
A JPA entity class leaks a lot of implementation detail, for example that you’re using JPA, what field maps to which database column, all sorts of mess. A good API type doesn’t make this sort of decision, the implementation should be free to use JPA, JDBC, Mongo, or whatever. This is why it’s

Re: aries remote service admin: Why needs consumer implementation?

2018-07-23 Thread Tim Ward
Hello, I’m afraid that this isn’t the right way to design a remote service, nor is it a particularly good way to design a service API. When designing an API it is important to separate the functions of the API from the data that those functions act upon and return. In this case you have

Re: Examples of using Jersey with pax web whiteboard extender?

2018-06-28 Thread Tim Ward
Have you considered using the OSGi R7 JAX-RS whiteboard ? It will almost certainly be easier than trying to set up your own JAX-RS runtime, and it’s designed to make building modular rest applications really easy. It also

Re: REST - Declarative Services

2018-05-30 Thread Tim Ward
Almost certainly the simplest option has already been suggested. The OSGi JAX-RS whiteboard provides a simple, standard mechanism for registering JAX-RS applications, resources, and extensions using the OSGi service registry. The Aries JAX-RS whiteboard is the Reference Implementation of this

Re: JPA (Hibernate) with Apache Karaf 4.2

2018-05-30 Thread Tim Ward
Have you all considered looking at the JPA example/tutorial in OSGi enRoute? This demonstrates how to use Aries JPA 2.7 (the reference implementation of the OSGi JPA Service 1.1) with Hibernate and Aries Transaction Control (the reference implementation of the OSGi Transaction Control Service)

Re: Aries JPA: The persistence unit has incomplete configuration and cannot be created.

2018-05-25 Thread Tim Ward
errors/warnings. Now, I would like to request for this > feature/enhancement (i.e. support JNDI DataSources) but I am not sure where > to make it. Is this something controlled by the OSGi committee or is it an > Aries JPA thing? > > Thank you for the help. > > Best regards, >

Re: Aries JPA: The persistence unit has incomplete configuration and cannot be created.

2018-05-25 Thread Tim Ward
Alex, As you’ve noticed in the log there are some “odd things” going on. What you’ve managed to do is to prod things in the correct order to reach a state that is not normally accessible! So what’s happening is: Error while creating the Dummy EntityManagerFactory to allow weaving. - This

Re: Aries JPA: The persistence unit has incomplete configuration and cannot be created.

2018-05-25 Thread Tim Ward
Hi Alex, It looks like you’ve managed to slide into a slightly awkward gap between the expected ways of configuring your persistence unit. The main issue here is that it is expected that you either include all DataSource information and configuration in the persistence.xml, or you don’t put

Re: MariaDB/JPA Transaction rollback not working

2018-05-18 Thread Tim Ward
.java:1607) >> ~[?:?] >> at >> org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) >> ~[?:?] >> at >> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) >> ~[?:?]

Re: MariaDB/JPA Transaction rollback not working

2018-05-18 Thread Tim Ward
gt; wrote: > > Great, I solved the Eclipse problem. Thanks. > > Yes, Karaf provides DS 1.3, but no DS 1.4 out off the box. > Maybe this is available from Aries? > > Best regards, > Alex soto > > > > >> On May 18, 2018, at 11:18 AM, Tim Ward <

Re: MariaDB/JPA Transaction rollback not working

2018-05-18 Thread Tim Ward
s for the project. Specifically in this case you seem to be building against a project which exposes the EntityManager interface somehow, but you don’t have the JPA API in your compile dependencies (normally these would come come in transitively from the project you depend on). I hope this he

Re: MariaDB/JPA Transaction rollback not working

2018-05-18 Thread Tim Ward
soto > > > > >> On May 17, 2018, at 2:08 PM, Tim Ward <tim.w...@paremus.com> wrote: >> >> Hi Alex, >> >> Bnd 4.0.0 was only released last Sunday, but this should have been changed >> yesterday in this commit >> https://github.com

Re: MariaDB/JPA Transaction rollback not working

2018-05-17 Thread Tim Ward
APSHOT in Bnd Snapshots > (https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/dist/bundles/) > -> [Help 1] > > > Any idea (time frame) when this will move from SNAPSHOT dependencies? > > > Best regards, > Alex soto > > > &

Re: MariaDB/JPA Transaction rollback not working

2018-05-17 Thread Tim Ward
ns about what is the correct way how to register a > transaction aware MariaDB DataSource. > > > Best regards, > Alex soto > > > > >> On May 17, 2018, at 1:46 AM, Tim Ward <tim.w...@paremus.com> wrote: >> >> The best place to start when looking

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Tim Ward
n: > > pool=narayana > xa=true > > Best regards, > Alex soto > > > > >> On May 16, 2018, at 4:12 PM, Tim Ward <tim.w...@paremus.com> wrote: >> >> The structure of the JNDI name is defined by the JNDI service specification. >> >&g

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Tim Ward
ervice/responder │ org.mariadb.jdbc.MySQLDataSource > osgi:service/jndi │ org.apache.karaf.jndi.internal.JndiServiceImpl > > > Best regards, > Alex soto > > > > >> On May 16, 2018, at 3:48 PM, Tim Ward <tim.w...@paremus.com> wrote: >> &

Re: MariaDB/JPA Transaction rollback not working

2018-05-16 Thread Tim Ward
Just looking quickly. You have the same JNDI name for both JTA and non JTA DataSources. This is clearly wrong as the DataSource cannot simultaneously be enlisted in the Transaction and not enlisted. The comments also indicate a misunderstanding of the purpose of the non-jta-datasource, which

Re: pax-jdbc-config connection pool configuration

2018-05-15 Thread Tim Ward
ng, but I can’t start using OSGi R7 > until it is released. > > > > Best regards, > Alex soto > > > > >> On May 15, 2018, at 3:00 AM, Tim Ward <tim.w...@paremus.com> wrote: >> >> Another option for connection pooling would be to use the O

Re: pax-jdbc-config connection pool configuration

2018-05-15 Thread Tim Ward
Another option for connection pooling would be to use the OSGi Transaction Control service from the R7 release. The resource providers all give implicit support for pooling, and the Aries implementation allows you to create them purely from configuration. The transaction control service also

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
> org.apache.openjpa.persistence.PersistenceProviderImpl > > osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/responder) > true > org.enquery.encryptedquery.responder.data.User > > >

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
openjpa >> pax-jdbc-mariadb >> pax-jdbc-config >> >> Among others. Now my bundle fails to start: >> >> Status: GracePeriod >> Declarative Services >> Blueprint >> 5/11/18 2:14 PM >> Missing dependencies: >> (&(osgi

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
> On 11 May 2018, at 15:53, Alex Soto <alex.s...@envieta.com> wrote: > > Thanks for the help Tim. > >> On May 11, 2018, at 10:24 AM, Tim Ward <tim.w...@paremus.com >> <mailto:tim.w...@paremus.com>> wrote: >> >> Aries JPA c

Re: OpenJPA with AriesJPA Java.peristence

2018-05-11 Thread Tim Ward
he.aries.jpa.container/2.6.1 start-level=30 > mvn:org.apache.aries.jpa/org.apache.aries.jpa.support/2.6.1 start-level=30 > > Best regards, > Alex soto > > > > >> On May 10, 2018, at 5:45 PM, Tim Ward <tim.w...@paremus.com >> <mailto:tim.w...@paremus.co

Re: OpenJPA with AriesJPA Java.peristence

2018-05-10 Thread Tim Ward
OpenJPA 2.4.x supports JPA 2.0 (not 2.1) you can get the API you need from Apache Aries, as well as the JPA container. This is also all used and tested with Aries Transaction Control, so you can look at the bundles used there. Best Regards, Tim Sent from my iPhone > On 10 May 2018, at 20:43,

  1   2   >