JP2007323331A - Software system and software registration method - Google Patents
Software system and software registration method Download PDFInfo
- Publication number
- JP2007323331A JP2007323331A JP2006152321A JP2006152321A JP2007323331A JP 2007323331 A JP2007323331 A JP 2007323331A JP 2006152321 A JP2006152321 A JP 2006152321A JP 2006152321 A JP2006152321 A JP 2006152321A JP 2007323331 A JP2007323331 A JP 2007323331A
- Authority
- JP
- Japan
- Prior art keywords
- service
- program module
- bundle
- starting
- program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、複数のプログラム・モジュールからなるソフトウェア・システム等において、各プログラム・モジュールの起動処理を制御するシステム等に関する。例えば、各プログラム・モジュールがお互いに依存関係を持つとき、安全にかつ迅速にソフトウェア・システムを起動させることが可能なシステム等に関する。 The present invention relates to a system or the like for controlling the activation processing of each program module in a software system or the like composed of a plurality of program modules. For example, the present invention relates to a system that can safely and quickly start a software system when program modules have a dependency relationship with each other.
従来、複数のプログラム・モジュールから構成されるソフトウェア・システムにおいて、システムの起動時にそれらのプログラム・モジュール間をどのような順番で起動していくかを制御するための起動順序制御手段を有するものがある。このような技術は、例えば、特許文献1、特許文献2、特許文献3、非特許文献1等に記載されている。
2. Description of the Related Art Conventionally, a software system composed of a plurality of program modules has an activation order control means for controlling in what order the program modules are activated when the system is activated. is there. Such a technique is described in, for example,
起動順序の制御は、主に、あるプログラム・モジュールが他のプログラム・モジュールの提供している機能を使用する際に、機能を提供するプログラム・モジュールが先に起動されている必要があるために行われている。つまり、機能を提供するプログラム・モジュールが先に起動されていなければ、機能を利用するプログラム・モジュールの起動が失敗してしまうという依存関係を満足させる必要があるのである。 The control of the startup order is mainly because when a program module uses a function provided by another program module, the program module that provides the function must be started first. Has been done. In other words, if the program module that provides the function is not activated first, it is necessary to satisfy the dependency relationship that the activation of the program module that uses the function fails.
依存関係の例として、オブジェクト指向システムにおけるサービス提供システムを挙げることができる。例えば、非特許文献1に記載されているOSGiサービス・プラットフォームでは、次のようにしてサービスを提供している。
An example of the dependency relationship is a service providing system in an object-oriented system. For example, the OSGi service platform described in Non-Patent
サービス提供は以下のような手順で行われる。
ある機能にアクセスするための方法を記述したインタフェース記述を定義する。
サービスを提供する側では、このインタフェース記述に基づくインタフェースを実装したサービス・オブジェクトをシステムに1つだけ存在するサービス・レジストリに登録する。
インタフェース記述によって記述されたサービスはこのサービス・オブジェクトを経由して利用者側に提供される。
サービスを利用する側ではサービス・インタフェース記述をキーにしてサービス・レジストリを検索し、登録されているサービス・オブジェクトを探し出してサービス・レジストリからサービス・オブジェクトを取得する。
The service is provided in the following procedure.
Define an interface description that describes how to access a function.
On the service providing side, a service object that implements an interface based on this interface description is registered in a service registry that exists only in the system.
The service described by the interface description is provided to the user side via this service object.
The service using side searches the service registry using the service interface description as a key, finds the registered service object, and obtains the service object from the service registry.
このようにしてあるモジュールの持つ機能を他のモジュールが利用できるようにしている。 In this way, the functions of a module can be used by other modules.
これらの依存関係を考慮し、起動する順番を決定してシーケンシャルに起動していく方法が一般的である。この方法では、起動順が対象となるプログラム・モジュールより前になっている全てのプログラム・モジュールが起動されていないと、対象モジュールが起動できずに、起動時間が長くなってしまうという問題を有している。 A general method is to sequentially start by determining the order of starting in consideration of these dependency relationships. This method has the problem that if all the program modules that are in the startup order before the target program module are not started, the target module cannot be started and the startup time becomes long. is doing.
この問題に対処するために、依存関係を考慮し、依存しているものをグルーピング化してグループの中で起動順序を決定し、グループ間では起動処理が並行に行えるようにして起動時間を短くしようとする方法がとられている。 To deal with this problem, consider the dependency relationship, group the dependents, determine the startup order within the group, and shorten the startup time by enabling startup processing to be performed in parallel between groups. The method is taken.
更に起動時間を短くするため、グルーピングを行わず全てのプログラム・モジュールを並列に起動しようとする場合に起動処理が失敗することもある。つまり、サービスを提供するモジュールが他のモジュールに提供するサービスをサービス・レジストリに登録する前にサービスを使用するモジュールがサービス提供を要求すると、サービスが登録されていないため、サービスを利用できなくなってしまうのである。 Furthermore, in order to shorten the activation time, the activation process may fail when attempting to activate all program modules in parallel without grouping. In other words, if a module that uses a service requests service provision before the service providing module registers the service provided to other modules in the service registry, the service cannot be used because the service is not registered. It ends up.
また、依存関係を持つグループ内において、依存するモジュールの起動が何らかの原因で終了せずに後続するモジュールの起動が行えず、グループの起動終了に時間がかかるという問題もある。 In addition, in a group having a dependency relationship, activation of the dependent module does not end for some reason, and subsequent modules cannot be started, and there is a problem that it takes time to finish starting the group.
更に、モジュールの初期化に失敗したことにより、グループの初期化及びシステム全体の初期化に失敗するという問題点もある。 Further, there is a problem that the initialization of the group and the initialization of the entire system fail due to the failure of the initialization of the module.
本発明は上記課題を解決するために為されたもので、プログラム・モジュールをソフトウェア・システムの起動後にソフトウェア・システムにインストールするインストール工程と、前記プログラム・モジュールを個々に指定し起動するプログラム・モジュール起動工程と、前記プログラム・モジュールを個々に指定し停止するプログラム・モジュール停止工程と、ソフトウェア・システムの起動時に各プログラム・モジュールを前記プログラム・モジュール起動工程によって並列に起動するシステム起動工程と、プログラム・モジュールが持つ機能を他のモジュールに使用可能にする機能アクセス工程と、前記機能を他のプログラム・モジュールに公開するために登録するサービス登録工程と、前記機能を検索するサービス検索工程と、前記機能を取得するサービス取得工程と、を有し、前記サービス検索工程において、通常時には予め定められている(所望の)前記機能が前記サービス登録工程において登録されていない場合は検索に失敗し、ソフトウェア・システムの起動時には前記サービス登録工程において予め定められている(所望の)前記機能が登録されるまで待つことを特徴とするソフトウェア登録方法等、を提供する。 The present invention has been made to solve the above-described problems. An installation process for installing a program module in a software system after the software system is started, and a program module for individually specifying and starting the program module. A starting step, a program module stopping step for individually specifying and stopping the program module, a system starting step for starting each program module in parallel by the program module starting step when starting the software system, and a program A function access step for making the functions possessed by the module available to other modules, a service registration step for registering the functions to be disclosed to other program modules, a service search step for searching for the functions, A service acquisition step of acquiring a function, and in the service search step, when the (predetermined) desired function is not normally registered in the service registration step, the search fails and software A software registration method or the like is provided that waits until a predetermined (desired) function is registered in the service registration step when the system is activated.
本発明によれば、システム起動時に全てのプログラム・モジュールを並列に起動しても、プログラム・モジュールの起動に失敗することがなくなり、迅速にかつ安全に起動するソフトウェア・システムを構築することができる。 According to the present invention, even if all program modules are started in parallel at the time of system startup, the startup of the program modules does not fail, and a software system that can be started quickly and safely can be constructed. .
また、プログラム・モジュールの起動時の異常による影響で、ソフトウェア・システム全体が起動しないことを防ぐことができ、堅牢でプログラム・モジュールの異常に対する耐性を持ったソフトウェア・システムを構築することができる。 Further, it is possible to prevent the entire software system from being activated due to the influence of the abnormality at the time of starting the program module, and it is possible to construct a robust software system having resistance against the abnormality of the program module.
図を用いて本発明の実施例について説明する。 Embodiments of the present invention will be described with reference to the drawings.
図1は本発明を実施するシステム上で稼動するソフトウェアの構成を示したもので、非特許文献1に記載されているOSGiサービス・プラットフォームで規定されているものである。
同図において、1010はハードウェアやソフトウェアを制御するためのオペレーティングシステムである。また、1020はオペレーティングシステム1010上で稼動しJava(登録商標)言語から生成された中間言語であるバイト・コードを解釈実行するためのJava(登録商標)仮想マシンである。なお、「Java(登録商標)」はSun Microsystems, Inc.社の登録商標である。また、1030はJava(登録商標)言語で記述され各種アプリケーション・プログラムを一つのJava(登録商標)仮想マシン1020の上で実行可能にするためのフレームワークである。また、1040はフレームワーク1030上で動作するアプリケーションのフレームワーク上の管理単位であるバンドルである。バンドル1040はアプリケーションを構成するJava(登録商標)言語によって記述されたプログラムやそのプログラムが使用する画像データや各種ファイルデータなどを内包している。フレームワーク1030はバンドル1040を各々独立してフレームワークに対してインストール/アンインストールする機能、インストールされているバンドルを新しいものに更新する機能、インストールされているバンドルを起動/停止する機能を有する。
FIG. 1 shows the configuration of software running on a system that implements the present invention, and is defined by the OSGi service platform described in Non-Patent
In the figure, reference numeral 1010 denotes an operating system for controlling hardware and software. Reference numeral 1020 denotes a Java (registered trademark) virtual machine that operates on the operating system 1010 and interprets and executes byte codes that are intermediate languages generated from the Java (registered trademark) language. “Java (registered trademark)” is a registered trademark of Sun Microsystems, Inc. Reference numeral 1030 denotes a framework which is written in the Java (registered trademark) language and allows various application programs to be executed on one Java (registered trademark) virtual machine 1020.
図2は、フレームワーク1030を構成する主なJava(登録商標)言語のクラスの構成を記述した図である。
同図において、2010はフレームワーク1030の主な機能を実現しているフレームワーク実装クラスである。また、2015はフレームワーク実装クラスが実装している機能をフレームワーク以外からアクセスするためのインタフェースを定義しているBunleContextインタフェースである。
FIG. 2 is a diagram describing the configuration of main Java (registered trademark) language classes constituting the framework 1030.
In the figure, 2010 is a framework implementation class that realizes the main functions of the framework 1030.
また、2020は他のバンドル1040からバンドル1040に対してアクセスするためのインタフェースを規定しているBundleインタフェースである。また、2025はフレームワーク1030上でバンドル1040を管理するために生成されるバンドル制御実装クラスである。
また、2030はバンドル1040を起動/停止する際にフレームワーク1030が呼び出すメソッドを規定したインタフェースであるBundleActivatorインタフェースである。
また、2035はバンドル1040内でBundleActivatorインタフェース2030を実装しているバンドル実装である。また、2040はバンドル1040が他のバンドル1040に対して提供しているサービスをフレームワーク1030上で管理するためのサービス制御実装である。
また、2045はバンドル1040内でバンドル1040が提供するサービスを実際に実装しているサービス実装である。また、2050はサービス登録データにアクセスするためのインタフェースであるServiceRegistrationインタフェースである。
また、2055はサービスを使用する際にサービスのデータにアクセスするためのインタフェースであるServiceReferenceインタフェースである。
図3はバンドル1040をインストールする際に用いられるJarファイルの構造と、バンドルを構成するファイル(バンドル・ファイルと呼ぶ)の際にマニフェスト・ヘッダに設定されるバンドルの属性を示したものである。ここで、Jarファイルはアーカイブファイルであり、マニフェスト・ヘッダはJarファイルのヘッダである。ただし、これらのバンドル属性は必ずしも指定する必要はなく、順番も規定されているものではない。
同図において、3010はバンドル1040の名前を記述しているバンドル名であり、3020はバンドル1040が参照する他のバンドル1040が提供するJava(登録商標)パッケージのパッケージ名のリストである静的参照パッケージである。
FIG. 3 shows the structure of the Jar file used when installing the
In the figure, 3010 is a bundle name describing the name of the
また、3030はバンドル1040が他のバンドルに対して提供しているJava(登録商標)パッケージ名のリストである提供パッケージである。
また、3040は静的参照パッケージ3020同様バンドル1040が参照するJava(登録商標)パッケージ名のリストである。但し、静的参照パッケージ3020がバンドル1040の起動時に参照関係の解決が必要なのに対し、3040は実際に必要となるときに参照関係が解決できれば良い動的参照パッケージである。
また、3050は他のバンドル1040が提供しているサービスのうちどのサービスを使用するかを宣言する参照サービスである。また、3060は他のバンドル1040に提供可能なサービスを宣言する提供サービスであり、3070はBundleActivatorインタフェース2030を実装しているクラスの名前を宣言するBundleActivator実装クラス名である。
以下、システムの停止時に参照されるデータが生成されるインストール処理、バンドルの起動/停止処理、システムの再起動処理について説明する。 Hereinafter, an installation process for generating data to be referred to when the system is stopped, a bundle start / stop process, and a system restart process will be described.
「インストール処理」
先ず、バンドル1040がフレームワーク1030にインストールされる際の処理について図4を参照しながら説明する。
"Installation Process"
First, processing when the
システムのオペレータがバンドル・ファイルの格納されている場所をURL(Uniform Resource Locators)を使用して指定する。そして、指定された場所に格納されているバンドル・ファイルをフレームワーク1030にインストールすることをフレームワーク実装2010に指示する。
The system operator designates the location where the bundle file is stored using Uniform Resource Locators (URL). Then, the
フレームワーク実装2010は指定された格納場所からバンドル・ファイルを読み込み、読み込んだバンドル・ファイルのデータをフレームワーク内で参照しやすいように設けられたキャッシュに格納する。
The
読み込まれたバンドル・ファイルのマニフェスト(Jarファイルの属性などを定義するヘッダ)から提供パッケージ・ヘッダ3030と静的参照パッケージ・ヘッダ3020を読み出す。各バンドル1040が提供しているJava(登録商標)パッケージは、提供しているバンドル1040のバンドルIDとともにフレームワーク実装2010の持つ提供パッケージ・レジストリに格納されている。
The provided
静的参照パッケージ・ヘッダ3020に記述されている参照パッケージがこの提供パッケージ・レジストリにすでに登録されているか、又は自身の提供パッケージ・ヘッダ3030に記述されている場合は処理を続行する。
If the reference package described in the static
そうでない場合は、インストール処理が失敗したことを示す例外を発生させ処理を停止する。 Otherwise, an exception indicating that the installation process has failed is generated and the process is stopped.
バンドル制御実装2025のオブジェクトを生成し、バンドル・ファイルのマニフェストの情報によって初期化を行う。
An object of the
マニフェストの内容はバンドル制御実装2025によって管理され、各マニフェスト・ヘッダのエントリを表す文字列をキーにして参照可能となっている。
The contents of the manifest are managed by the
また、バンドルにはバンドルを一意に特定するためのバンドルIDが付与される。 Further, a bundle ID for uniquely identifying the bundle is given to the bundle.
図8に示される構造をもったバンドル・リストがフレームワーク実装によって生成されている。 A bundle list having the structure shown in FIG. 8 is generated by the framework implementation.
新たにインストールされたバンドルに関するエントリをバンドルID、キャッシュ内の格納位置等の情報によって作成し、バンドル・リストの最後に追加する。このバンドル・リストは、ハードディスク等の不揮発なメモリに格納される。 An entry relating to the newly installed bundle is created based on information such as the bundle ID and the storage position in the cache, and added to the end of the bundle list. This bundle list is stored in a nonvolatile memory such as a hard disk.
バンドル制御実装2025にインストールされたことを示すINSTALLED状態を設定する。
この状態をバンドル・リストからバンドルIDをキーにして対象となるバンドルに対するバンドル・リスト・エントリを検索し、そのエントリに登録されている状態をINSTALLEDに変更する。
An INSTALLALLED state indicating that the
This state is searched from the bundle list using the bundle ID as a key, and a bundle list entry for the target bundle is searched, and the state registered in the entry is changed to INSTALLED.
このようにしてバンドル1040がフレームワーク1030にインストールされる。
In this way, the
「バンドルの起動/停止処理」
次に、バンドル1040が起動/停止されるときの処理について図5を参照しながら説明する。
"Bundle start / stop processing"
Next, processing when the
オペレータからバンドルIDを指定して指定されたバンドルIDに対応するバンドルを起動するよう指示されたフレームワーク実装2010は、バンドルIDからそのバンドルIDに対応するバンドル制御実装2025を検出する。
The
バンドル制御実装2025に対してBundleActivator実装クラス名ヘッダ3070を表す文字列をキーとして指定し、BundleActivator実装クラス名3070のデータを取得する。
A character string representing the BundleActivator implementation
BundleActivator実装クラス名3070が定義されている場合は、このBundleActivator実装クラス名3070が示すクラスをロードし、オブジェクト生成を行う。
When the BundleActivator
生成されたBundleActivatorオブジェクトはバンドル制御実装2025に記憶される。
The generated BundleActivator object is stored in the
生成されたBundleActivatorオブジェクトに対してstartメソッドを呼び出し、バンドル1040毎に定義されたバンドルの初期化ルーチンを実行する。
A start method is called for the generated BundleActivator object, and a bundle initialization routine defined for each
この初期化ルーチンの中で、バンドル1040が提供するサービスをフレームワーク実装2010に登録して登録されたサービスを表すServiceRegistrationオブジェクトを取得する。また、フレームワーク実装2010に登録されているサービスからバンドル1040が使用するサービスを検索し、検索したサービスを表すServiceReferenceオブジェクトを取得しサービス・オブジェクトを取得することもある。
In this initialization routine, a service provided by the
ここで、通常のバンドル起動時等に行われるサービス・オブジェクト取得処理について、図8に示すアクティビティ図を参照しながら説明する。通常の起動処理においては、サービスを検索した結果、ServiceReferenceオブジェクトが取得できないとき、即ちサービスが見つからないときには、その後の起動処理を行うことができないため、例外を発生し起動処理が失敗したことを通知する。 Here, a service / object acquisition process performed when a normal bundle is activated will be described with reference to an activity diagram shown in FIG. In normal startup processing, if a ServiceReference object cannot be obtained as a result of searching for a service, that is, if a service is not found, subsequent startup processing cannot be performed, so an exception is generated and notification that startup processing has failed To do.
起動が成功すると、バンドル1040が起動されていることを示す状態であるACTIVE状態にバンドル制御実装が設定される。
If the activation is successful, the bundle control implementation is set to the ACTIVE state, which is a state indicating that the
また、このACTIVE状態はバンドル・リストの対応するエントリの状態フィールドにも設定されて永続的に記憶される。 This ACTIVE status is also set in the status field of the corresponding entry in the bundle list and is stored permanently.
更に、フレームワーク実装2010は、図7に示すバンドル起動順リストを保持しており、このリストもバンドル・リスト同様永続的に記憶される。このバンドル起動順リストの最後に起動したバンドルのバンドルIDを追加する。
Further, the
次に、停止処理について説明する。オペレータからバンドルIDを指定して指定されたバンドルIDに対応するバンドルを停止するよう指示されたフレームワーク実装2010は、バンドルIDからそのバンドルIDに対応するバンドル制御実装2025を検出する。
Next, the stop process will be described. The
バンドル制御実装2025が記憶しているBundleActivatorオブジェクトを取得する。取得したBundleActivatorオブジェクトに対してstopメソッドを呼び出し、バンドル1040ごとに定義されたバンドルの停止ルーチンを実行する。この停止ルーチンの中で、例えば、バンドル1040が登録したサービスの登録解除を行ったり、使用していたサービスの開放を行ったりする。
The BundleActivator object stored in the
停止が成功すると、バンドル1040が停止していることを示す状態であるRESOLVED状態にバンドル制御実装が設定される。
If the stop is successful, the bundle control implementation is set to the RESOLVED state, which is a state indicating that the
また、このRESOLVED状態はバンドル・リストの対応するエントリの状態フィールドにも設定されて永続的に記憶される。 The RESOLVED state is also set in the state field of the corresponding entry in the bundle list and is stored permanently.
さらに、バンドル起動順リストから停止したバンドルのバンドルIDが記述されているエントリを削除する。 Further, the entry describing the bundle ID of the stopped bundle is deleted from the bundle activation order list.
このような処理を実行することによって、バンドル起動順リストは起動されているバンドルがどのような順番で起動されたのかを保持することができる。 By executing such processing, the bundle activation order list can hold in what order the activated bundles are activated.
「システム再起動処理」
次に、図6を参照しながらシステムが再起動するときの処理について説明する。
"System restart process"
Next, processing when the system is restarted will be described with reference to FIG.
このシステムはシステムの停止処理が開始するまで稼動していたバンドル1040をシステムの再起動時に自動的に起動するようになっている。以下、その方法について説明する。
In this system, the
先ず、システムが起動されるとフレームワーク実装2010が生成される。
First, when the system is started, a
フレームワーク実装2010が起動されると、永続的に記憶されていたバンドル・リストを読み出す。
When the
バンドル・リストに記憶されていたバンドルの情報からバンドル制御実装2025を生成し、生成されたバンドル制御実装2025を初期化する。
A
また、バンドル・リストに記憶されていた状態にバンドルの状態を設定する。 In addition, the bundle state is set to the state stored in the bundle list.
更に、永続的に記憶されていたバンドル起動順リストを読み出し、リストに登録されているバンドルIDを取得し、取得したバンドルIDのバンドル制御実装2025のオブジェクトを検索してバンドル1040の起動処理を行う。
Further, the bundle activation order list stored permanently is read, the bundle ID registered in the list is acquired, the object of the
各バンドル1040の起動処理は別々のスレッド内で行われ並行に処理される。各バンドルの起動処理は、サービスの登録/取得の処理が異なるだけで、その他は通常の起動処理と同じである。
The activation process of each
ここで、システム起動時におけるサービスの登録/取得の関係について、図9に示すアクティビティ図を参照しながら説明する。同図において、バンドルAはサービスを登録するバンドルであり、バンドルBはサービスを使用するバンドルである。 Here, the relationship of service registration / acquisition when the system is started will be described with reference to the activity diagram shown in FIG. In the figure, bundle A is a bundle for registering services, and bundle B is a bundle for using services.
バンドルBにおいて、サービスを検索しServiceReferenceオブジェクトを得られなければ、wait()メソッドによってサービスが登録されるのを待つ。 In the bundle B, if a service is searched and a ServiceReference object cannot be obtained, the service waits for the service to be registered by the wait () method.
一方、サービスを登録するバンドルAでは、サービスを登録した後に、notifyAll()メソッドにより、サービスの登録を待っているスレッドに対して通知を行う。 On the other hand, in the bundle A for registering the service, after registering the service, the notify All () method notifies the thread waiting for the service registration.
サービス登録を待っている(wait()メソッドを呼び出している)状態でいるバンドルは、notifyAll()メソッドによって起こされ、処理を続行する。 Bundles waiting for service registration (calling the wait () method) are awakened by the notifyAll () method and continue processing.
バンドルBでは再度、所望のサービスが登録されているかを調べる。 In the bundle B, it is checked again whether a desired service is registered.
登録されていない場合は、再度wait()メソッドにより待ち、登録されている場合はサービス・オブジェクトを取得して起動処理を続行する。 If it is not registered, it waits again with the wait () method. If it is registered, the service object is acquired and the activation process is continued.
図9においては、説明のため、サービスを検索して見つからなかった処理をバンドルの起動処理の内部で行っているが、実際にはサービス検索を行うメソッド内でシステム起動時の処理であるか、通常時の処理であるかを検出して処理を切り分ける。そして、システム起動時にはサービスの登録を待つ処理を行うように構成することによって、バンドルの起動処理では、システム起動時なのか通常時なのかは意識せずにサービスを検索することができる。 In FIG. 9, for the sake of explanation, a process that is not found by searching for a service is performed inside the bundle activation process. The process is separated by detecting whether the process is normal. By configuring the system to wait for service registration when the system is activated, the bundle activation process can search for services without being aware of whether the system is activated or normal.
このシステム起動時に起動されるバンドルは、以前システムが起動処理を終了した後に起動されていたバンドルである。正常に起動されていたということは、起動されるバンドルに必要なサービスを提供するバンドルが既に必要なサービスを登録していたため、バンドルの起動に成功したことになる。 The bundle that is activated when the system is activated is a bundle that has been activated after the system ends the activation process. The normal activation means that the bundle providing the necessary service for the bundle to be activated has already registered the necessary service, and thus the bundle has been successfully activated.
言い換えれば、システム起動されて全てのバンドルが起動されれば、必要なサービスが登録されていないという状態は無いことが保証されていることになる。 In other words, if all bundles are activated after the system is activated, it is guaranteed that there is no state where the necessary services are not registered.
システムの起動時か否かの判断は、システム起動処理の先頭で設定され、システム起動処理の最後で設定解除されるフラグを用いて行う。このフラグが設定されているときはシステムの起動処理時であると判断する。 Whether or not the system is activated is determined by using a flag that is set at the beginning of the system activation process and is canceled at the end of the system activation process. When this flag is set, it is determined that the system is being started.
サービスを提供するバンドルの不具合により、システム起動時に所望のサービスが検索できないことや、その他の原因によってバンドルの起動が終了しない場合がある。 Due to a defect in the bundle that provides the service, it may not be possible to search for a desired service when the system is started, or the bundle activation may not be terminated due to other reasons.
通常は全てのバンドルの起動終了を待ってシステムの起動終了処理を行うが、予め設定されたタイムアウト時間を経過しても起動処理を終了できないバンドルが存在する場合、バンドルの持つ属性によってその後の処理を変更する。 Normally, the system startup and termination process is performed after the startup of all bundles is completed. If there is a bundle that cannot be terminated even after the preset timeout period has elapsed, the subsequent processing depends on the bundle's attributes. To change.
起動できなかったバンドルのマニフェスト・ヘッダに提供サービス3060が設定されていない場合は、このバンドルが起動されなくてもシステム全体に及ぼす影響は軽微である。このため、バンドルが起動できなかったことを示すログを生成してシステムの起動処理を正常終了する。
If the provided
提供サービス3060が設定されている場合、このバンドルが起動できないことにより、他のバンドルに多大な影響を与えることになるため、システムの起動処理を以上終了させ、システム全体を停止する。
When the
このようにして、迅速に安全にシステムを起動することを実現する。 In this way, it is possible to quickly and safely start the system.
なお、本発明の実施形態は、例えばコンピュータがプログラムを実行することによって実現することができる。また、プログラムをコンピュータに供給するための手段、例えばかかるプログラムを記録したCD−ROM等のコンピュータ読み取り可能な記録媒体又はかかるプログラムを伝送するインターネット等の伝送媒体も本発明の実施形態として適用することができる。また、上記のプログラムも本発明の実施形態として適用することができる。上記のプログラム、記録媒体、伝送媒体及びプログラムプロダクトは、本発明の範疇に含まれる。 The embodiment of the present invention can be realized by, for example, a computer executing a program. Also, means for supplying a program to a computer, for example, a computer-readable recording medium such as a CD-ROM recording such a program, or a transmission medium such as the Internet for transmitting such a program is also applied as an embodiment of the present invention. Can do. The above program can also be applied as an embodiment of the present invention. The above program, recording medium, transmission medium, and program product are included in the scope of the present invention.
1010:オペレーティングシステム
1020:Java(登録商標)仮想マシン
1030:フレームワーク
1040:バンドル
2010:フレームワーク実装
2015:BundleContext
2020:Bundle
2025:バンドル制御実装
2030:BundleActivator
2035:バンドル実装
2040:サービス制御実装
2045:サービス実装
2050:ServiceRegistration
2055:ServiceReference
3010:バンドル名
3020:静的参照パッケージ
3030:提供パッケージ
3040:動的参照パッケージ
3050:参照サービス
3060:提供サービス
3070:BundleActivator実装クラス名
1010: Operating system 1020: Java (registered trademark) virtual machine 1030: Framework 1040: Bundle 2010: Framework implementation 2015: BundleContext
2020: Bundle
2025: Bundle control implementation 2030: BundleActivator
2035: Bundle implementation 2040: Service control implementation 2045: Service implementation 2050: ServiceRegistration
2055: ServiceReference
3010: Bundle name 3020: Static reference package 3030: Provided package 3040: Dynamic reference package 3050: Reference service 3060: Provided service 3070: BundleActivator implementation class name
Claims (4)
プログラム・モジュールをソフトウェア・システムの起動後にソフトウェア・システムにインストールするインストール手段と、
前記インストール手段によってインストールされたプログラム・モジュールを個々に指定し起動するプログラム・モジュール起動手段と、
前記プログラム・モジュール起動手段によって起動されたプログラム・モジュールを個々に指定し停止するプログラム・モジュール停止手段と、
ソフトウェア・システムの起動時に各プログラム・モジュールを前記プログラム・モジュール起動手段によって並列に起動するシステム起動手段と、
プログラム・モジュールが持つ機能を他のモジュールに使用可能にする機能アクセス手段と、
前記機能アクセス手段を他のプログラム・モジュールに公開するために登録するサービス登録手段と、
前記サービス登録手段によって登録された機能アクセス手段を検索するサービス検索手段と、
前記サービス検索手段によって検索された機能アクセス手段を取得するサービス取得手段と、
を有し、
前記サービス検索手段は、通常時には予め定められている前記機能アクセス手段が前記サービス登録手段によって登録されていない場合は検索に失敗し、ソフトウェア・システムの起動時には前記サービス登録手段によって予め定められている前記機能アクセス手段が登録されるまで待つことを特徴とするソフトウェア・システム。 In a software system consisting of multiple program modules,
Installation means for installing the program module into the software system after the software system is started; and
Program module starting means for individually specifying and starting the program modules installed by the installing means;
Program module stop means for individually specifying and stopping the program modules started by the program module start means;
System starting means for starting each program module in parallel by the program module starting means when starting the software system; and
Function access means for making the functions of the program module available to other modules;
Service registration means for registering the function access means for publishing to other program modules;
Service search means for searching for function access means registered by the service registration means;
Service acquisition means for acquiring function access means searched by the service search means;
Have
The service search means normally fails when the predetermined function access means is not registered by the service registration means, and is predetermined by the service registration means when the software system is activated. A software system which waits until the function access means is registered.
前記モジュール属性付与手段により設定されたプログラム・モジュールの属性を参照するモジュール属性参照手段と、
を有し、
前記機能アクセス手段を他のプログラム・モジュールに対して提供することを示す提供サービス属性と、他のプログラム・モジュールが提供する機能アクセス手段を使用することを示す使用サービス属性とが定義されており、
前記システム起動手段は、ソフトウェア・システム起動時に、プログラム・モジュールの起動に予め決められた時間以上の処理時間がかかった場合に、そのプログラム・モジュールが提供サービス属性を持つか否かによってソフトウェア・システムの起動処理を正常終了するか異常終了するかを決定することを特徴とする請求項1に記載のソフトウェア・システム。 Module attribute assigning means for setting the attribute of the program module to the program module;
Module attribute reference means for referring to the attribute of the program module set by the module attribute giving means;
Have
Provided service attributes indicating that the function access means is provided to other program modules and use service attributes indicating that the function access means provided by the other program modules are used are defined,
The system activation means determines whether or not the software system has a service attribute to be provided when a processing time longer than a predetermined time is required to activate the program module when the software system is activated. 2. The software system according to claim 1, wherein it is determined whether the startup process of the system is normally terminated or abnormally terminated.
前記プログラム・モジュールを個々に指定し起動するプログラム・モジュール起動工程と、
前記プログラム・モジュールを個々に指定し停止するプログラム・モジュール停止工程と、
ソフトウェア・システムの起動時に各プログラム・モジュールを前記プログラム・モジュール起動工程によって並列に起動するシステム起動工程と、
プログラム・モジュールが持つ機能を他のモジュールに使用可能にする機能アクセス工程と、
前記機能を他のプログラム・モジュールに公開するために登録するサービス登録工程と、
前記機能を検索するサービス検索工程と、
前記機能を取得するサービス取得工程と、
を有し、
前記サービス検索工程において、通常時には予め定められている前記機能が前記サービス登録工程において登録されていない場合は検索に失敗し、ソフトウェア・システムの起動時には前記サービス登録工程において予め定められている前記機能が登録されるまで待つことを特徴とするソフトウェア登録方法。 An installation process for installing the program module into the software system after the software system is started;
A program module starting step for individually specifying and starting the program modules; and
A program module stop step for individually specifying and stopping the program modules; and
A system starting step of starting each program module in parallel by the program module starting step when starting the software system;
A function access process for making the functions of the program module available to other modules;
A service registration step of registering the function for publishing to other program modules;
A service search process for searching for the function;
A service acquisition step of acquiring the function;
Have
In the service search step, if the function that is predetermined in the normal state is not registered in the service registration step, the search fails, and the function that is predetermined in the service registration step when the software system is started up A software registration method characterized by waiting until the software is registered.
プログラム・モジュールをソフトウェア・システムの起動後にソフトウェア・システムにインストールするインストール手順と、
前記プログラム・モジュールを個々に指定し起動するプログラム・モジュール起動手順と、
前記プログラム・モジュールを個々に指定し停止するプログラム・モジュール停止手順と、
ソフトウェア・システムの起動時に各プログラム・モジュールを前記プログラム・モジュール起動手順によって並列に起動するシステム起動手順と、
プログラム・モジュールが持つ機能を他のモジュールに使用可能にする機能アクセス手順と、
前記機能を他のプログラム・モジュールに公開するために登録するサービス登録手順と、
前記機能を検索するサービス検索手順と、
前記機能を取得するサービス取得手順と、
を実行させるソフトウェア登録用のプログラムであって、
前記サービス検索手順において、通常時には予め定められている前記機能が前記サービス登録手順において登録されていない場合は検索に失敗し、ソフトウェア・システムの起動時には前記サービス登録手順において予め定められている前記機能が登録されるまで待機させることを特徴とするプログラム。 On the computer,
An installation procedure for installing the program module in the software system after the software system is started; and
A program module starting procedure for individually specifying and starting the program modules;
A program module stop procedure for individually specifying and stopping the program modules;
A system startup procedure for starting each program module in parallel by the program module startup procedure when starting the software system; and
Function access procedure to make the functions of the program module available to other modules;
A service registration procedure for registering the function for publishing to other program modules;
A service search procedure for searching for the function;
A service acquisition procedure for acquiring the function;
A software registration program that executes
In the service search procedure, if the function predetermined in normal operation is not registered in the service registration procedure, the search fails, and the function predetermined in the service registration procedure is started when the software system is started. A program characterized by having it wait until it is registered.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006152321A JP2007323331A (en) | 2006-05-31 | 2006-05-31 | Software system and software registration method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006152321A JP2007323331A (en) | 2006-05-31 | 2006-05-31 | Software system and software registration method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007323331A true JP2007323331A (en) | 2007-12-13 |
Family
ID=38856086
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006152321A Pending JP2007323331A (en) | 2006-05-31 | 2006-05-31 | Software system and software registration method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007323331A (en) |
-
2006
- 2006-05-31 JP JP2006152321A patent/JP2007323331A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7665065B2 (en) | Software termination method | |
US20210349706A1 (en) | Release lifecycle management system for multi-node application | |
US8606886B2 (en) | System for conversion between physical machines, virtual machines and machine images | |
US8112745B2 (en) | Apparatus and method for capabilities verification and restriction of managed applications in an execution environment | |
US8245217B2 (en) | Management of software and operating system updates required for the process of creating a virtual machine facsimile of an existing physical or virtual machine | |
US8166458B2 (en) | Method and system for automated distributed software testing | |
US8418139B2 (en) | System and method for updating initialization parameters for application software from within a software development environment | |
WO2010113598A1 (en) | Home network system, gateway device, and firmware update method | |
US8225292B2 (en) | Method and system for validating a knowledge package | |
US20090265701A1 (en) | Method and system for platform-agnostic software installation | |
US20080222160A1 (en) | Method and system for providing a program for execution without requiring installation | |
JP5093259B2 (en) | Communication path strengthening method between BIOS and BMC, apparatus and program thereof | |
JP2004158012A (en) | System and method for software application management | |
US20110296395A1 (en) | Systems and methods for generating client qualification to execute package update manager | |
US20170270031A1 (en) | Information processing apparatus, test execution method, and computer-readable recording medium | |
US9015180B1 (en) | Repository including file identification | |
US8904396B2 (en) | System and method of general service management | |
JP2007323331A (en) | Software system and software registration method | |
JP2009271858A (en) | Computing system and program | |
JP4063573B2 (en) | Device driver installation / execution method, installation / execution method, and program | |
JP2004334679A (en) | Information processor, program execution method of information processor, and storage medium recording the program execution method of information processor | |
CN113687915B (en) | Container running method, device, equipment and storage medium | |
US7703096B1 (en) | Method to resolve ambiguities for monitoring and automating UNIX processes | |
WO2021003729A1 (en) | Configuration method, physical device, server and computer readable storage medium | |
JP2005284925A (en) | Computer system and program update method |