Re: [osgi-dev] Declarative Services and references with configurable cardinality

2014-02-26 Thread Neil Bartlett
Why not just use the whiteboard pattern? You said: whiteboard ... does not make sure that all of the servlets are available at the time the server is started. Why is that important? Regards Neil -- Neil Bartlett Sent from a phone On Wednesday, 26 February 2014 at 09:47, Balázs Zsoldos

Re: [osgi-dev] heavy synchronization of ServiceTracker impls

2014-01-14 Thread Neil Bartlett
Unfortunately most frameworks export the tracker package directly, rather than from a separate bundle, despite it not being part of the core spec. BJ, what's to stop a framework providing an optimised ServiceTracker implementation? The tracker package is very odd in that OSGi directly provides

Re: [osgi-dev] DDD and OSGi, and newbie problems

2013-11-17 Thread Neil Bartlett
Actually I hope that with JPM4J integration (see jpm4j.org) we will be able to do much better than Maven... As Ferry points out, the problem with using Maven central directly is that most of its contents are not bundles. JPM is an effort to create a global repository for OSGi bundles, however we

Re: [osgi-dev] DDD and OSGi, and newbie problems

2013-11-17 Thread Neil Bartlett
Yes your understanding is exactly right. You can use multiple versions of the same module concurrently. There is one caveat, which is to do with the interfaces between the modules. You said that A depends on B v1, and C depends on B v2. That's fine unless A and C need to communicate with each

Re: [osgi-dev] DDD and OSGi, and newbie problems

2013-11-17 Thread Neil Bartlett
at large scale to create bundles externally for each new jar version. Christian Am 17.11.2013 11:44, schrieb Neil Bartlett: Actually I hope that with JPM4J integration (see jpm4j.org) we will be able to do much better than Maven... As Ferry points out, the problem with using Maven central

Re: [osgi-dev] DDD and OSGi, and newbie problems

2013-11-17 Thread Neil Bartlett
to accept all the decisions already made by others. As for Windows... I'm sorry but Windows will always be a second or even third class platform for developers. Neil -- Neil Bartlett Sent from a phone On Sunday, 17 November 2013 at 11:41, Tom Eugelink wrote: On 2013-11-17 11:44, Neil

Re: [osgi-dev] What to do next

2013-10-03 Thread Neil Bartlett
Did you take a look at the book suggestions you received on the other mailing list? I particularly recommend OSGi in Action (Hall et al) and Enterprise OSGi in Action (Ward and Cummins).After that, it's best to try to apply what you have learned to something real, even if it's only small scale.

Re: [osgi-dev] What to do next

2013-10-03 Thread Neil Bartlett
...@gmail.com) wrote: Just a curiosity... why Bndtools uses Ant instead Maven ? Cristiano On 03/10/13 13:49, Neil Bartlett wrote: Did you take a look at the book suggestions you received on the other mailing list? I pa

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

2013-09-13 Thread Neil Bartlett
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 these cases.

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

2013-09-13 Thread Neil Bartlett
be interested to learn why and what would be better behaviours. Perhaps the blueprint standard can be enhanced. Christian On 13.09.2013 12:19, Neil Bartlett wrote: Christian, I consider that to be one of the worst features of Blueprint, so I would be very opposed to adding it to DS

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

2013-09-10 Thread Neil Bartlett
Thomas, if you use DS idiomatically then the service reference cannot change to null during your method call. First, as Chris pointed out, static references will not change while your component is active, because as soon as the referenced services goes away your component will be deactivated. So

Re: [osgi-dev] Bundle's update(InputStream input), and String getLocation() methods.

2013-06-18 Thread Neil Bartlett
The Bundle.update() method does not take a location URL as input. Regards, Neil -- Neil Bartlett Sent from a phone On Tuesday, 18 June 2013 at 14:34, antonin.chaza...@orange.com wrote: Dear, I have a question about Bundle's update(InputStream input), and String getLocation

Re: [osgi-dev] idea for repository management configuration

2013-04-26 Thread Neil Bartlett
Yep... Require-Capability: osgi.service; filter:=(objectClass=org.example.foo.MyService); effective:=active; resolution:=optional; (the 'effective' directive is not directly related to optionality, but is probably a good idea when talking about a service dependency) Neil On Fri, Apr 26, 2013

Re: [osgi-dev] idea for repository management configuration

2013-04-26 Thread Neil Bartlett
at 7:31 PM, Raymond Auge raymond.a...@liferay.comwrote: Got it! Was a wishful over-simplification I guess. On Fri, Apr 26, 2013 at 2:26 PM, Neil Bartlett njbartl...@gmail.comwrote: Not really. The resolver is just a service that resolves a set of capabilities and requirements, and works out

Re: [osgi-dev] multiple property values on a DS component

2013-04-16 Thread Neil Bartlett
Yes there is. You don't specify which flavour of annotations you are using. Assuming the standard ones from DS 1.2: @Component(properties = { foo=bar, foo=baz }) Alternatively with the bnd annotations: @Component(properties = foo=bar|baz) Regards Neil On Tue, Apr 16, 2013 at 9:12 PM,

Re: [osgi-dev] multiple property values on a DS component

2013-04-16 Thread Neil Bartlett
DS spec allowed for it. On Tue, Apr 16, 2013 at 4:23 PM, Raymond Auge raymond.a...@liferay.comwrote: Thank you Neil, Sorry, I'm currently using the bnd annotations (1.50.0, haven't upgraded yet, will soon). - Ray On Tue, Apr 16, 2013 at 4:17 PM, Neil Bartlett njbartl...@gmail.comwrote

Re: [osgi-dev] Interpretation of semantic versioning?

2013-04-15 Thread Neil Bartlett
How? If such a scanning tool could exist, and was able to tell the difference between a consumer type and a provider type in arbitrary code, then we could use the same technique in our build tool and dispense with the Provider/ConsumerType annotations. Neil On Mon, Apr 15, 2013 at 3:50 AM,

Re: [osgi-dev] Splitting provider and consumer types in packages. (Was: Re: Interpretation of semantic versioning?)

2013-04-15 Thread Neil Bartlett
I strongly disagree as well. The co-location of interfaces within a package is the best indicator that they are related; if we separate them then we lose this connection and all concept of what the contract is. Example: ConfigurationAdmin (provider) and ConfigurationListener (consumer). The

Re: [osgi-dev] Provide both blueprint and DS ?

2013-03-28 Thread Neil Bartlett
Yes you can do this without any problems. Just include both the Service-Component header for DS, and the blueprint XML files under OSGI-INF/blueprint. You will also need both the corresponding runtime bundles installed and active. Then it will all Just Work (TM). Neil On Thu, Mar 28, 2013 at

Re: [osgi-dev] Provide both blueprint and DS ?

2013-03-28 Thread Neil Bartlett
:) 2013/3/28 Neil Bartlett njbartl...@gmail.com Both will be registered. DS will register the service(s), and Blueprint will also register the service(s). If there are any overlaps then you may get two instances of some services. I don't think it's a very good idea to do this. A more

Re: [osgi-dev] Static variable not so static after bundle update.

2013-02-03 Thread Neil Bartlett
You need to show where the getInstance() method is called. Since you don't call it from your start() or stop() method, I suspect you must be calling it from another bundle or a thread. Both of these could cause the old version to be pinned in memory; meaning you will have both the old and new

Re: [osgi-dev] What to do with inherited dependencies

2013-01-29 Thread Neil Bartlett
: *A unique subscription service for key technologies in your project. *Rebaze Onsite: *Our way to improving your development team on site. On Tue, Jan 29, 2013 at 2:21 PM, Neil Bartlett njbartl...@gmail.comwrote: This seems an entirely reasonable requirement. It doesn't come from PDE

Re: [osgi-dev] Fwd: Branching, versioning and API changes

2013-01-28 Thread Neil Bartlett
This is another reason why you should keep APIs separate from implementations. While there is often a need to go back and change an old version of an implementation package, APIs should really only ever move forwards. For example if you really need to delete a method that you added in version 1.1,

Re: [osgi-dev] What's the best way to deal with split packages?

2013-01-22 Thread Neil Bartlett
Yes, sorry -- I agree with Tom's amended approach. On Tue, Jan 22, 2013 at 3:53 PM, David Bosschaert david.bosscha...@gmail.com wrote: Thanks all for the responses. On 22 January 2013 15:32, Neil Bartlett njbartl...@gmail.com wrote: The best way to deal with split packages is to hot have

Re: [osgi-dev] API consumer vs provider

2013-01-16 Thread Neil Bartlett
Very good question. This is why we distinguish between provider implemented and consumer implemented interfaces. Usually to a developer the role of the interface is clear, as you have intuitively grasped: interfaces that are merely callbacks or listeners are generally consumer implemented. In bnd

Re: [osgi-dev] Question on ExportedPackage#getImportingBundles()

2012-07-31 Thread Neil Bartlett
No, behaviour 2 is correct. The result from getImportingBundles() represents wirings, and there is no purpose in creating a wiring from a bundle to itself. When you see a bundle importing and exporting a package, it means that the framework has a choice to select either the import OR the export.

Re: [osgi-dev] Bundles in a bundle

2012-07-10 Thread Neil Bartlett
Rainer, When I recommended that technique I wasn't aware of the existing functionality in CQ5 that Felix mentioned. Since that does exist I would now recommend you use that -- there's no point reinventing the wheel. Regarding your point about installation order: in OSGi you should never have to

Re: [osgi-dev] Generating repository.xml files

2012-07-05 Thread Neil Bartlett
David, I am maintaining Bindex and also Bindex2 which is the new R5-based version. It can be found on the rfc112 branch of the same GitHub project, and it is quite far along in terms of functionality. Contributions welcome. Regards Neil On Thu, Jul 5, 2012 at 9:45 AM, David Bosschaert

Re: [osgi-dev] Question of Export Package

2012-06-04 Thread Neil Bartlett
uot;q" package can be found. Kind regards, Neil Bartlett Shigekuni Kondo 4 June 2012 13:08 Hi OSGi Experts,I have questions about Export Package in Core spec(R4.3).[Condition]BundleA: Import-Package: p, r Export-Package: q; uses:=pBundleB: Import-Package: qBundl

Re: [osgi-dev] OSGI cmpn and enterprise jars

2012-05-09 Thread Neil Bartlett
i.orghttps://mail.osgi.org/mailman/listinfo/osgi-dev Neil Bartlett 9 May 2012 06:04 Hello Balzs, With regard to service versioning, OSGi does already do this, pretty much exactly as you have described. But you seem to be saying that this is missing. Could you clarify please? Reg

Re: [osgi-dev] OSGI cmpn and enterprise jars

2012-05-09 Thread Neil Bartlett
. Neil On Wed, May 9, 2012 at 9:42 AM, Neil Bartlett njbartl...@gmail.com wrote: There are advantages and disadvantages with both approaches, i.e. including service APIs in the provider bundle versus separating them into pure API bundles. Each approach involves trade-offs, and as a result even

Re: [osgi-dev] OSGI cmpn and enterprise jars

2012-05-08 Thread Neil Bartlett
Hello Balzs, With regard to service versioning, OSGi does already do this, pretty much exactly as you have described. But you seem to be saying that this is missing. Could you clarify please? Regards, Neil Balzs Zsoldos 9 May 2012 00:31 Hi,first of all, I am sorry I

Re: [osgi-dev] Services from a Fragment Bundle

2012-01-23 Thread Neil Bartlett
This is correct/expected behaviour. The Service-Component header is ignored if it appears in the manifest of a fragment, however the XML descriptor can appear in a fragment if it is referenced from the Service-Component header in the manifest of its host bundle. See section 112.4.1 of the

Re: [osgi-dev] Re: Bundle ActivationPolicy question

2012-01-11 Thread Neil Bartlett
Guillaume, In this case the bundle will be fully started, i.e. forced to start without regard for its policy. Because of this I recommend that you *always* start bundles with the START_ACTIVATION_POLICY flag. I believe that it was discussed that the default behaviour of the zero-arg start()

Re: [osgi-dev] Re: Bundle ActivationPolicy question

2012-01-11 Thread Neil Bartlett
with you that in general, lazy activation is a hack... it complicates the bundle lifecycle and is too easily abused. I am much more a fan of the style of laziness supported by DS and iPOJO. Neil On Wednesday, 11 January 2012 at 17:20, Richard S. Hall wrote: On 1/11/12 12:04 , Neil Bartlett

Re: [osgi-dev] Re: Bundle ActivationPolicy question

2012-01-11 Thread Neil Bartlett
Yes, I believe that it should always require an explicit operation to activate a bundle. If the framework were to automatically start a bundle from RESOLVED state then there would be no way for a deployer to disable a bundle, short of uninstalling it. Neil On Wednesday, 11 January 2012 at

Re: [osgi-dev] Re: Bundle ActivationPolicy question

2012-01-11 Thread Neil Bartlett
is used. I guess I agree with you that eager activation should always be possible, but following the bundle's policy makes most sense to me as a default. Neil On Wednesday, 11 January 2012 at 17:45, Richard S. Hall wrote: On 1/11/12 12:34 , Neil Bartlett wrote: Unfortunately I have seen

Re: [osgi-dev] Re: Retrieve bundle's missing dependencies

2011-11-30 Thread Neil Bartlett
Hello Matias, My apologies, somebody should have tried to answer this question much earlier. Blueprint does not do anything like this. You may want to use it for other things, but it's irrelevant for the problem you describe. Nor is there really anything in core OSGi... the core can tell you

Re: [osgi-dev] Bind and unbind sequence is DS service update.

2011-10-26 Thread Neil Bartlett
Giuseppe, Bear in mind that it's also important what the target service is doing. If there is one target service and it goes away very briefly (e.g. for its bundle to be updated) then the component binding to it will of course have to be unbound first and then rebound later. The dynamic

Re: [osgi-dev] Logging Patterns

2011-10-11 Thread Neil Bartlett
Raymond, I think you may have gone off on a tangent there. Why shouldn't a library like XStream depend on the OSGi LogService? It's only a couple of interfaces… far better than Log4J or Commons Logging or even SLF4J. There is nothing in the ideals of OSGi that is opposed to modern Java

Re: [osgi-dev] 2 questions

2011-09-30 Thread Neil Bartlett
Hi Ferry, Could you clarify question 1? I don't understand what you're asking for there. In reply to point 2, and not disagreeing with anything Mike said… standard OBR (both the current released version and the new RFC) can do this too, but you need an index generator that knows about DS. The

Re: [osgi-dev] Maintaining package versions

2011-07-31 Thread Neil Bartlett
Hello Lindsay, These are excellent questions. I agree with you that maintaining versions is too hard for humans to manage, and tools need to take over most of this task. Before getting into what tools can do, make sure you have read the OSGi Semantic Versioning whitepaper[1], which sets out the

Re: [osgi-dev] Cannot cast reference from ServiceTrackerCustomizer.addingService().

2011-07-03 Thread Neil Bartlett
It sounds likely that you are picking up an incompatible service. Check whether you open the ServiceTracker with open(true) or open(false)... or just open(), which is equivalent to open(false). FYI the open(false)/open() variant is nearly always correct. To explain a little more... the service

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

2011-06-07 Thread Neil Bartlett
I know as little as BJ does about ZK... however, if those resources are being loaded from bundles then you may be able to assume that the class names they refer to are classes either contained in visible from the same bundle that contained the resource. In which case you could use the

Re: [osgi-dev] Monitoring the SCR

2011-06-07 Thread Neil Bartlett
Chris, The Felix SCR implementation offers a service interface org.apache.felix.scr.ScrService that gives you an introspection API for the state of DS components. I believe the Equinox DS implementation now offers the same service, so it's becoming a kind of de facto standard, but I would also

Re: [osgi-dev] Unregister EventHandler inside its handleEvent method

2011-06-04 Thread Neil Bartlett
Hi Phillipp, The OSGi service registry itself won't care about you doing this. The EventAdmin implementation *might*, but it depends on the implementation's internals... though they should be able to handle this scenario cleanly. Here is what should happen: 1) Your handler is called by the

Re: [osgi-dev] OSGI++ / OSGI4COM

2011-03-28 Thread Neil Bartlett
You only mentioned it once, and you said it's not an option because it's C rather that C++. I'm curious why that matters? When it comes to type safety, even Java OSGi is not particularly typesafe as services must be casted before they can be used. At least this will remain the case until 4.3

Re: [osgi-dev] Is it possible to stop the framework inside an Activator start method?

2011-03-09 Thread Neil Bartlett
Just to add one additional point: I believe that a bundle should never call System.exit(). As a bundle you don't know whether you are in a pure OSGi runtime, or whether OSGi is embedded inside a larger application. Use one of the techniques described by Thomas and Richard to shutdown the

Re: [osgi-dev] how best to integrate OSGi into existing app

2011-03-03 Thread Neil Bartlett
Hi Hamlet, My responses inline below. On Fri, Mar 4, 2011 at 6:50 AM, Hamlet DArcy hamlet.da...@canoo.com wrote: Hi all, I am hoping for some architectural/design guidance. I have an existing application that loads executes Groovy scripts from disk in order to provide custom logic to

Re: [osgi-dev] how best to integrate OSGi into existing app

2011-03-03 Thread Neil Bartlett
Inline again... On Fri, Mar 4, 2011 at 7:24 AM, Hamlet DArcy hamlet.da...@canoo.com wrote: My goal is to have groovy.* packages in the Import-Package list but not the Export-Package list. Then it will be a dependency that can vary between bundles. And it needs to vary between bundles. We

Re: [osgi-dev] HttpContext with multiple backing resource bundles

2011-02-28 Thread Neil Bartlett
Bram, The HttpContext can load resources from wherever it likes, based on whatever rules it chooses. The implementations in Felix etc that you have found are just that: implementations. They do not imply any constraint on other potential implementations. Regards, Neil On Mon, Feb 28, 2011 at

Re: [osgi-dev] Classloader accessibility and ServiceTracker.open(true)

2011-02-22 Thread Neil Bartlett
Scott, I think that for the older frameworks, registering the service against the API bundle (i.e. the exporter) is probably the best compromise. It does limit the RSA provider to supporting only one version of the service interfaces in case there are multiple, but this feels like a reasonable

Re: [osgi-dev] Classloader accessibility and ServiceTracker.open(true)

2011-02-21 Thread Neil Bartlett
On Mon, Feb 21, 2011 at 10:49 AM, Peter Kriens peter.kri...@aqute.biz wrote: I think we have think a bit deeper. Assume you have 2 exporters of IFoo that are both compatible with the proxy you generate. Shouldn't you create a proxy for both? Ideally yes, but this doesn't seem to be

Re: [osgi-dev] Classloader accessibility and ServiceTracker.open(true)

2011-02-20 Thread Neil Bartlett
Hi Scott, Replies inline. On Sun, Feb 20, 2011 at 3:58 PM, Scott Lewis sle...@composent.com wrote: First a little background ServiceTracker has two open methods: public void open(boolean trackAllServices) and public void open()    (which calls open(false)) The javadocs for

Re: [osgi-dev] OSGi dynamics

2011-02-19 Thread Neil Bartlett
is in a consistent state and ensure that all services are started, right? Eugen Am 16.02.2011 um 18:53 schrieb Neil Bartlett: Hi Eugen, This is a very interesting question, thanks for asking it! I appreciate that dynamics are not a big feature of enterprise applications, but there is one

Re: [osgi-dev] OSGi dynamics

2011-02-17 Thread Neil Bartlett
inconsistently. But in OSGi there is no point in time where I can ensure that my application is in a consistent state and ensure that all services are started, right? Eugen Am 16.02.2011 um 18:53 schrieb Neil Bartlett: Hi Eugen, This is a very interesting question, thanks for asking it! I

Re: [osgi-dev] OSGi dynamics

2011-02-16 Thread Neil Bartlett
Hi Eugen, This is a very interesting question, thanks for asking it! I appreciate that dynamics are not a big feature of enterprise applications, but there is one time when ALL applications are dynamic, and that is during startup (also, less importantly, during shutdown). This is what I find

Re: [osgi-dev] OSGi-eclipse files creation issues

2011-02-10 Thread Neil Bartlett
the OSGi 4 jar in the class path then set the below mentioned property in my application. But then also the behavior is unchanged. Regards Vikash Agrawal -Original Message- From: osgi-dev-boun...@mail.osgi.org [mailto:osgi-dev-boun...@mail.osgi.org] On Behalf Of Neil Bartlett Sent

Re: [osgi-dev] OSGi-eclipse files creation issues

2011-02-09 Thread Neil Bartlett
] on behalf of Neil Bartlett [njbartl...@gmail.com] Sent: Wednesday, February 09, 2011 8:13 AM To: OSGi Developer Mail List Subject: Re: [osgi-dev] OSGi-eclipse files creation issues Hi Vikash, All OSGi frameworks need to create a data storage area, to allow them to persist and restore the state

Re: [osgi-dev] Are Service-to-service dependencies expressed by DS?

2011-01-03 Thread Neil Bartlett
DS principally defines *components*. A component can depend on a service by declaring a reference element in its XML descriptor (or if you're using the cool Bnd annotations, an @Reference annotation in the Java source). In addition a component can itself provide a service, using the service

Re: [osgi-dev] Factory for registering services in Declarative Service

2010-11-19 Thread Neil Bartlett
Why do you feel that DS disobeys the ServiceFactory contract? Sent from my BlackBerry On 19 Nov 2010, at 10:12, Martin Ždila m.zd...@mwaysolutions.com wrote: On Fri, Nov 19, 2010 at 11:04 AM, Neil Bartlett njbartl...@gmail.com wrote: Creating objects of different classes based

Re: [osgi-dev] Remote OSGI

2010-10-14 Thread Neil Bartlett
Peter, As far as I can tell, CXF DOSGi is no longer actively maintained. It is the reference implementation, but it has serious bugs that are not being fixed. ECF is not yet compliant with the latest specification, so is a little behind CXF in that respect. However the ECF team are actively

Re: Auto Reply: [osgi-dev] Problem with service replacement using declarative services

2010-09-27 Thread Neil Bartlett
Wouldn't it be nice if we could get these auto-replies and other spam removed from the mailing list?? On Mon, Sep 27, 2010 at 7:39 AM, ashish.motiv...@oracle.com wrote: I am out of office and will be back on Oct 3rd. I will periodically check email. If this is urgent, pl contact my manager,

Re: [osgi-dev] Resolution problem

2010-09-08 Thread Neil Bartlett
Is adding the split attribute to the Import-Package really the best solution? It assures that the importer gets only part of the package, and it also makes a mess of the manifest. Surely it's better to ensure that an aggregating bundle exists... then importers can simply import org.eclipse.ui

Re: [osgi-dev] question about class space in OSGi R4 core

2010-08-30 Thread Neil Bartlett
Michael, Private packages merely means the packages that are not exported by a bundle. They are only visible within that bundle, hence private. In contrast, a package that is exported is public. The class space of a bundle can of course also include the public packages of that bundle. However,

Re: [osgi-dev] question about class space in OSGi R4 core

2010-08-30 Thread Neil Bartlett
Of Neil Bartlett Sent: Monday, August 30, 2010 11:25 AM To: OSGi Developer Mail List Subject: Re: [osgi-dev] question about class space in OSGi R4 core Michael, Private packages merely means the packages that are not exported by a bundle. They are only visible within that bundle, hence

Re: [osgi-dev] A question about UNINSTALL Operation...

2010-07-29 Thread Neil Bartlett
Take a look at the refreshPackages method of the PackageAdmin service. Note that the refresh operation is intended to delimit batched uninstall/update operations by a management agent. For example if you have 10 bundles to uninstall, then do NOT refresh between each bundle, but save it until all

Re: [osgi-dev] OSGi

2010-06-16 Thread Neil Bartlett
David, The JAR File Specification allows you to place whatever arbitrary headers you like in the MANIFEST.MF. They will be ignored by OSGi. Regards, Neil On Wed, Jun 16, 2010 at 7:36 AM, David Conde dco...@citic.es wrote: Hi, What could I use in order to provide some custom information in

Re: [osgi-dev] Re: javax.swing problems

2010-06-16 Thread Neil Bartlett
Like Tom, I'm concerned that you have fixed the problem in the wrong way, ie a way that will create bigger problems later. What did you change in config.ini? Rgds, Neil Sent from my BlackBerry® -Original Message- From: Asier Aranbarri Beldarrain aranbar...@gmail.com Sender:

Re: [osgi-dev] OSGi

2010-06-16 Thread Neil Bartlett
Agreed, except the extender pattern usually means examining installed bundles using the Bundle.getHeader() or Bundle.getEntry() methods. David talked about examining bundles *before* installation, which implies using the java.util.Jar API to read jars from the filesystem. Neil On Wed, Jun 16,

Re: [osgi-dev] Which is the best way to signal an error in activate method??

2010-05-03 Thread Neil Bartlett
Andrea, That sounds about right. With DS1.1 using the activate attribute of the component element, the method can throw both checked and unchecked exceptions. In either case SCR should log the error to LogService (if present) and should not register any services for the instance. Neil On Mon,

Re: [osgi-dev] Problem with Events

2010-04-08 Thread Neil Bartlett
I meant whichever bundle was throwing the error. Never mind as you have stated they are all active. Trying the Felix event admin will not help. As I said, this problem has nothing to do with implementations, it is a static class resolution problem. Unfortunately it is impossible to debug the

Re: [osgi-dev] Problem with Events

2010-04-06 Thread Neil Bartlett
have the same build        configuration.        Thanks for your help, appreciated ,        Asier        On 30 March 2010 14:19, Neil Bartlett njbartl...@gmail.com        mailto:njbartl...@gmail.com mailto:njbartl...@gmail.com        mailto:njbartl...@gmail.com wrote

Re: [osgi-dev] Problem with Events

2010-04-06 Thread Neil Bartlett
2010 14:19, Neil Bartlett njbartl...@gmail.com        mailto:njbartl...@gmail.com mailto:njbartl...@gmail.com        mailto:njbartl...@gmail.com wrote:           The listener bundle is not importing the package           org.osgi.service.event.           This should have been caught at build

Re: [osgi-dev] Problem with Events

2010-03-30 Thread Neil Bartlett
The listener bundle is not importing the package org.osgi.service.event. This should have been caught at build-time. What development environment or OSGi tooling are you using? Eclipse PDE would show this as a compilation error, and bnd (or a bnd-based tool such as Maven's bundle plugin) would

Re: [osgi-dev] problem while receiving an Event

2010-03-16 Thread Neil Bartlett
stacktrace to see where the problem is. Miguel On Tue, Mar 16, 2010 at 12:55 PM, Neil Bartlett njbartl...@gmail.com wrote: Eva, You haven't given the stack trace of the error or much other context, e.g. it looks like it should be coming from the dispatching thread rather than from

Re: OSGi Framework persistence underspecified ? (was: Re: [osgi-dev] Osgi Launchers Question)

2010-03-05 Thread Neil Bartlett
I'm not uncomfortable with the delayed flushing of the caches. After all, we're talking about the JVM either crashing or being forcibly shutdown -- we shouldn't expect it to be able to recover to exactly the same state. So long as the framework is able to detect the problem when it next starts

Re: [osgi-dev] Osgi Launchers Question

2010-03-04 Thread Neil Bartlett
My apologies, I misread your email; I though you said you WERE using -clean. Neil On Thu, Mar 4, 2010 at 12:58 PM, Neil Bartlett njbartl...@gmail.com wrote: David, If you are using the -clean option then this explains why the bundles are disappearing. I recommend not using the -clean option

Re: [osgi-dev] How to persuade Boss to adopt OSGI ?

2010-03-02 Thread Neil Bartlett
Nobody is suggesting that OSGi is a bad choice for your scenario. It's just that there is nothing in your scenario that particularly requires OSGi -- everything is fairly easily achievable with other, perhaps more mainstream, technologies. Therefore the case to make to your boss must focus on the

Re: [osgi-dev] Equinox + HSQLDB

2010-02-22 Thread Neil Bartlett
There is nothing wrong with using the org.hsqldb.jdbc.JDBCDriver class. Asier: have you packaged HSQLDB as an OSGi bundle, or have you added it to your bundle classpath using the Bundle-Classpath header? Note that it is not enough to simply put a copy of hsqldb.jar inside your bundle. However, I

Re: [osgi-dev] How Event Admin is supposed to work???

2010-02-11 Thread Neil Bartlett
Andrea, Concurrent delivery is certainly an option for EventAdmin implementers to support, but it is not mandated by the specification. To put it bluntly, I think that the existing open source implementations come nowhere near to offering the kind of powerful features that EventAdmin

Re: [osgi-dev] OSGi Queuing spec

2010-02-11 Thread Neil Bartlett
Wim, At the low level this can be achieved by registering instances of the java.util.concurrent.Executor interface (from the Java 5 concurrency libs) as services -- then a bundle wishing to execute work can submit it to a registered Executor rather than explicitly create its own threads. The

Re: [osgi-dev] Loading .properties outside classpath

2010-02-01 Thread Neil Bartlett
Sorry if I am missing something obvious, but what is wrong with new FileInputStream(...) ? Neil On Mon, Feb 1, 2010 at 9:12 AM, Asier Aranbarri Beldarrain aranbar...@gmail.com wrote: Hi everyone: I need to load a config.properties file from outside an osgi bundle and I'm having real issues

Re: [osgi-dev] Loading .properties outside classpath

2010-02-01 Thread Neil Bartlett
2010 10:41, Jean-Baptiste Onofré j...@nanthrax.net wrote: Hi Neil, The FileInputStream() usage is correct too. I simply focus on another way to do it using blueprint :) Regards JB Neil Bartlett wrote: Sorry if I am missing something obvious, but what is wrong with new FileInputStream

Re: [osgi-dev] Configuring a bundle from an external file

2010-01-05 Thread Neil Bartlett
-file-install-part-2-dynamic-configurations/ Miguel Sent from Madrid, Spain On Mon, Jan 4, 2010 at 2:25 PM, Neil Bartlett njbartl...@gmail.com mailto:njbartl...@gmail.com wrote:     Miguel,     FileInstall by default looks in a directory named load relative to     the working directory

Re: [osgi-dev] Problems with OSGi PostEvent

2009-11-09 Thread Neil Bartlett
Asier, Do you have an event admin bundle installed and active? The Equinox implementation is called org.eclipse.equinox.event. Without that bundle active you will of course always get null when trying to obtain the EventAdmin service. Regards, Neil On Mon, Nov 9, 2009 at 12:01 PM, Asier

Re: [osgi-dev] Re: osgi-dev Digest, Vol 37, Issue 4

2009-11-09 Thread Neil Bartlett
you to join orkut! (cato kato)   2. Problems with OSGi PostEvent (Asier Aranbarri Beldarrain)   3. Re: Problems with OSGi PostEvent (Neil Bartlett) -- Message: 1 Date: Mon, 09 Nov 2009 06:07:29 + From: cato kato

Re: [osgi-dev] Resolution of bundles importing and exporting the samepackage

2009-06-19 Thread Neil Bartlett
I see. From experience, it will always be wired to the existing package, but I'm not sure if this is mandated behaviour. Neil On Fri, Jun 19, 2009 at 2:27 PM, Guillaume Nodetgno...@gmail.com wrote: My question, is more if foo-2.0 is already installed and then we install foo-1.0, is there a

Re: [osgi-dev] Certain service registration

2009-05-05 Thread Neil Bartlett
bundles whose names end with .serviceimpl in a dedicated startUp-bundle. Kind regards, Eugen Am Apr 30, 2009 um 16:23  schrieb Neil Bartlett: While I agree with Peter and Hal, I think the heart of your problem is the mismatch between the preferred lifecycles of bundles in Eclipse

Re: [osgi-dev] Getting the bundle from which a class originates

2009-01-06 Thread Neil Bartlett
David, You can use the getBundle(Class) method of the PackageAdmin service. To quote the JavaDocs: Returns the bundle from which the specified class is loaded. The class loader of the returned bundle must have been used to load the specified class. If the class was not loaded by a bundle

Re: [osgi-dev] OSGi and obfuscation

2008-12-11 Thread Neil Bartlett
I have had some experience with obfuscating an Eclipse RCP application. As Richard points out, obfuscation of the internal bytecode of methods is not a problem. However, most obfuscators also try to rename classes, methods and packages in order to make it harder to understand what they are for,

<    1   2