Re: [osgi-dev] Correct processor types for ARM?

2020-04-13 Thread Chris Gray via osgi-dev
Hi Peter, I would argue that it is "os.arch" which is a bit of a mess, because it attempts to represent too much in a single name. Compare this with the set of "triples" here : http://llvm.org/doxygen/classllvm_1_1Triple.html I would argue that these definitions would be a more useful way to

Re: [osgi-dev] Correct processor types for ARM?

2020-04-13 Thread Chris Gray via osgi-dev
Hi Peter, I would argue that it is "os.arch" which is a bit of a mess, because it attempts to represent too much in a single name. Compare this with the set of "triples" here : http://llvm.org/doxygen/classllvm_1_1Triple.html I would argue that these definitions would be a more useful way to

Re: [osgi-dev] R: Api compile-only and remote services

2018-02-08 Thread Chris Gray via osgi-dev
In my experience it is quite often handy to have a separate API bundle - yours is one use case, another is where the system may run on different platforms which require different implementations for some services (cloud vs development machine, embedded vs dev, self-contained demo vs real

Re: [osgi-dev] looking for OSGi plug-in

2017-06-13 Thread chris . gray
You could try asking your colleagues, Huawei claim to have a few hundred people working on OSGi? > Hi > > Now I've got an OSGi based RG, which declared support OSGi 3rd party > plug-in, I am looking for some plug-In to install on the RG. > > Do you know where could I get it? Such as OSGi plug-in

Re: [osgi-dev] Problem with configuration admin

2017-06-05 Thread chris . gray
It's very useful. But the bit about the "two-parameter getConfiguration method using null (no location) as the second parameter" should maybe be mentioned from the start, because it's not at all obvious and I remember getting bitten by this myself a few years back. > Hi, > > I wrote a blog post

Re: [osgi-dev] Different conceptual version numbers for different forms of backwards compatibility?

2017-05-05 Thread chris . gray
> On Thu, May 4, 2017 at 5:19 PM, BJ Hargrave wrote: > >> Again, see https://docs.oracle.com/javase/specs/jls/se7/html/jls- >> 13.html#jls-13.4.15. >> >> If an API is released and then you change the API such that the return >> type is different, e.g. List to Collection, that

Re: [osgi-dev] osgi broker bundle

2017-02-18 Thread chris . gray
As I said I haven't tried Moquette yet because I didn't yet have the need to run an MQTT broker in an OSGi context. However the developer specifically mentions the *possibility* of "running inside an embedded OSGi broker like Concierge" so it would be worth contacting him about it.

Re: [osgi-dev] osgi broker bundle

2017-02-17 Thread chris . gray
If you really only need MQTT then I think you should be looking at a dedicated MQTT broker rather than an all-singing, all-dancing message boroker like ActiveMQ. Moquette looks promising (caveat - I haven't tried it. yet) > Hi guys, > > I'm looking on how deploying an MQTT broker into an osgi

Re: [osgi-dev] Hi

2016-11-11 Thread chris . gray
> As soon as a bundle accesses resources of another bundle these classes are > instantiated. A bundle that is uninstalled can only be completely purged > once the last class of that bundle is garbage collected. Which can only happen when there are no longer any references to any instance of any

Re: [osgi-dev] A middle ground between hard dependencies and purely dynamic dependencies (DS)

2016-10-12 Thread chris . gray
I hesitate to prolong this thread, but FWIW: Google can index PDFs just fine, what their seachbot doesn't do is to click through "I agree to ..." checkboxes. Whether the "front page" of a web site should always display the same information is another question. Most don't. > These sides are

Re: [osgi-dev] Rest Management service

2016-08-16 Thread chris . gray
Daghan scripsit: > also I prefer to use an artifact instead of building from source due to > Licencing issues. We live in strange times. ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] Clarify usage of ServiceTracker

2016-04-15 Thread chris . gray
Scripsit Raymond: > -1% - blueprint (we have a test that fails the build if someone tries to Personally I would make this -100% :-) I don't regard DS as "magic", because what it does is rather straightforward conceptually and is clearly described in the specification. I only wish I could say

Re: [osgi-dev] Run a bundle as a certain jaas user

2016-03-01 Thread chris . gray
JAAS (like Shiro and other frameworks) ultimately relies on JavaSE's java.security.AccessController - as does java.lang.SecurityManager. So these frameworks effectively replace the SecurityManager - and as they do not link access to a code source they don't need the stack-inspection magic that

Re: [osgi-dev] Understanding OSGi Initial Provisioning and Deployment Admin

2015-12-14 Thread chris . gray
If I want the log service to start first then I make every service depend on the log service, mandatorily. And then if the log service restarts then so does everything else, but so what? Just make sure the log service doesn't restart halfway through boot ... > On 14/12/15 18:29, Peter Kriens

Re: [osgi-dev] common osgi confussions

2015-11-03 Thread chris . gray
I recently had the luxury of being able to impose my preferences on the whole team, because I was the whole team. ;-) Here's what I did: 1) Bundle naming convention different to package name conventions - I used two- or three-word names in CamelCase e.g. ShimmerPolishApi for the polishing API of

Re: [osgi-dev] Is it possible to define services programatically using the blueprint container

2015-10-22 Thread chris . gray
They even eat XML (GD) > Did you checkout Declarative Services? > > Kind regards, > > Peter Kriens > >> On 21 okt. 2015, at 22:47, Leschke, Scott wrote: >> >> I will do that. Thanks. I was interested in the Blueprint/XML route >> mostly because I’m reasonably

Re: [osgi-dev] Valid coordinator scenario?

2015-08-03 Thread chris . gray
To me this is less bad than having the coordination hang around for who- knows- how- long in a ThreadLocal (or similar), but tastes may vary. I've created an OSGi issue to clarify whether below snippet is supposed to always work and after discussing this with BJ, that code is bound to fail as

Re: [osgi-dev] Bndtools OSGi Project not running on ARM7 - But OK on DEV machine

2015-06-28 Thread chris . gray
This is normal behaviour for a Java application which is spiralling out of control. ;) As in infinite recursion, or stuck in a tight loop trying to create a component and always failing. You should take this up on the felix mailing list, and preferably post the stack trace instead of I get an

Re: [osgi-dev] Bndtools OSGi Project not running on ARM7 - But OK on DEV machine

2015-06-23 Thread chris . gray
But do you know why? It's working now! On 21.06.2015 20:09, chris.g...@kiffer.be wrote: If you are launching the giant jar in both cases then that does indeed reduce the differences to a minimum. Therefore I think you need to look at things outside of the jar: the Java version, the

Re: [osgi-dev] Bndtools OSGi Project not running on ARM7 - But OK on DEV machine

2015-06-21 Thread chris . gray
If you are launching the giant jar in both cases then that does indeed reduce the differences to a minimum. Therefore I think you need to look at things outside of the jar: the Java version, the database (is it accessible on the ARM7 target, with the same credentials?), anything which is being

Re: [osgi-dev] Bndtools OSGi Project not running on ARM7 - But OK on DEV machine

2015-06-20 Thread chris . gray
So we have the same bundles running on the same framework ... what are the other variables? Maybe another JDBC driver or a different JVM for example? Neither should make a big difference, but you never know. Or the framework is being launched with different parameters - on DEV it is presumably

Re: [osgi-dev] Bndtools OSGi Project not running on ARM7 - But OK on DEV machine

2015-06-19 Thread chris . gray
Fortunately Peter is not the only one on this mailing list ;-) I'm no Blueprint wizard, but it does look very as much as if bambu is in a bit of a tizz about spring.framework.transaction.annotation. Probably the framework you are deploying into has different versions of some modules to what you

Re: [osgi-dev] whiteboard pattern extenders

2015-06-19 Thread chris . gray
It fails because equinox's FiltereServiceListener (as ServiceTracker registers a ServiceListener) does the following: if (allservices || ServiceRegistry.isAssignableTo(context, reference)) { } The call to ServiceRegistry.isAssignableTo(context, reference) fails when context (A)

Re: [osgi-dev] whiteboard pattern extenders

2015-06-18 Thread chris . gray
I haven't ever built I agree with BJ. If the wicket extender were a wicket whiteboard, rather than an extender, then I think we would expect it to track wicket services and then register Servlet services using its own context as a result of finding them. This is the same thing that lots of

Re: [osgi-dev] whiteboard pattern extenders

2015-06-18 Thread chris . gray
I haven't ever built a wicket extender, but I did once make a contraption which automagically generated a REST interface based on information in the target bundle. In this case B registers servlets which will be picked up by C, so far so good, but these servlets result in calls to classes which

Re: [osgi-dev] whiteboard pattern extenders

2015-06-17 Thread chris . gray
Now I'm the one that's lost, perhaps because part of clause B) below has been eaten by gremlins. Suppose that my extender recognises some magic header in your bundle and uses it to generate a Servlet which acts as a plug-in for the Felix web console. Would that be an example? On Wed, Jun 17,

Re: [osgi-dev] whiteboard pattern extenders

2015-06-17 Thread chris . gray
I think that B (the extender) must register the Servlet service using its own BundleContext, since it is the bundle that actually creates the Servlet objects. +1 For DS the situation is different: the SCR knows nothing about the services it is registering on behalf of other bundles, it just

Re: [osgi-dev] whiteboard pattern extenders

2015-06-17 Thread chris . gray
Since B is the one creating the service objects, B must be wired up to C in order to use the same runtime package. The fact that these objects are being created because of some magic cookies in A doesn't really change very much - B could as well register a servlice every time it receives a tweet

Re: [osgi-dev] Change service properties using OSGI API

2015-05-20 Thread chris . gray
The question does arise, why exactly do you want to do this?. I felt such a need once in the past, but ended by deciding that actually it wasn't such a good idea. If you want to use this to for indicate that for example a component has switched from active to standby mode then you may find you

Re: [osgi-dev] osgi-dev Digest, Vol 103, Issue 2

2015-05-05 Thread chris . gray
Frank Do try to be precise, it can be quite handy when developing software. ;-) If you only want your service to start up if-and-when some service is available, make a (mandatory) @Reference to that service. If you want something else, then be more precise as to what it is that you want ... I

Re: [osgi-dev] service tracker precedence

2015-04-15 Thread chris . gray
Then you have been lying to us when you said that provider A cannot be changed; you have the source code. ;-) Trying to make a delegating proxy like this is really quite hard, believe me (and others in this thread). Are you saying that B should use a persistent and distributed event handling

Re: [osgi-dev] Packaging OSGi for (desktop) Windows

2015-04-14 Thread chris . gray
Hi Tim, As in http://stackoverflow.com/questions/17742961/how-to-write-a-an-osgi-command-line-application? I should have known - if there is a possible use for it, bnd can do it! Indeed this reduces my problem to that of creating an installer for a Java application, for which there are plenty of

[osgi-dev] Packaging OSGi for (desktop) Windows

2015-04-13 Thread chris . gray
Hi all, I'm developing a Windows taskbar app which revolves around a Java library, so I am using OSGi to build it. This part is going just fine, but once the app is working I have to find a way to distribute it so that it can be installed by highly qualified medical personnel, i.e. complete

Re: [osgi-dev] Packaging OSGi for (desktop) Windows

2015-04-13 Thread chris . gray
Indeed, looks like the client is an OSGi app. Certainly worth a look, thanks for the tip! Hi, I am only a user of jitsi but what I see it is pretty easy to install and use it: https://jitsi.org/ It is a skype-like chat, video conference and screen sharing app that is based on Apache Felix.

Re: [osgi-dev] persistence, lazy loading and service dynamic

2015-03-19 Thread chris . gray
Hi Andreas, So I think with some unlucky timing there allways remains a small risk of failure when calling a service due to service dynamic. Yes. My question is, if it is possible to avoid this small risk? No. Or to put it another way: when you invoke a service you are always (in principle)

Re: [osgi-dev] Declarative Services - Idea

2015-03-18 Thread chris . gray
Hi Florian, It's the SCR which picks up those XML files when the bundle containing them is installed, and therefore knows what service interfaces it should be listening for and which components need to be injected with those services when they appear (and to de-inject them when they disappear).

Re: [osgi-dev] getting a service filtered on my bundleId

2015-03-08 Thread chris . gray
The first time I used built a WAB I spent some time going quietly insane because I was using DS (of course) and I ended up with two instances of my service object, one created by DS and one by the WS container. That was an easy one - kill the WAB - but in general I think there will always be

Re: [osgi-dev] setting contextClassLoader inside library bundles

2015-02-23 Thread chris . gray
IMO TCCL is BAD, end of story. Just do what you have to do, when you have to. In OSGi, just use the bundle's existing class loader. But there is no general purpose solution to setting the TCCL in OSGi since there is no one class loader that would have visibility to the types some arbitrary

Re: [osgi-dev] Routing service calls?

2015-01-14 Thread chris . gray
On 14 Jan 2015, at 08:23, Christian Schneider ch...@die-schneider.net wrote: How about using a special property for the routing proxy? Publish it with the same interface as the backend services but give it a service property like proxy=true. Then in the front end you can filter for a service

Re: [osgi-dev] Faking DS for classpath libraries

2014-10-02 Thread chris . gray
Thanks BJ, I was aware of org.osgi.framework.system.packages.extra but I had overlooked org.osgi.framework.bundle.parent=app. It's no problem to set these as I am indeed in charge of launching the framework. Do I also need to take some steps to ensure that the consumers get wired up to my bundle

Re: [osgi-dev] Start a bundle from BundleTrackerCustomizer.addingBundle()

2014-10-01 Thread chris . gray
You could probably solve the callback problem by launching a separate thread to call the start method (although it's an interesting challenge to make sure that this, too, does not execute too soon). However I want to use start/stop, because I want the bundles out of memory when stopped. I don’t

Re: [osgi-dev] [SNMP4J] SNMP4J and OSGI

2014-09-15 Thread chris . gray
Hi Daniel, I can only say that I used snmp4j in an OSGi project a year or two ago and I don't remember having any particular difficulties. I did make my own bundle containing snmp4j and all its dependencies, either the servicemix bundle didn't exist back then or I didn't find it. Have you

Re: [osgi-dev] bundle.getDataFile(string)

2014-08-13 Thread chris . gray
Marcel wrote: If you ask me, it definitely is. I know a lot of people kill the bundle cache on every startup and re-install all bundles each time, but I would advocate that that is bad practice in OSGi. Hear hear. In fact if there are anti-patterns out there then this is one of them - and

Re: [osgi-dev] Solving Split Packages for the MongoDB Java Driver

2014-08-01 Thread chris . gray
Anger is of course but one possible reaction; there is also laughter or indeed tears. If this is the same org.mongodb.mongo-java-driver as I am using in a project then 1. I think I'll go for tears and 2. there are about 300 classes in com.mongodb itself (not counting the subpackages, which each

Re: [osgi-dev] How to model hierarchically complex configuration for components

2013-10-03 Thread chris . gray
hmm.. too bad. You could always base64-encode it and replace +/= by .-_ GDR On Wed, Oct 2, 2013 at 2:28 PM, Peter Kriens peter.kri...@aqute.biz wrote: I think the config admin spec recommends (SHOULD) that a property key is a symbolic name, this leaves out square brackets ... Kind regards,

Re: [osgi-dev] Fabric Service Model - Request for feedback

2013-09-13 Thread chris . gray
Amen! Christian, I consider that to be one of the worst features of Blueprint, so I would be very opposed to adding it to DS! Regards Neil On Fri, Sep 13, 2013 at 11:17 AM, Christian Schneider ch...@die-schneider.net wrote: I think you can take a look at what aries blueprint does for

Re: [osgi-dev] Fabric Service Model - Request for feedback

2013-09-11 Thread chris . gray
Wise words (as usual) from Neil. I'd like to single out these sentences for printing out and hanging on the wall: as the caller of a service it is simply not your concern to try to enforce something about the implementation of the service you are calling. You should however be prepared for the

Re: [osgi-dev] Fabric Service Model - Request for feedback

2013-09-10 Thread chris . gray
Chris Gray ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev

Re: [osgi-dev] best pattern for instance factories

2012-12-20 Thread chris . gray
Ray, What we have is a typical event handler scenario: processEvent(Event event) { Handler[] handlers = getHandlers(key); for (Handler handler : handlers) { handler.process(event); } } I'd like to be able to use osgi to affect the handlers result set during runtime. This is a

Re: [osgi-dev] best pattern for instance factories

2012-12-20 Thread chris . gray
Raymond Auge wrote: What we have is a typical event handler scenario: processEvent(Event event) { Handler[] handlers = getHandlers(key); for (Handler handler : handlers) { handler.process(event); } } I'd like to be able to use osgi to affect the handlers result set

Re: [osgi-dev] What is OSGi bundle profiling going on?

2012-06-03 Thread chris . gray
of any crime, and moreover stopping bundle A will not solve the problem (since B is holding references to the objects). If the JVM would support Isolates (JSR121), it might be possible to device an efficient inter-isolate communications protocol to invoke Remote Services on another Isolate ... Chris

Re: [osgi-dev] Loading dynamically generated classes

2012-03-20 Thread chris . gray
Hi Davd, The bundle that registers the service could create this custom class loader with its bundle class loader as its parent, and with appropriate imports for that bundle the custom class loader would be able to resolve external references in your bag of class bytes. This would include the

Re: [osgi-dev] Loading dynamically generated classes

2012-03-19 Thread chris . gray
Justin, Why does this design require that these classes be exported? As long as the bundle registering them as services has access to the dynamic classes, no other bundle needs to. That is correct, and the recipient of a proxy service objects have no legitimate interest in its implementation;

Re: [osgi-dev] CPU Measurement on a Bundle

2012-01-28 Thread chris . gray
[vide infra] Sorry by the simplistic idea, but catching the execution of methods with AOP cannot help to measure their execution time? If method a of bundle A calls method b of bundle B, which in turn calls InetAddress.getByName(), then the execution time measured for a will include the

Re: [osgi-dev] CPU Measurement on a Bundle

2012-01-27 Thread chris . gray
Sorry by the simplistic idea, but catching the execution of methods with AOP cannot help to measure their execution time? If method a of bundle A calls method b of bundle B, which in turn calls InetAddress.getByName(), then the execution time measured for a will include the execution time

Re: [osgi-dev] Monitorable PID length: bump

2011-11-21 Thread chris . gray
that the length is limited to 32 characters). However in 119.7.2 it is stated that The length of the PID must not exceed 20 characters. Am I missing something, or is there an inconsistency here? Best regards Chris Gray ___ OSGi Developer Mail List

Re: [osgi-dev] Question about Memory Usage per Bundle

2011-11-18 Thread chris . gray
). -- Chris Gray How do you define how much memory a bundle uses? It is generally not possible to do this unless you have a very specific definition of memory use. Bundles can extend classes imported from other bundles. Bundles can call other bundles which allocate memory for the caller

[osgi-dev] Monitorable PID length

2011-11-17 Thread chris . gray
). However in 119.7.2 it is stated that The length of the PID must not exceed 20 characters. Am I missing something, or is there an inconsistency here? Best regards Chris Gray ___ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman

Re: [osgi-dev] Restart OSGi framework programatically

2011-06-20 Thread chris . gray
Hi, I need to restart an OSGi application programmatically in Java. How can I do this? AFAICT the official way is to call Bundle.update() on the system bundle. Thanks for all proposals. I only need to restart the OSGi Framework, not the entire JVM. You mentioned a system bundle, do you

Re: [osgi-dev] Monitoring the SCR

2011-06-09 Thread chris . gray
Hi Felix, I once started on a new API which I intended to propose to the OSGi as the standard DS admin API [1]... But somehow this always was pushed back by some other work; I should pick this up again, probably ;-) Probably. :-) I can see it being a real boon for both testing and diagnostic

Re: [osgi-dev] ZK Web Application Framework with OSGi

2011-06-07 Thread chris . gray
Hi BJ, I don't know anything about ZK, but it would seem to be loading classes by name which is problematic in a modular system. See http://www.osgi.org/blog/2011/05/what-you-should-know-about-class.html How true. Not so long ago I discovered another such pseudo-random hack lurking in (at

[osgi-dev] Monitoring the SCR

2011-06-07 Thread chris . gray
Working with DS, I often feel the need to dig in and find out how the various components are getting along. Some frameworks have shell commands which allow one to examine the status of components (e.g. Felix, mBS) while others haven't or at least not yet (Knopflerfish). What I would most like

RE: [osgi-dev] exception aggregation for error reporting?

2011-03-13 Thread chris . gray
Creating a ThreadGroup is one thing, getting rid of it is quite another - you have to call ThreadGroup.destroy() from outside the ThreadGroup after all the member threads have terminated. Otherwise you have a classloader leak:

Re: Service cleanup best practices (Was: [osgi-dev] What happens to class instances when bundle containing the class unloads)

2011-02-21 Thread chris . gray
Peter A very cheap way to do what I want is to let the VM just throw some runtime exception on any object that is from a stale class loader. You make it all sound so easy. :-) If you mean throw some runtime exception on any *access to* object that is from a stale class loader then you are

Re: Service cleanup best practices (Was: [osgi-dev] What happens to class instances when bundle containing the class unloads)

2011-02-20 Thread chris . gray
NJB Given that there is no way to take an object away from someone who has a reference to the object, the service contract should state the behavior of the object outside of its defined life time. I remember a conversation with Peter a few years ago where Peter was wondering whether it would

Re: [osgi-dev] OSGi dynamics

2011-02-19 Thread chris . gray
[Peter Kriens] Of course you're right that there is an issue with when you consider the application to have started, whether successfully or unsuccessfully. DS does not consider a component with unsatisfied references to be any kind of error, because the services that would make it a satisfied