L'exemple OSGi inclut des fichiers de configuration que vous pouvez utiliser pour démarrer et configurer le serveur et la grille WebSphere eXtreme Scale.
Dans la plupart des cas, vous créez une configuration pour définir le fichier des propriétés du serveur. Dans de rares cas, vous pouvez vouloir uniquement démarrer un serveur avec chaque propriété affectée d'une valeur par défaut. Dans ce cas, vous pouvez créer une configuration appelée com.ibm.websphere.xs.server avec la valeur default.
Pour plus d'informations sur le fichier des propriétés du serveur, voir la rubrique Fichier de propriétés du serveur.
serverName=collocatedServer
isCatalog=true
catalogClusterEndPoints=collocatedServer:localhost:6601:6602
traceSpec=ObjectGridOSGi=all=enabled
traceFile=logs/trace.log
listenerPort=2809
JMXServicePort=1099
<objectGridConfig
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd"
xmlns="http://ibm.com/ws/objectgrid/config">
<objectGrids>
<objectGrid name="Grid" txTimeout="15">
<bean id="ObjectGridEventListener"
osgiService="myShardListener"/>
<backingMap name="Map" readOnly="false"
lockStrategy="PESSIMISTIC" lockTimeout="5"
copyMode="COPY_TO_BYTES"
pluginCollectionRef="serializer"/>
</objectGrid>
</objectGrids>
<backingMapPluginCollections>
<backingMapPluginCollection id="serializer">
<bean id="MapSerializerPlugin"
osgiService="myProtoBufSerializer"/>"/>
</backingMapPluginCollection>
</backingMapPluginCollections>
</objectGridConfig>
<deploymentPolicy
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ibm.com/ws/objectgrid/deploymentPolicy ../deploymentPolicy.xsd"
xmlns="http://ibm.com/ws/objectgrid/deploymentPolicy">
<objectgridDeployment objectgridName="Grid">
<mapSet name="MapSet" numberOfPartitions="5">
<map ref="Map"/>
</mapSet>
</objectgridDeployment>
</deploymentPolicy>
<blueprint
xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:objectgrid="http://www.ibm.com/schema/objectgrid"
default-activation="lazy">
<objectgrid:server id="server" isCatalog="true"
name="server"
tracespec="ObjectGridOSGi=all=enabled"
tracefile="C:/Temp/logs/trace.log"
workingDirectory="C:/Temp/working"
jmxport="1099">
<objectgrid:catalog host="localhost" port="2809"/>
</objectgrid:server>
<objectgrid:container id="container"
objectgridxml="/META-INF/objectgrid.xml"
deploymentxml="/META-INF/deployment.xml"
server="server"/>
</blueprint>
Dans cette leçon, vous avez découvert les fichiers de configuration qui sont utilisées dans l'exemple OSGi. Maintenant, lorsque vous démarrez et configurez la grille eXtreme Scale et le serveur, vous savez quels fichiers sont utilisés dans ces processus et comment ces fichiers interagissent avec vos plug-in dans l'infrastructure OSGi.