OSGi サンプルには、WebSphere® eXtreme Scale グリッドおよびサーバーを開始したり構成したりする際に使用する構成ファイルが含まれています。
ほとんどの場合は、サーバー・プロパティー・ファイルを 設定するための構成を作成します。まれには、すべてのプロパティーがデフォルト値に設定されたままでサーバーを 開始すれば済むことがあります。そのような場合は、値が default に設定された com.ibm.websphere.xs.server という構成を作成できます。
サーバー・プロパティー・ファイルの詳細については、サーバー・プロパティー・ファイルのトピックを参照してください。
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>
このレッスンでは、OSGi サンプル内で使用している構成ファイルについて学習しました。これで、eXtreme Scale グリッドおよび サーバーを開始して構成するとき、OSGi フレームワーク内で、それらのプロセスに どのファイルが使用され、それらのファイルがプラグインとどのように相互作用するかがわかります。