Re: Automatic bundle restart

2017-02-01 Thread souciance
Hmm I am using Camel blueprint to connect to Karaf.  Would I have to write
specific OSGI code for this or?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Automatic-bundle-restart-tp4049425p4049427.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: Automatic bundle restart

2017-02-01 Thread Charlie Mordant
Hi Souciance,

OSGi provides that kind of listener via bundlelistener (or tracker,
depending on the start order).

2017-02-01 20:58 GMT+01:00 souciance :

> Hello,
>
> Is there some Karaf mechanism to allow automatic restart of a bundle or the
> karaf instance due to some event or log output?
>
> Best
> Souciance
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/Automatic-bundle-restart-tp4049425.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent


Automatic bundle restart

2017-02-01 Thread souciance
Hello,

Is there some Karaf mechanism to allow automatic restart of a bundle or the
karaf instance due to some event or log output?

Best
Souciance



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Automatic-bundle-restart-tp4049425.html
Sent from the Karaf - User mailing list archive at Nabble.com.


Re: "Patching" bundle installed from startup.properties

2017-02-01 Thread Serge Huber
Thanks for the very quick reply, I just tested doing that and it works, I just 
had to deploy the updated bundle in the system directory of the archive.

cheers,
  Serge.. 

> On 1 Feb 2017, at 12:24, Jean-Baptiste Onofré  wrote:
> 
> Hi,
> 
> I don't think it gonna work with Karaf 3.x. The easiest move is to provide a 
> custom startup.properties in your custom distribution.
> 
> Regards
> JB
> 
> On 02/01/2017 12:17 PM, Serge Huber wrote:
>> Hello,
>> 
>> I’m running into this problem on my Karaf 3.0.8 application
>> : https://issues.apache.org/jira/browse/ARIES-1540
>> 
>> Since the version of CXF that corrects this is not out yet I need to
>> update the org.apache.aries.blueprint.core version from 1.6.1 to 1.6.2
>> which includes a fix for offline startup.
>> 
>> The problem is that in Karaf 3 this bundle is installed from the
>> startup.properties, and I’m using the karaf-maven-plugin to build an
>> archive for my application (Apache Unomi).
>> 
>> From what I see I have two options:
>> 1. provide a custom startup.properties and copy the
>> org.apache.aries.blueprint.core-1.6.2.jar to the system directory manually
>> 2. provide a new framework KAR that copies the original one and modifies
>> the version
>> 
>> I tried using the “overrides.properties” file but it doesn’t work for
>> this in Karaf 3 since it only work for features that are deployed on
>> startup.
>> 
>> Currently I have this in my Maven build :
>> 
>> 
>>
>> org.apache.karaf.features
>>framework
>>kar
>> 
>> 
>> ...
>> 
>> 
>>org.apache.karaf.tooling
>>karaf-maven-plugin
>>
>>
>>install-kar
>>compile
>>
>>install-kars
>>
>>
>>
>>package
>>
>>instance-create-archive
>>
>>
>>
>>
>>
>>wrapper
>>
>>
>>standard
>>management
>>ssh
>>config
>>region
>>package
>>kar
>>war
>>cxf
>>cellar
>>unomi-kar
>>
>>
>> 
>> 
>> Would it work if I define a second compile-time dependency that provides
>> a second bundle with a different version ? Would it override the first
>> one ?
>> 
>> cheers,
>>  Serge…
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com



Re: "Patching" bundle installed from startup.properties

2017-02-01 Thread Jean-Baptiste Onofré

Hi,

I don't think it gonna work with Karaf 3.x. The easiest move is to 
provide a custom startup.properties in your custom distribution.


Regards
JB

On 02/01/2017 12:17 PM, Serge Huber wrote:

Hello,

I’m running into this problem on my Karaf 3.0.8 application
: https://issues.apache.org/jira/browse/ARIES-1540

Since the version of CXF that corrects this is not out yet I need to
update the org.apache.aries.blueprint.core version from 1.6.1 to 1.6.2
which includes a fix for offline startup.

The problem is that in Karaf 3 this bundle is installed from the
startup.properties, and I’m using the karaf-maven-plugin to build an
archive for my application (Apache Unomi).

From what I see I have two options:
1. provide a custom startup.properties and copy the
org.apache.aries.blueprint.core-1.6.2.jar to the system directory manually
2. provide a new framework KAR that copies the original one and modifies
the version

I tried using the “overrides.properties” file but it doesn’t work for
this in Karaf 3 since it only work for features that are deployed on
startup.

Currently I have this in my Maven build :



org.apache.karaf.features
framework
kar


...


org.apache.karaf.tooling
karaf-maven-plugin


install-kar
compile

install-kars



package

instance-create-archive





wrapper


standard
management
ssh
config
region
package
kar
war
cxf
cellar
unomi-kar




Would it work if I define a second compile-time dependency that provides
a second bundle with a different version ? Would it override the first
one ?

cheers,
  Serge…



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


"Patching" bundle installed from startup.properties

2017-02-01 Thread Serge Huber
Hello,

I’m running into this problem on my Karaf 3.0.8 application : 
https://issues.apache.org/jira/browse/ARIES-1540 


Since the version of CXF that corrects this is not out yet I need to update the 
org.apache.aries.blueprint.core version from 1.6.1 to 1.6.2 which includes a 
fix for offline startup. 

The problem is that in Karaf 3 this bundle is installed from the 
startup.properties, and I’m using the karaf-maven-plugin to build an archive 
for my application (Apache Unomi). 

From what I see I have two options:
1. provide a custom startup.properties and copy the 
org.apache.aries.blueprint.core-1.6.2.jar to the system directory manually 
2. provide a new framework KAR that copies the original one and modifies the 
version

I tried using the “overrides.properties” file but it doesn’t work for this in 
Karaf 3 since it only work for features that are deployed on startup. 

Currently I have this in my Maven build : 



org.apache.karaf.features
framework
kar

...

org.apache.karaf.tooling
karaf-maven-plugin


install-kar
compile

install-kars



package

instance-create-archive





wrapper


standard
management
ssh
config
region
package
kar
war
cxf
cellar
unomi-kar



Would it work if I define a second compile-time dependency that provides a 
second bundle with a different version ? Would it override the first one ? 

cheers,
  Serge…