Ok,
removing it from main. I was just thinking that this would be the
default behaviour without specifying anything, since you will get an
exception now if no configuration file can be found?

/peter

GTalk: neubauer.peter
Skype peter.neubauer
ICQ 18762544
Phone +46704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer

http://www.neo4j.org - New Energy for Data - the Graph Database.
http://www.ops4j.org - New Energy for OSS Communities - Open
Participation Software.
http://www.qi4j.org - New Energy for Java - Domain Driven Development.




On Thu, Aug 14, 2008 at 2:26 PM, Richard Wallace
<[EMAIL PROTECTED]> wrote:
> On Thu, Aug 14, 2008 at 1:25 AM, Rickard Öberg <[EMAIL PROTECTED]>
> wrote:
>>
>> Peter Neubauer wrote:
>> > Mmh,
>> > not sure that is working since right now we have
>> >
>> > /**
>> >  * TODO
>> >  */
>> > public interface JettyConfiguration
>> >     extends EntityComposite
>> > {
>> >     @Range( min = 0, max = 65535 ) Property<Integer> port();
>> >
>> >     @NotEmpty Property<String> rootContextPath();
>> >
>> >     @NotEmpty Property<String> resourcePath();
>> > }
>> >
>> > which suggests that the ConfigurationMixin and its property loading is
>> > not present?
>>
>> The ConfigurationMixin is specified on the Configuration interface.
>> That's why all you need to do to use it is to do "@This
>> Configuration<JettConfiguration> conf" and Qi4j will try to add
>> Configuration as mixintype, and then finds the mixin impl on that
>> interface. So there's no need to specify ConfigurationMixin anywhere.
>>
>> Like I said, ConfigurationMixin will load JettyService.properties (since
>> "JettyService" is the id of the service), and right now there is such a
>> file with port 8080 specified, but only as a test resource, not in main,
>> where it probably should be!
>
> Please don't add it back into main again!  The problem with it being in main
> is that it will then be deployed in the jar and that makes it much much
> harder to override.  It should be up to the developer using the library to
> provide the configuration.
>
> Rich
>
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>
>

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to