I'm not sure I follow are you suggesting something that might work today or an 
alternative change? 

Alasdair Nottingham

On 22 Feb 2011, at 22:21, Timothy Ward <timothyjw...@apache.org> wrote:

> 
> Hi,
> 
> Just a query, but I'm assuming that we can't just new up an instance of the 
> Server and inject into the static methods as if they were instance methods on 
> a normal bean? I don't believe we do any checking to see whether property 
> setters are static or not. This seems like it would be the simplest solution, 
> and wouldn't involve adding a new namespace.
> 
> Regards,
> 
> Tim
> 
> ----------------------------------------
>> Date: Tue, 22 Feb 2011 21:08:14 +0100
>> Subject: Re: Void factory method
>> From: gno...@gmail.com
>> To: user@aries.apache.org
>> 
>> As others have indicated, that's clearly outside of the specs.
>> However, I see two different improvements we could add to Aries
>> Blueprint to support such use cases:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> or (maybe closer to the underlying jetty model):
>> 
>> 
>> init-method="start" destroy-method="stop">
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> I haven't given that a lot of thoughts, and I'm not really sure how/if
>> this can actually be implemented ...
>> Both could actually be useful I suppose.
>> 
>> 2011/2/22 Łukasz Dywicki :
>>> Hello,
>>> I have small problem with Aries. I try to configure jetty with blueprint.
>>> Jetty requires to register some objects using void methods, for example:
>>> Server.addConnector(Connector).
>>> 
>>> I try to use blueprint XML:
>>> 
>>> 
>>>       init-method="start" destroy-method="stop"
>>>    />
>>> 
>>> 
>>> depends-on="jersey">
>>> 
>>> 
>>> class="org.eclipse.jetty.server.nio.SelectChannelConnector">
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> This configuration causes following error:
>>> org.apache.aries.blueprint - 0.2.0.incubating | Unable to start blueprint
>>> container for bundle jetty-server
>>> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
>>> instantiate components
>>>       at
>>> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEager
>>> Components(BlueprintContainerImpl.java:628)[7:org.apache.aries.blueprint:0.2
>>> .0.incubating]
>>>       at
>>> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintC
>>> ontainerImpl.java:315)[7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintCon
>>> tainerImpl.java:213)[7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6
>>> .0_21]
>>>       at
>>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21
>>> ]
>>>       at
>>> java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]
>>>       at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$
>>> 301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_21]
>>>       at
>>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Sch
>>> eduledThreadPoolExecutor.java:207)[:1.6.0_21]
>>>       at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
>>> va:886)[:1.6.0_21]
>>>       at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
>>> 08)[:1.6.0_21]
>>>       at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]
>>> Caused by: java.lang.NullPointerException
>>>       at
>>> java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:881)[:1.6.
>>> 0_21]
>>>       at
>>> org.apache.aries.blueprint.container.BlueprintRepository.addPartialObject(Bl
>>> ueprintRepository.java:357)[7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> org.apache.aries.blueprint.di.AbstractRecipe.addPartialObject(AbstractRecipe
>>> .java:84)[7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.ja
>>> va:736)[7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[
>>> 7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(Blu
>>> eprintRepository.java:219)[7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> org.apache.aries.blueprint.container.BlueprintRepository.createAll(Blueprint
>>> Repository.java:147)[7:org.apache.aries.blueprint:0.2.0.incubating]
>>>       at
>>> org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEager
>>> Components(BlueprintContainerImpl.java:624)[7:org.apache.aries.blueprint:0.2
>>> .0.incubating]
>>>       ... 10 more
>>> 
>>> 
>>> 
>> 
>> 
>> 
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>                         

Reply via email to