[jboss-dev] Booting the 'all' config fails
Anil Saldhana
Anil.Saldhana at redhat.com
Wed Apr 15 09:36:54 EDT 2009
For this particular use case, the discussion makes sense - determine
which of the ctrs apply?
But in general, I am just wondering whether there is a possibility of
introducing intermediate beans that carry reasonable defaults and do
minimal configuration? In this case, the intermediate bean would be for
profile service or such.
I am just thinking aloud and may not really be making any sense. ;)
Having extensible flexible bean configuration is one thing but expecting
users to get it perfectly right may be a bit of overkill. :)
Sorry, I had no intention of hijacking this thread.
Ales Justin wrote:
> "Let me Google that for you" ;-)
> - http://www.jboss.org/index.html?module=bb&op=viewtopic&t=92698
>
> Anil Saldhana wrote:
>> Is there no mechanism to use reasonable defaults if something is not
>> specified?
>> ======================================
>>
>> - <parameter><inject bean="JBossServer"/></parameter>
>> + <parameter class="org.jboss.bootstrap.spi.Server"><inject
>> bean="JBossServer"/></parameter>
>>
>> ===================================
>> Why should we be configuration freaks to make everything explicit?
>> <anilShutUp/>
>>
>> Ales Justin wrote:
>>> Search for this (never ending) discussion on our MC dev fourm. :-)
>>>
>>> Dimitris Andreadis wrote:
>>>> Shouldn't be able to derive the the injected paramemeter implements
>>>> org.jboss.bootstrap.spi.Server and use that CTOR?
>>>>
>>>>
>>>> public JAXBRepositoryContentMetadataPersister(Server server)
>>>> {
>>>> this(server.getConfig().getServerDataDir());
>>>> }
>>>>
>>>> public JAXBRepositoryContentMetadataPersister(URI uri)
>>>> {
>>>> this(new File(uri));
>>>> }
>>>>
>>>> public JAXBRepositoryContentMetadataPersister(File dir)
>>>> {
>>>> super(dir);
>>>> }
>>>>
>>>> Ales Justin wrote:
>>>>>> It must be this?
>>>>>
>>>>> Yes.
>>>>> I've added more info + committed.
>>>>>
>>>>>> server/all/conf/bootstrap/profile.xml
>>>>>> ...
>>>>>> <!-- Handles persistence of metadata about clustered
>>>>>> DeploymentRepository content -->
>>>>>> <bean name="ClusteredDeploymentRepositoryMetadataPersister"
>>>>>>
>>>>>> class="org.jboss.system.server.profileservice.repository.clustered.local.JAXBRepositoryContentMetadataPersister">
>>>>>>
>>>>>> <constructor>
>>>>>> <!-- Here we use the constructor version that takes the
>>>>>> Server impl and
>>>>>> uses it to find the data dir. You could
>>>>>> alternatively use a version
>>>>>> that takes a URI or a File. -->
>>>>>> <parameter><inject bean="JBossServer"/></parameter>
>>>>>> </constructor>
>>>>>> </bean>
>>>>>>
>>>>>> Ales Justin wrote:
>>>>>>> It might be again due to lack of info on which ctor to use.
>>>>>>> And since the ctor order is pretty much random,
>>>>>>> it looks like you get the wrong one - which still matches the
>>>>>>> no-info info. :-)
>>>>>>>
>>>>>>> See if you can add extra info to ctor in -jboss-beans.xml in
>>>>>>> which this bean is specified.
More information about the jboss-development
mailing list