-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've had good success with just this style of deployment, and it's very nice to 
be able simply to add a OSGi Metatype annotation document and have your 
configuration properties appear in the Felix Web Console with labels and 
descriptions and default values.

- ---
A. Soroka
Software & Systems Engineering :: Online Library Environment
the University of Virginia Library

On Apr 16, 2012, at 8:51 AM, Jean-Baptiste Onofré wrote:

> Username/password/URL could be in <cm:properties/> and so handle in the 
> "application" config oriented file in etc.
> 
> Regards
> JB
> 
> On 04/16/2012 02:47 PM, Christian Schneider wrote:
>> I would simply deploy the blueprint xml by hand. Just treat it like a
>> config file you would have to add.
>> This is of course not everyone´s favorite style.
>> 
>> The problem with adding the blueprint to the feature is that it would
>> have to be in the maven repo. As the username and password are in this
>> file this is not recommended.
>> 
>> So another way to achieve what I did is separate the things that should
>> be configured per server or stage from the things that keep the same like
>> driver class name. You could use the config admin service in the
>> blueprint file to move the username / password to a separate config file.
>> This would make the whole thing a bit more complex though but you could
>> then safely put the blueprint file into a feature.
>> 
>> Christian
>> 
>> 
>> 2012/4/16 Borut Bolčina <[email protected]
>> <mailto:[email protected]>>
>> 
>>    Hello,
>> 
>>    my first post here, so bare with me please - newbie on board.
>> 
>>    I am trying to deploy my first camel route to Karaf and this route
>>    must be configurable (html address) and must persist some data with
>>    jpa component. This route is happily persisting in my test (outside
>>    osgi container).
>> 
>>    Now I am reading
>>    
>> https://github.com/cschneider/Karaf-Tutorial/blob/master/db/datasource/datasource-mysql.xml
>>  where
>>    it says I should copy the file to Karaf's deploy folder.
>> 
>>    And the question: What is the practice of deploying data sources?
>>    Should I create a features project which includes a blueprint for my
>>    route's data source?
>> 
>>    Let's say my route needs connection to mysql database, so the
>>    feature project would include features.xml
>> 
>>    <?xml version="1.0" encoding="UTF-8"?>
>>    <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0";
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>    xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.0.0
>>    http://karaf.apache.org/xmlns/features/v1.0.0";>
>> 
>>    <feature name="weather" version="${pom.version}">
>>    
>> <bundle>mvn:mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/1.9.0</bundle>
>>    <bundle>mvn:mvn:mysql/mysql-connector-java/5.1.18</bundle>
>>    <bundle>mvn:my.company/route-weather-current/${pom.version}</bundle>
>>    *<bundle>my datasource blueprint</bundle>*
>>    <configfile
>>    
>> finalname="/etc/weather.cfg">mvn:my.company/features-weather/${pom.version}/cfg</configfile>
>>    </feature>
>>    </features>
>> 
>>    I guess then the only command to install my Camel route to Karaf
>>    would then be feature:install and all the dependencies including
>>    datasource and configuration would be installed before. And how to
>>    package the "my datasource blueprint"?
>> 
>>    Or is there some other practice?
>> 
>>    Thanks,
>>    borut
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJPjBicAAoJEATpPYSyaoIkAnAIAIiVH4OsOLPbhMKxUxUhSBbP
2//XLJm3hODlaDtf99S6JraqRT51nU95WwSVyufui1KSK2gnOWw+HU638F1dKliQ
WnqcLOaT0iUpxTsnt/eQSKDtbEd3iVqFC2uDTZtqitD1IM19stqHjsaNbpRAfWEZ
Ni5TAKV0NRWfOM82d+3RF6Fxyp86imT1sWB8qlyYDKMmJPeavjFpnCycJ9Alkt1d
XFlhBHDBBM9/3Xkdt1Kh37UB+6uLeZaR8hcJRw1lJKEvrceciRUy+vzRQAnZlUCn
mjWyOjw2GrjjUVg8DiD23+1wH1Mp9gB5ckOF44ghVwX8JYGqgn4/8so3G7cauXg=
=Lhx2
-----END PGP SIGNATURE-----

Reply via email to