ヘッダーをスキップ
Oracle® Fusion Middleware Oracle Event Processing開発者ガイド
11gリリース1 (11.1.1.7) for Eclipse
B61654-06
  目次へ移動
目次

前
 
次
 

B Oracle Event Processingスキーマ

この付録では、Oracle Event Processingの構成およびデプロイメントのXMLファイルの背後にあるスキーマを、それぞれの簡単な例とともに示します。

この付録の内容は次のとおりです。

B.1 EPNアセンブリ・スキーマspring-wlevs-v11_1_1_6.xsd

EPNアセンブリ・ファイルを使用して、Oracle Event Processingアプリケーションを構成するコンポーネントおよび各コンポーネントが互いに接続する方法、つまりイベント処理ネットワークを宣言します。EPNアセンブリ・ファイルは、標準のSpringコンテキスト・ファイルの拡張です。また、このファイルを使用して、アプリケーションのアダプタ・コンポーネントおよびPOJOコンポーネントを実装するJavaクラスを登録し、アプリケーションおよびEPLルール全体で使用するイベント・タイプを登録して、環境内でOracle Event Processing固有サービスを参照します。

spring-wlevs-v11_1_1_6.xsdファイルはEPNアセンブリ・ファイルの構造を説明します。

このスキーマ・ファイルはORACLE_CEP_HOME\ocep_11.1\xsdディレクトリにあります。ORACLE_CEP_HOMEは、d:\oracle_cepなどのOracle Event Processingのメイン・インストール・ディレクトリです。

詳細は、付録C「スキーマ参照: EPNアセンブリspring-wlevs-v11_1_1_6.xsd」を参照してください。

B.1.1 EPNアセンブリ・ファイルの例

次のXMLファイルは、HelloWorldのサンプルのEPNアセンブリ・ファイルを示しています。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:osgi="http://www.springframework.org/schema/osgi"
       xmlns:wlevs="http://www.bea.com/ns/wlevs/spring"
       xsi:schemaLocation="
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/osgi
           http://www.springframework.org/schema/osgi/spring-osgi.xsd
           http://www.bea.com/ns/wlevs/spring
           http://www.bea.com/ns/wlevs/spring/spring-wlevs-v11_1_1_6.xsd">

    <wlevs:event-type-repository>
        <wlevs:event-type type-name="HelloWorldEvent">
            <wlevs:class>com.bea.wlevs.event.example.helloworld.HelloWorldEvent</wlevs:class>
        </wlevs:event-type>
    </wlevs:event-type-repository>

    <!-- Adapter can be created from a local class, without having to go through a adapter factory -->
    <wlevs:adapter id="helloworldAdapter" class="com.bea.wlevs.adapter.example.helloworld.HelloWorldAdapter" >
        <wlevs:instance-property name="message" value="HelloWorld - the current time is:"/>
    </wlevs:adapter>

    <wlevs:channel id="helloworldInputChannel" event-type="HelloWorldEvent" >
        <wlevs:listener ref="helloworldProcessor"/>
        <wlevs:source ref="helloworldAdapter"/>
    </wlevs:channel>

    <!-- The default processor for Oracle Event Processing 11.0.0.0 is CQL -->
    <wlevs:processor id="helloworldProcessor" />

    <wlevs:channel id="helloworldOutputChannel" event-type="HelloWorldEvent" advertise="true">
        <wlevs:listener>
            <bean class="com.bea.wlevs.example.helloworld.HelloWorldBean"/>
        </wlevs:listener>
        <wlevs:source ref="helloworldProcessor"/>
    </wlevs:channel>

</beans>

B.2 コンポーネント構成スキーマwlevs_application_config.xsd

Oracle Event Processingアプリケーションには、1つ以上のコンポーネント構成ファイルがMETA-INF/wlevsディレクトリに含まれています。コンポーネント構成ファイルを使用して、アダプタ、チャネル、プロセッサなどのOracle Event Processingコンポーネントのデフォルト構成をオーバーライドします。

wlevs_application_config.xsdスキーマ・ファイルでは、コンポーネント構成ファイルの構造について説明しています。このXSDスキーマでは、次のスキーマがインポートされます。

これらのスキーマ・ファイルはORACLE_CEP_HOME\ocep_11.1\xsdディレクトリにあります。ORACLE_CEP_HOMEは、d:\oracle_cepなどのOracle Event Processingのメイン・インストール・ディレクトリです。

詳細は、付録D「スキーマの参照: コンポーネント構成wlevs_application_config.xsd」を参照してください。

B.2.1 コンポーネントの構成ファイルの例

次の例は、HelloWorldサンプル・アプリケーションのコンポーネント構成ファイルを示しています。

<?xml version="1.0" encoding="UTF-8"?><n1:config xmlns:n1="http://www.bea.com/ns/wlevs/config/application"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <processor>
        <name>helloworldProcessor</name>
        <rules>
            <query id="helloworldRule">
                <![CDATA[ select * from helloworldInputChannel [Now] ]]>
            </query>
        </rules>
    </processor>
    <channel>
        <name>helloworldInputChannel</name>
        <max-size>10000</max-size>
        <max-threads>2</max-threads>
    </channel>
    <channel>
        <name>helloworldOutputChannel</name>
        <max-size>10000</max-size>
        <max-threads>2</max-threads>
    </channel>
</n1:config>

B.3 デプロイメント・スキーマdeployment.xsd

Oracle Event Processingインスタンスのデプロイメント・ファイルはdeployments.xmlという名前であり、DOMAIN_DIR/servernameディレクトリにあります。DOMAIN_DIRはメイン・ドメイン・ディレクトリを指し、servernameはサーバー・インスタンスの名前を指します。このXMLファイルには、サーバーにデプロイされているOSGiバンドルがリストされます。

deployment.xsdスキーマ・ファイルはデプロイメント・ファイルの構造を説明します。

このスキーマ・ファイルはORACLE_CEP_HOME\ocep_11.1\xsdディレクトリにあります。ORACLE_CEP_HOMEは、d:\oracle_cepなどのOracle Event Processingのメイン・インストール・ディレクトリです。

詳細は、付録E「スキーマの参照: デプロイメントdeployment.xsd」を参照してください。

B.3.1 デプロイメントXMLファイルの例

次の例は、サンプルFXドメインのdeployments.xmlファイルを示しています。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:wlevs="http://www.bea.com/ns/wlevs/deployment"
  xsi:schemaLocation="
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans.xsd
  http://www.bea.com/ns/wlevs/deployment
  http://www.bea.com/ns/wlevs/deployment/deployment.xsd">
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
      <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
  </bean>
  <wlevs:deployment id="fx" state="start" 
    location="file:${wlevs.domain.home}/applications/fx/com.bea.wlevs.example.fx_11.1.0.0.jar"/>
</beans>

B.4 サーバー構成スキーマwlevs_server_config.xsd

Oracle Event Processingサーバー構成ファイルのconfig.xmlは、DOMAIN_DIR/servername/configディレクトリにあります。DOMAIN_DIRは、メイン・ドメイン・ディレクトリを示し、servernameは、特定のサーバー・インスタンスを示します。Oracle Event Processingインスタンスの構成を変更する場合は、このファイルを手動で更新し、サーバー構成要素を追加または削除することができます。

welvs_server_config.xsdスキーマ・ファイルはサーバー構成ファイルの構造を説明します。

このスキーマ・ファイルはORACLE_CEP_HOME\ocep_11.1\xsdディレクトリにあります。ORACLE_CEP_HOMEは、d:\oracle_cepなどのOracle Event Processingのメイン・インストール・ディレクトリです。

詳細は、付録F「スキーマ参照: サーバー構成wlevs_server_config.xsd」を参照してください。

B.4.1 サーバー構成XMLファイルの例

次に示すサンプルのconfig.xmlは、ORACLE_CEP_HOME/user_projects/domains/ocep_domain/defaultserverテンプレート・ドメインに属し、これらのいくつかのサービスを構成する方法を示しています。

<?xml version="1.0" encoding="UTF-8"?>
<n1:config xsi:schemaLocation="
    http://www.bea.com/ns/wlevs/config/server wlevs_server_config.xsd"
 xmlns:n1="http://www.bea.com/ns/wlevs/config/server" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <netio>
    <name>NetIO</name>
    <port>9002</port>
  </netio>
  <netio>
    <name>sslNetIo</name>
    <ssl-config-bean-name>sslConfig</ssl-config-bean-name>
    <port>9003</port>
  </netio>
  <work-manager>
    <name>JettyWorkManager</name>
    <min-threads-constraint>5</min-threads-constraint>
    <max-threads-constraint>10</max-threads-constraint>
  </work-manager>
  <jetty>
    <name>JettyServer</name>
    <network-io-name>NetIO</network-io-name>
    <work-manager-name>JettyWorkManager</work-manager-name>
    <secure-network-io-name>sslNetIo</secure-network-io-name>
  </jetty>
  <rmi>
    <name>RMI</name>
    <http-service-name>JettyServer</http-service-name>
  </rmi>
  <jndi-context>
   <name>JNDI</name>
  </jndi-context>
  <exported-jndi-context>
    <name>exportedJndi</name>
    <rmi-service-name>RMI</rmi-service-name>
  </exported-jndi-context>
  <jmx>
    <rmi-service-name>RMI</rmi-service-name>
    <jndi-service-name>JNDI</jndi-service-name>
  </jmx>
  <ssl>
    <name>sslConfig</name>
    <key-store>./ssl/dsidentity.jks</key-store>
    <key-store-pass>
        <password>changeit</password>
    </key-store-pass>
    <key-store-alias>ds</key-store-alias>
    <key-manager-algorithm>SunX509</key-manager-algorithm>
    <ssl-protocol>TLS</ssl-protocol>
    <enforce-fips>false</enforce-fips>
    <need-client-auth>false</need-client-auth>
  </ssl>
  <http-pubsub>
    <name>pubsub</name>
    <path>/pubsub</path>
    <pub-sub-bean>
      <server-config>
        <name>pubsubbean</name>
        <supported-transport>
          <types>
            <element>long-polling</element>
          </types>
        </supported-transport>
        <publish-without-connect-allowed>true</publish-without-connect-allowed>
      </server-config>
    <channels>
        <element>
          <channel-pattern>/evsmonitor</channel-pattern>
        </element>
        <element>
          <channel-pattern>/evsalert</channel-pattern>
        </element>
        <element>
          <channel-pattern>/evsdomainchange</channel-pattern>
        </element>
      </channels>
    </pub-sub-bean>
  </http-pubsub> 
</n1:config>