Hi,

I am not so deep with Camel or ServiceMix, so I am not sure what I am 
describing below is possible or not but I will try...

To my understanding, the flag publish-context:=true, export following 
interfaces from the bundle as service. So theoretically, it is possible to get 
a reference to a bean that is living under the service over interface 
ApplicationContext...

org.springframework.osgi.context.DelegatedExecutionOsgiBundleApplicationContext,
org.springframework.osgi.context.ConfigurableOsgiBundleApplicationContext,
org.springframework.context.ConfigurableApplicationContext,
org.springframework.context.ApplicationContext,
org.springframework.context.Lifecycle,
org.springframework.beans.factory.ListableBeanFactory,
org.springframework.beans.factory.HierarchicalBeanFactory,
org.springframework.context.MessageSource,
org.springframework.context.ApplicationEventPublisher,
org.springframework.core.io.support.ResourcePatternResolver,
org.springframework.beans.factory.BeanFactory,
org.springframework.core.io.ResourceLoader,
org.springframework.beans.factory.DisposableBean

And I think actually, this is my problem with cxf:bean:xxx in Camel. When I use 
the this construct in routing bundle, camel looks to the local application 
context and can't find the bean under cxf:bean:xxx because xxx is created under 
another bundle, but if try to access the other bundles ApplicationContext over 
the service and get a refence to it, it meight function or not?

Thx for the answer....




T-Mobile Deutschland GmbH
Aufsichtsrat: Timotheus Höttges (Vorsitzender)
Geschäftsführung: Dr. Georg Pölzl (Sprecher), Thomas Berlemann, Thomas 
Dannenfeldt, Albert Henn,
Dr. Christian P. Illek, Dr. Bruno Jacobfeuerborn, Dr. Dirk Rohweder 
Handelsregister: Amtsgericht Bonn, HRB 59 19
Sitz der Gesellschaft: Bonn
WEEE-Reg.-Nr.: DE60800328



-----Ursprüngliche Nachricht----- 
Von: Willem Jiang [mailto:[email protected]] 
Gesendet: Mittwoch, 23. September 2009 03:22
An: [email protected]
Betreff: Re: AW: Seperating cxf component and the router componet in 
ReportIncident example

Hi Salgar,

I checked the Spring DM document, the publish-context option is for publishing 
the application context as the OSGi Service.
Just as what I mentioned in last mail, there is no interface which can help you 
get all the information that we need to set up a cxf endpoint.

So please take the consideration of using
  <import resource="classpath:META-INF/xxx.xml"/>
if you want to reuse the cxfEndpoint configuration from other bundle

Willem
Salgar, Mehmet (external) wrote:
> Hi,
> 
> thx for the answer...
> 
> That is what I was afraid of....
> 
> My next question would be, I know that in ServiceMix bundles are activated 
> with Spring DM and Spring DM is able to export ist application context if 
> "<Spring-Context>*;publish-context:=true;create-asynchronously:=false</Spring-Context>"
>  is in the MANIFEST....
> 
> So, theoretically camel can access the other bundles application context and 
> access cxf:bean:xxx or not....
> 
> Is there a programmatical impossiblity in this scenerio or is it just not 
> implemented..
> 
> Thx for the answers...
> 
> 
> 
> 
> T-Mobile Deutschland GmbH
> Aufsichtsrat: Timotheus Höttges (Vorsitzender)
> Geschäftsführung: Dr. Georg Pölzl (Sprecher), Thomas Berlemann, Thomas 
> Dannenfeldt, Albert Henn, Dr. Christian P. Illek, Dr. Bruno 
> Jacobfeuerborn, Dr. Dirk Rohweder
> Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: 
> Bonn
> WEEE-Reg.-Nr.: DE60800328
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Willem Jiang [mailto:[email protected]]
> Gesendet: Freitag, 18. September 2009 09:30
> An: [email protected]
> Betreff: Re: Seperating cxf component and the router componet in 
> ReportIncident example
> 
> Hi,
> 
> I don't think it is possiable to export the CxfEndpoint as an OSGi service 
> and import it in another bundle, because you can't find a interface which can 
> help you get all the properties of the CxfEndpoint.
> 
> I think you can try to include the configuration of CxfEndpoint in your 
> another bundle's spring configuration file.
> 
> Willem
> 
> Salgar, Mehmet (external) wrote:
>> Hi everybody,
>>
>> I had succesfully deployed the ReportIncident example of camel in 
>> servicemix osgi environment deployed...
>>
>> Then I start to experiment it by taking routing elements to another 
>> bundle (called router)....
>>
>> Now when I start the router bundle it is complaining that it is not 
>> able to find the cxf:bean:xxx that is started up at cxf bundle....
>>
>> Is not possible to reference beans in camel context that are created 
>> in another bundle.
>>
>> That would be a pity, I was hoping to create routing bundles and use 
>> the versioning advantages of the osgi to be to deploy and switch on 
>> the runtime new versions....
>>
>> Or is it possible make it work somehow...
>>
>> Thx for the answers....
>>
>>
>> T-Mobile Deutschland GmbH
>> Aufsichtsrat: Timotheus Hottges (Vorsitzender)
>> Geschaftsfuhrung: Dr. Georg Polzl (Sprecher), Thomas Berlemann, 
>> Thomas Dannenfeldt, Albert Henn, Dr. Christian P. Illek, Dr. Bruno 
>> Jacobfeuerborn, Dr. Dirk Rohweder
>> Handelsregister: Amtsgericht Bonn, HRB 59 19 Sitz der Gesellschaft: 
>> Bonn
>> WEEE-Reg.-Nr.: DE60800328
>>
>

Reply via email to