You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by imorales <im...@ignos.com> on 2008/06/05 11:19:44 UTC

Hivemind .properties file ???

Hi all. I´m using Hivemind1. Is it possible configure hivemodule.xml with a
property file?

I would like to have a hivemodule.properties like this:

--------------------------------
urlService=http://myservice.com
urlService2=http://myservice2.com
--------------------------------

And in the hivemodule xml do this: 
------------------------------------
<service-point id="....." interface=".......">
    <invoke-factory model="threaded">
        <construct class="my.package.myService">
    		<string>${urlService}</string>
         </construct>
    </invoke-factory>
  </service-point>
------------------------------------
I would like to do something like that, it is posible in with hivemind do
that ???

Thanks in advance.
-- 
View this message in context: http://www.nabble.com/Hivemind-.properties-file-----tp17665637p17665637.html
Sent from the Hivemind - User mailing list archive at Nabble.com.


Re: Hivemind .properties file ???

Posted by imorales <im...@ignos.com>.
I changed the PropertyFileSymbolSource now the class search the file inside
the war file.
Everything ok ;)

thanks Johan.


Johan Lindquist wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ok, that won't help then - should have read it a little closer ;)
> 
> Then I think you are limited in your options:
> 
> - - Build on the hiveutils symbol source and write your own symbol source
> - - Convert you property file into a hivemodule, contributing to
> hivemind.ApplicationDefaults from within that.
> 
> Cheers,
> 
> Johan
> 
> imorales wrote:
>> Thansk for the response, that helps but not at all.
>> 
>> Reading the "Externalizing properties outside the war file" when you
>> specify
>> the 
>>  "<property-source file="c:/mysettings.properties"/>" this is a file
>> outside
>> the war file and you have to difine the absolute path to the property
>> file,
>> but in my case I need to define a relative path because the property file
>> is
>> inside the war file. Any ideas ?
>> 
>> Thanks again.
>> 
>> Johan Lindquist wrote:
>> Hi,
>> 
>> The hiveutils project [1] has an option to provide properties files as a
>> source of values for the substitution (which is what you are looking for
>> I think).
>> 
>> The property file would be registered as a symbol source within
>> Hivemind, and hivemind would use the values from it when creating your
>> service.
>> 
>> Hope that helps,
>> 
>> Cheers,
>> 
>> Johan
>> 
>> [1]
>> http://hivetranse.sourceforge.net/web/quickstart.html#start.external.symbols
>> 
>> imorales wrote:
>>>>> Hi all. I´m using Hivemind1. Is it possible configure hivemodule.xml
>>>>> with
>>>>> a
>>>>> property file?
>>>>>
>>>>> I would like to have a hivemodule.properties like this:
>>>>>
>>>>> --------------------------------
>>>>> urlService=http://myservice.com
>>>>> urlService2=http://myservice2.com
>>>>> --------------------------------
>>>>>
>>>>> And in the hivemodule xml do this: 
>>>>> ------------------------------------
>>>>> <service-point id="....." interface=".......">
>>>>>     <invoke-factory model="threaded">
>>>>>         <construct class="my.package.myService">
>>>>>     		<string>${urlService}</string>
>>>>>          </construct>
>>>>>     </invoke-factory>
>>>>>   </service-point>
>>>>> ------------------------------------
>>>>> I would like to do something like that, it is posible in with hivemind
>>>>> do
>>>>> that ???
>>>>>
>>>>> Thanks in advance.
>>>
>>>
> 
> - --
> you too?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFIR7rypHYnED7evioRAsAPAJ9cLp+wC/wUZ9UnGSGgk5exhlpfSQCgrFjP
> QL6G5cRr5SZmBTeyashbo6U=
> =Oi4R
> -----END PGP SIGNATURE-----
> 
> 

-- 
View this message in context: http://www.nabble.com/Hivemind-.properties-file-----tp17665637p17670533.html
Sent from the Hivemind - User mailing list archive at Nabble.com.


Re: Hivemind .properties file ???

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok, that won't help then - should have read it a little closer ;)

Then I think you are limited in your options:

- - Build on the hiveutils symbol source and write your own symbol source
- - Convert you property file into a hivemodule, contributing to
hivemind.ApplicationDefaults from within that.

Cheers,

Johan

imorales wrote:
> Thansk for the response, that helps but not at all.
> 
> Reading the "Externalizing properties outside the war file" when you specify
> the 
>  "<property-source file="c:/mysettings.properties"/>" this is a file outside
> the war file and you have to difine the absolute path to the property file,
> but in my case I need to define a relative path because the property file is
> inside the war file. Any ideas ?
> 
> Thanks again.
> 
> Johan Lindquist wrote:
> Hi,
> 
> The hiveutils project [1] has an option to provide properties files as a
> source of values for the substitution (which is what you are looking for
> I think).
> 
> The property file would be registered as a symbol source within
> Hivemind, and hivemind would use the values from it when creating your
> service.
> 
> Hope that helps,
> 
> Cheers,
> 
> Johan
> 
> [1]
> http://hivetranse.sourceforge.net/web/quickstart.html#start.external.symbols
> 
> imorales wrote:
>>>> Hi all. I´m using Hivemind1. Is it possible configure hivemodule.xml with
>>>> a
>>>> property file?
>>>>
>>>> I would like to have a hivemodule.properties like this:
>>>>
>>>> --------------------------------
>>>> urlService=http://myservice.com
>>>> urlService2=http://myservice2.com
>>>> --------------------------------
>>>>
>>>> And in the hivemodule xml do this: 
>>>> ------------------------------------
>>>> <service-point id="....." interface=".......">
>>>>     <invoke-factory model="threaded">
>>>>         <construct class="my.package.myService">
>>>>     		<string>${urlService}</string>
>>>>          </construct>
>>>>     </invoke-factory>
>>>>   </service-point>
>>>> ------------------------------------
>>>> I would like to do something like that, it is posible in with hivemind do
>>>> that ???
>>>>
>>>> Thanks in advance.
>>
>>

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIR7rypHYnED7evioRAsAPAJ9cLp+wC/wUZ9UnGSGgk5exhlpfSQCgrFjP
QL6G5cRr5SZmBTeyashbo6U=
=Oi4R
-----END PGP SIGNATURE-----

Re: Hivemind .properties file ???

Posted by imorales <im...@ignos.com>.
Thansk for the response, that helps but not at all.

Reading the "Externalizing properties outside the war file" when you specify
the 
 "<property-source file="c:/mysettings.properties"/>" this is a file outside
the war file and you have to difine the absolute path to the property file,
but in my case I need to define a relative path because the property file is
inside the war file. Any ideas ?

Thanks again.

Johan Lindquist wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> The hiveutils project [1] has an option to provide properties files as a
> source of values for the substitution (which is what you are looking for
> I think).
> 
> The property file would be registered as a symbol source within
> Hivemind, and hivemind would use the values from it when creating your
> service.
> 
> Hope that helps,
> 
> Cheers,
> 
> Johan
> 
> [1]
> http://hivetranse.sourceforge.net/web/quickstart.html#start.external.symbols
> 
> imorales wrote:
>> Hi all. I´m using Hivemind1. Is it possible configure hivemodule.xml with
>> a
>> property file?
>> 
>> I would like to have a hivemodule.properties like this:
>> 
>> --------------------------------
>> urlService=http://myservice.com
>> urlService2=http://myservice2.com
>> --------------------------------
>> 
>> And in the hivemodule xml do this: 
>> ------------------------------------
>> <service-point id="....." interface=".......">
>>     <invoke-factory model="threaded">
>>         <construct class="my.package.myService">
>>     		<string>${urlService}</string>
>>          </construct>
>>     </invoke-factory>
>>   </service-point>
>> ------------------------------------
>> I would like to do something like that, it is posible in with hivemind do
>> that ???
>> 
>> Thanks in advance.
> 
> - --
> you too?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFIR7RtpHYnED7evioRAnXyAJ48J+GhM5m/BpkdzrBS0m0vpBGQnQCeJled
> WFzOPiEUK5g/+aaEYGkQdo8=
> =zv9O
> -----END PGP SIGNATURE-----
> 
> 

-- 
View this message in context: http://www.nabble.com/Hivemind-.properties-file-----tp17665637p17666193.html
Sent from the Hivemind - User mailing list archive at Nabble.com.


Re: Hivemind .properties file ???

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

The hiveutils project [1] has an option to provide properties files as a
source of values for the substitution (which is what you are looking for
I think).

The property file would be registered as a symbol source within
Hivemind, and hivemind would use the values from it when creating your
service.

Hope that helps,

Cheers,

Johan

[1]
http://hivetranse.sourceforge.net/web/quickstart.html#start.external.symbols

imorales wrote:
> Hi all. I´m using Hivemind1. Is it possible configure hivemodule.xml with a
> property file?
> 
> I would like to have a hivemodule.properties like this:
> 
> --------------------------------
> urlService=http://myservice.com
> urlService2=http://myservice2.com
> --------------------------------
> 
> And in the hivemodule xml do this: 
> ------------------------------------
> <service-point id="....." interface=".......">
>     <invoke-factory model="threaded">
>         <construct class="my.package.myService">
>     		<string>${urlService}</string>
>          </construct>
>     </invoke-factory>
>   </service-point>
> ------------------------------------
> I would like to do something like that, it is posible in with hivemind do
> that ???
> 
> Thanks in advance.

- --
you too?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIR7RtpHYnED7evioRAnXyAJ48J+GhM5m/BpkdzrBS0m0vpBGQnQCeJled
WFzOPiEUK5g/+aaEYGkQdo8=
=zv9O
-----END PGP SIGNATURE-----