[jboss-dev] Booting the 'all' config fails

Anil Saldhana Anil.Saldhana at redhat.com
Wed Apr 15 09:10:05 EDT 2009


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