IPojo - ServiceUnavailableException?

2008-10-27 Thread Todor Boev
Hello, What does iPojo do if an active component (one running a thread) tries to access a service dependency that is not currently available? Does it cause the call to the dependency to throw something like ServiceUnavailableException? I.e. are the dependencies proxied or are they the raw serv

Re: IPojo - ServiceUnavailableException?

2008-10-27 Thread Todor Boev
Clement Escoffier wrote: When a thread try to use a temporal dependency... You mean a thread simply uses the reference stored in the respective component field to make a call to the dependency object? I.e. I can count on temporal dependencies to never be null. I.e. you do proxy the tempo

IPojo - universe of components?

2008-10-27 Thread Todor Boev
Hello, I was wondering what is iPojo's mission in life: just to make it a bit easier to code in OSGi or the grand idea to lift the Java language to a higher abstraction. This philosophical question is important to me because iPojo like most other DI frameworks seems highly viral. For example

Re: IPojo - universe of components?

2008-10-30 Thread Todor Boev
Richard S. Hall wrote: Yes, this is an open-ended question and there is likely no single answer. The mission of iPOJO is to make creating dynamic applications simpler. Precisely how you use it to accomplish this depends on your use case. The main debate, it seems, is when to use an object and

Re: IPojo - universe of components?

2008-10-30 Thread Todor Boev
I suppose I am looking at iPojo from the perspective of Guice and PicoContainer. The first tries to replace all object construction, while the second tries to do that and on top of it manage the subsequent lifecycle of objects. Still both of them operate within the usual OO paradigm. They just

iPojo on another OSGi framework?

2008-11-01 Thread Todor Boev
Hello, I plan to use iPojo on an OSGi framework different from Felix. So: 1) Will the iPojo bundles work on a generic OSGi 4.2 + service compendium environment? 2) Is it possible to port the "arch" console command to another console interface? Or alternatively is there some iPojo introspection A

Re: IPojo - universe of components?

2008-11-01 Thread Todor Boev
clement escoffier wrote: > That is not directly possible. However, you can do this as following: > public class ConsumerImpl { > // Temporal dependency on FooService > FooService fs; > > // An helper object > ConsumerHelper helper; > > > public ConsumerImpl() { > hel

iPojo - outside of Felix?

2008-11-01 Thread Todor Boev
Hello, I need to use iPojo outside of Felix. So: 1) Will the iPojo bundles work on a generic OSGi 4.2 framework + the standard service compendium? 2) Is there a way for me to use the "arch" command in such a setting? Regards, Todor --

Re: IPojo - universe of components?

2008-11-01 Thread Todor Boev
clement escoffier wrote: > That is not directly possible. However, you can do this as following: > public class ConsumerImpl { > // Temporal dependency on FooService > FooService fs; > > // An helper object > ConsumerHelper helper; > > > public ConsumerImpl() { > hel

iPojo - instance becomes immediate?

2008-11-02 Thread Todor Boev
Hello, As I was playing with the Hello example the following warning kept popping up until I declared the as immediate. [HelloClient] WARNING: The component HelloClient becomes immediate HelloClient is the component running a thread that calls Hello.sayHello(). Curiously when I declared immedia

iPojo: making my pojo constructor injected

2008-11-08 Thread Todor Boev
Hello, I managed to make my pojo appear to be constructor injected like so: @Component(name = "HelloClient", immediate = true) public class HelloClient { @Property private final int delay; @Requires private final Hello[] hello; private Thread thread; private boolean running; @Supp

Re: iPojo: making my pojo constructor injected

2008-11-08 Thread Todor Boev
Richard S. Hall wrote: When a thread enters the POJO, it creates a copy of any services the thread uses until the thread exits the POJO (even if the thread calls out from the POJO and re-enters it). When the thread makes a request for a service it always gets the same copy, so the thread never

iPojo: handlers and annotations.

2008-11-08 Thread Todor Boev
It would be nice to have an annotation like this @Handler(name="test", namespace="com.acme.test") public class TestHandler extends PrimitiveHandler { ... } or maybe even @Handler(annotation=Test.class) public class TestHandler extends PrimitiveHandler { ... } @Test(attribute1="val1", attri

Re: OSGi best practices

2008-12-05 Thread Todor Boev
William Drew wrote: I am looking for some guidance on best practices or well known approaches to building OSGi “enabled” applications. Currently I have an application that is started from the command line calling a class with a static main(). Ø java –classpath com.mycompany.MyApplicati

Re: OSGi best practices

2008-12-05 Thread Todor Boev
ling and starting new bundles? -----Original Message- From: Todor Boev [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2008 4:40 AM To: users@felix.apache.org Subject: Re: OSGi best practices William Drew wrote: I am looking for some guidance on best practices or well known approa

Testing the framework

2008-12-07 Thread Todor Boev
Hello, How do you validate the felix framework? I could not find testing code in http://svn.apache.org/repos/asf/felix/trunk/framework. Do you just run the OSGi TCK? Cheers, Todor - To unsubscribe, e-mail: [EMAIL PROTECTED] For

iPojo: can i have the metadata in my pom?

2008-12-09 Thread Todor Boev
Hello, Is there a way for me to instruct the iPojo maven plugin to consume the iPojo metadata directly from the my pom.xml. In this way I can have both my BND and iPojo configuration in the same place. Cheers, Todor - To unsu

Re: iPojo: can i have the metadata in my pom?

2008-12-10 Thread Todor Boev
trate how I imagine it working. And I hope you address it sooner ;) Regards, Clement 2008/12/9 Todor Boev <[EMAIL PROTECTED]> Hello, Is there a way for me to instruct the iPojo maven plugin to consume the iPojo metadata directly from the my pom.xml. In this way I can have both my BN

iPojo: Trying to add dynamic-proxies

2008-12-15 Thread Todor Boev
Hello, I am trying to add a new flavor of service dependency to iPojo. It's purpose in life is to provide the dynamic-proxy approach to service tracking. I.e. it will make iPojo a bit like Spring Dynamic Modules - but without the tons of XML and with a nicer architecture ;P I need this becaus

Re: RegisterService and asynchronicity

2009-02-13 Thread Todor Boev
The synchronous event delivery is an attempt to make service unregistration more graceful. This is the only way to provide an 'unregistering' event as opposed to 'unregistered'. E.g. when you receive the event the service is still up and you can gracefully stop using it. So before the call to

Re: RegisterService and asynchronicity

2009-02-13 Thread Todor Boev
Yup. It's just an "attempt" to make unregistration work - a failed one. Lately I am leaning ever more to the view that the only reasonable way to use services is to do it opportunistically like so: http://code.google.com/p/peaberry/issues/detail?id=27&can=1#c3 In this light all the hubbub with

Re: RegisterService and asynchronicity

2009-02-17 Thread Todor Boev
Richard S. Hall wrote: Perhaps you'd like this approach better if we had integrated transactions. :-) Just out of curiosity and if it's not too much troublewhat would these look like? :) - To unsubscribe, e-mail: use

Re: ServiceLoader and OSGi?

2009-05-18 Thread Todor Boev
Tim, Maybe your should check out the peaberry project. http://code.google.com/p/peaberry/ It is service layer agnostic and already comes with implementations for OSGi and Eclipse. All you need to do is implement ServiceRegistry for your "stand alone" use case and maybe you could reuse your Ser

What is the correct service import behavior?

2009-06-14 Thread Todor Boev
Hello, Seems I have been chewing on the service dynamics issue forever. Just as I though I got a workable concept about tracking and releasing services I stumble on a contradicting concept. The problem is this: According to my understanding it is not acceptable importer behavior to ever call servi

Re: What is the correct service import behavior?

2009-06-14 Thread Todor Boev
Richard S. Hall wrote: > > Yes. iPOJO is of the philosophy that service departures will likely lead > to errors, so you are better off being prepared to catch them and fail > gracefully, sort of like errors in distributed computing. Even if you > hold a dedicated lock, there is no guarantee that c

Re: What is the correct service import behavior?

2009-06-14 Thread Todor Boev
Todor Boev wrote: > Richard S. Hall wrote: >> Yes. iPOJO is of the philosophy that service departures will likely lead >> to errors, so you are better off being prepared to catch them and fail >> gracefully, sort of like errors in distributed computing. Even if you >> h

Re: What is the correct service import behavior?

2009-06-15 Thread Todor Boev
nope - peaberry doesn't hold any locks during the actual service call, it only has a small amount of synchronization to properly manage internal records when setting up and tearing down a service call Yup. I figured that would be the case after Richard's replay. Now the lock holding mode does

What is the correct service export behavior?

2009-06-15 Thread Todor Boev
This continues the "correct service import behavior" thread. I want to discuss the flip side of the coin - how to properly export. Currently there are two rules which I have not disputed (but maybe I should?): - A bundle should mushroom into a runtime object structure when activated and shrink

Re: DS or iPOJO or peaberry

2009-06-15 Thread Todor Boev
Dmitry Skavish wrote: Hello all, I am trying to understand the differences between those technologies, but I could not find any article which compares all them side by side. Can somebody summarize pros and cons or point me to page where this is already done? We are using Guice, so I guess the lo

Re: DS or iPOJO or peaberry

2009-06-20 Thread Todor Boev
> This sentence I do not understand: Service dynamics is one of the key > points of OSGi. > The key usage of dynamics is hot code update. Direct service references plus concurrent bundle updates make handling service dynamics quite disruptive to the normal application code.You have to sprinkle sy

Re: DS or iPOJO or peaberry

2009-06-20 Thread Todor Boev
Todor Boev wrote: > > Here's a descent comparison between Spring DM, OSGi DS and iPojo. > > http://www.slideshare.net/heiko.seeberger/jax-09-osgi-service-components-models > I actually meant to post this here detailed three way comparison: http://www.slideshare.net/

On bundle shutdown

2009-06-21 Thread Todor Boev
Hi fellow OSGi enthusiasts, I want to share with you a small article I wrote on deterministic vs fuzzy bundle shutdown. http://rinswind.blogspot.com/2009/06/shutdown-deterministic-vs-fuzzy.html It is a follow up on a much larger article about service dynamics but I tried to make it worth reading

Re: iPojo and Blueprint

2009-07-02 Thread Todor Boev
Charles Moulliard wrote: Neil, Thanks for the clarification. The idea that I promote behind my reply is not at all to debate which approach is better than the other but instead to make aware the opensource community that too much frameworks kill our goals/intents. The merit of EJB specification

Re: iPojo and Blueprint

2009-07-02 Thread Todor Boev
Neil Bartlett wrote: Charles, It was the evolution of Spring *outside* the EJB specifications that gave EJB the required impetus to improve. Likewise the existence of other component models outside of Blueprint and DS is useful to allow them to experiment with new ideas and potentially discove

Re: iPojo and Blueprint

2009-07-02 Thread Todor Boev
Guillaume Nodet wrote: I agree with most what you said. But when it comes to build an application, you can't really have your developers learn 3 different ways of doing the same thing, you kinda have to choose one and stick with it. I guess that's Charles' main concern here, because it's not abou

Re: dynamic access to services

2009-07-17 Thread Todor Boev
There are many ambiguities here. At least to me :) Some notes: 1) So every Function implementation represents some "formula" like this? FunctionA() = call "B" + call "C" 2) And you want to set "B" and "C" before you call "A"? 3) You have multiple instances identified with the same (name, versi

Re: dynamic access to services

2009-07-17 Thread Todor Boev
Lars Fischer wrote: This is what I'm asking for. I have not used OSGi before, so I have no experiences how to implement the dynamic retrieving of functions in a good way and how to get the system stable. If the retriever is an OSGi service and it uses the BundleContext#getService(ServiceRefer

Re: Question about bundle class loader lifecycle

2009-08-14 Thread Todor Boev
There is no well defined time. A class loader is garbage collected just like any other object. I.e. when there are no direct strong references to it. Objects refer to their reflective Class objects. And each Class object refers to the ClassLoader that *defined* it from raw bytes. When you un

Re: XStream and OSGi

2009-08-17 Thread Todor Boev
In the [3] link in your message the guy has tried this: xStream.setClassLoader(Thread.currentThread().getContextClassLoader()); Instead he should have tried this xStream.setClassLoader(getClass().getClassLoader()); The idea is to tell xStream to load classes from your own class loader, aka you

Re: XStream and OSGi

2009-08-17 Thread Todor Boev
Guido Spadotto wrote: > Another guy claimed he solved this issue [1], but I won't believe until > I see it running. > > ... > [1]: > http://archive.timeindexing.codehaus.org/lists/org.codehaus.xstream.user/msg/19183331.p...@talk.nabble.com > On second though I think this wrapper function should

maven-bundle-plugin: a postprocessing step?

2009-08-22 Thread Todor Boev
Hi, Has anyone contemplated the idea for a validation step after a bundle's manifest is generated? E.g. check if only exported packages are imported. It seems BND already detects OSGi manifests on the classpath to collect version information for the imports. So the manifests of all jars on the bui

Re: maven-bundle-plugin: a postprocessing step?

2009-08-25 Thread Todor Boev
Stuart McCulloch wrote: it depends how much of the JARs on the classpath are already OSGi bundles, a lot of the Maven projects I see using the bundleplugin are compiling against 'normal' JARs, so their manifests wouldn't have the necessary information Well the idea is to have two "layers" in

Re: Thread context class loader issues

2009-09-04 Thread Todor Boev
You might want to check this equinox page for detailed info on the problem: http://wiki.eclipse.org/index.php/Context_Class_Loader_Enhancements Generally speaking the context loader seems to be a not-that-trivial problem. - To u

Re: [ANN] Felix Logback version 1.0.0 Released

2018-07-12 Thread Todor Boev
Configuring loggers through ConfigAdmin creates a bootstrap problem: You won't get logs until ConfgAdmin is up. It however can also log. Even if this is not the case you have to find a way to handle logs in the window between framework startup and log configuration. One way is to do an initial dire

Re: [ANN] Felix Logback version 1.0.0 Released

2018-07-12 Thread Todor Boev
properties rather than the logback xml... On Thu, Jul 12, 2018 at 11:18 AM Todor Boev wrote: > Configuring loggers through ConfigAdmin creates a bootstrap problem: > You won't get logs until ConfgAdmin is up. It however can also log. Even > if this is not the case you have to find a way to

Bundle inspection command for gogo

2018-11-13 Thread Todor Boev
Hello, Can we add a "bundle" command to gogo that will list a readable summary for a target bundle? Calling BundleContext.getBundle() and looking at the raw object print is almost useless. Also is there any reason this was not done until now? Regards, Todor

Re: Bundle inspection command for gogo

2018-11-13 Thread Todor Boev
why the output of the lb command doesn't > look > > terrible. It seems to lack an implementation for the INSPECT level > however. > > > > Regards, > > Neil > > > > On Tue, Nov 13, 2018 at 9:38 AM Todor Boev wrote: > > > >> Hello, > >&

Gogo commands: return result or print?

2019-01-18 Thread Todor Boev
Hi, When implementing a Gogo shell command are there any rules of thumb on whether I should return a result from the command method or print it on System.out? Possibly using the CommandSession to format it first. What bothers me is that AFAIK the automatic printing of return values from command m

Re: Gogo commands: return result or print?

2019-01-18 Thread Todor Boev
ggestion is to avoid using sys.out/err whenever possible. > > - Ray > > On Fri, Jan 18, 2019 at 9:53 AM Todor Boev wrote: > > > Hi, > > > > When implementing a Gogo shell command are there any rules of thumb on > > whether I should return a result from the com

Re: Gogo commands: return result or print?

2019-01-18 Thread Todor Boev
ends Map>" just to workaround erasure. But then I better export my type too ..or not? On Fri, Jan 18, 2019 at 5:53 PM Raymond Auge wrote: > On Fri, Jan 18, 2019 at 10:39 AM Todor Boev wrote: > > > Ok, but the formatter doesn't always do what I want. > > > > Righ