the Commons Configuration problem

5 messages Options
Embed this post
Permalink
kkk

the Commons Configuration problem

Reply Threaded More More options
Print post
Permalink
Hi:
I found the Commons Configuration  can do most of read configuraion
job for me ,so I want to have a try.
But I am not sure the Commons Configuration how to read the file(for
example a xml file), is it a Singleton?  Since if not, I think I
should build a Singleton class to save the properties read by the
Commons Configuration, if so , I can use the Commons Configuration
directly.
Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Ralph Goers

Re: the Commons Configuration problem

Reply Threaded More More options
Print post
Permalink

On Sep 23, 2009, at 7:28 PM, maven apache wrote:

> Hi:
> I found the Commons Configuration  can do most of read configuraion
> job for me ,so I want to have a try.
> But I am not sure the Commons Configuration how to read the file(for
> example a xml file), is it a Singleton?  Since if not, I think I
> should build a Singleton class to save the properties read by the
> Commons Configuration, if so , I can use the Commons Configuration
> directly.
> Thanks.
>

Have you looked at http://commons.apache.org/configuration/userguide/howto_xml.html#Accessing_properties_defined_in_XML_documents?
  If the user's guide doesn't provide all the information you are  
looking for you might want to describe your use case so others can  
give you advice on how to do it.

In answer to your specific question, no it is not a singleton. But if  
your application keeps a reference to the configuration object you can  
retrieve the properties as often as needed. If your application needs  
to allow the configuration to be updated without restarting the  
application you should not transfer the data to other objects.  
Instead, use a reloading strategy and get the properties from the  
configuration every time they are needed.

Ralph

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

kkk

Re: the Commons Configuration problem

Reply Threaded More More options
Print post
Permalink
Thanks , I dont need the update, so I think I can use a extra object
to save the data from the property file.

2009/9/24 Ralph Goers <[hidden email]>:

>
> On Sep 23, 2009, at 7:28 PM, maven apache wrote:
>
>> Hi:
>> I found the Commons Configuration  can do most of read configuraion
>> job for me ,so I want to have a try.
>> But I am not sure the Commons Configuration how to read the file(for
>> example a xml file), is it a Singleton?  Since if not, I think I
>> should build a Singleton class to save the properties read by the
>> Commons Configuration, if so , I can use the Commons Configuration
>> directly.
>> Thanks.
>>
>
> Have you looked at
> http://commons.apache.org/configuration/userguide/howto_xml.html#Accessing_properties_defined_in_XML_documents? If
> the user's guide doesn't provide all the information you are looking for you
> might want to describe your use case so others can give you advice on how to
> do it.
>
> In answer to your specific question, no it is not a singleton. But if your
> application keeps a reference to the configuration object you can retrieve
> the properties as often as needed. If your application needs to allow the
> configuration to be updated without restarting the application you should
> not transfer the data to other objects. Instead, use a reloading strategy
> and get the properties from the configuration every time they are needed.
>
> Ralph
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

mgainty

org.apache.commons.lang.xwork.StringUtils location

Reply Threaded More More options
Print post
Permalink

Morning All

trying to locate commons-lang version which contains xwork StringUtils specifically
org.apache.commons.lang.xwork.StringUtils

Any advice would be greatly appreciated

thanks
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Thu, 24 Sep 2009 11:32:03 +0800
> Subject: Re: the Commons Configuration problem
> From: [hidden email]
> To: [hidden email]
>
> Thanks , I dont need the update, so I think I can use a extra object
> to save the data from the property file.
>
> 2009/9/24 Ralph Goers <[hidden email]>:
> >
> > On Sep 23, 2009, at 7:28 PM, maven apache wrote:
> >
> >> Hi:
> >> I found the Commons Configuration  can do most of read configuraion
> >> job for me ,so I want to have a try.
> >> But I am not sure the Commons Configuration how to read the file(for
> >> example a xml file), is it a Singleton?  Since if not, I think I
> >> should build a Singleton class to save the properties read by the
> >> Commons Configuration, if so , I can use the Commons Configuration
> >> directly.
> >> Thanks.
> >>
> >
> > Have you looked at
> > http://commons.apache.org/configuration/userguide/howto_xml.html#Accessing_properties_defined_in_XML_documents? If
> > the user's guide doesn't provide all the information you are looking for you
> > might want to describe your use case so others can give you advice on how to
> > do it.
> >
> > In answer to your specific question, no it is not a singleton. But if your
> > application keeps a reference to the configuration object you can retrieve
> > the properties as often as needed. If your application needs to allow the
> > configuration to be updated without restarting the application you should
> > not transfer the data to other objects. Instead, use a reloading strategy
> > and get the properties from the configuration every time they are needed.
> >
> > Ralph
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
     
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
Niall Pemberton

Re: org.apache.commons.lang.xwork.StringUtils location

Reply Threaded More More options
Print post
Permalink
On Thu, Sep 24, 2009 at 2:18 PM, Martin Gainty <[hidden email]> wrote:
>
> Morning All
>
> trying to locate commons-lang version which contains xwork StringUtils specifically
> org.apache.commons.lang.xwork.StringUtils
>
> Any advice would be greatly appreciated

AFAIK no such thing exists. I would guess the xwork copied/repackaged
org.apache.commons.lang.StringUtils.

Looking at the xwork pom[1], it looks like thats what they've done
with the shade plugin[2]:

[1] http://svn.opensymphony.com/svn/xwork/trunk/core/pom.xml
[2] http://maven.apache.org/plugins/maven-shade-plugin/

Niall

> thanks
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
>
>> Date: Thu, 24 Sep 2009 11:32:03 +0800
>> Subject: Re: the Commons Configuration problem
>> From: [hidden email]
>> To: [hidden email]
>>
>> Thanks , I dont need the update, so I think I can use a extra object
>> to save the data from the property file.
>>
>> 2009/9/24 Ralph Goers <[hidden email]>:
>> >
>> > On Sep 23, 2009, at 7:28 PM, maven apache wrote:
>> >
>> >> Hi:
>> >> I found the Commons Configuration  can do most of read configuraion
>> >> job for me ,so I want to have a try.
>> >> But I am not sure the Commons Configuration how to read the file(for
>> >> example a xml file), is it a Singleton?  Since if not, I think I
>> >> should build a Singleton class to save the properties read by the
>> >> Commons Configuration, if so , I can use the Commons Configuration
>> >> directly.
>> >> Thanks.
>> >>
>> >
>> > Have you looked at
>> > http://commons.apache.org/configuration/userguide/howto_xml.html#Accessing_properties_defined_in_XML_documents? If
>> > the user's guide doesn't provide all the information you are looking for you
>> > might want to describe your use case so others can give you advice on how to
>> > do it.
>> >
>> > In answer to your specific question, no it is not a singleton. But if your
>> > application keeps a reference to the configuration object you can retrieve
>> > the properties as often as needed. If your application needs to allow the
>> > configuration to be updated without restarting the application you should
>> > not transfer the data to other objects. Instead, use a reloading strategy
>> > and get the properties from the configuration every time they are needed.
>> >
>> > Ralph
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
> _________________________________________________________________
> Insert movie times and more without leaving Hotmail®.
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]