JP2006251974A - Information processor and processing method - Google Patents

Information processor and processing method Download PDF

Info

Publication number
JP2006251974A
JP2006251974A JP2005065133A JP2005065133A JP2006251974A JP 2006251974 A JP2006251974 A JP 2006251974A JP 2005065133 A JP2005065133 A JP 2005065133A JP 2005065133 A JP2005065133 A JP 2005065133A JP 2006251974 A JP2006251974 A JP 2006251974A
Authority
JP
Japan
Prior art keywords
bean
ejb
processing
sub
flow
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
Application number
JP2005065133A
Other languages
Japanese (ja)
Inventor
Hirotaka Nakano
裕隆 中野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2005065133A priority Critical patent/JP2006251974A/en
Publication of JP2006251974A publication Critical patent/JP2006251974A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To differentiate executed sub-processing in response to executed processing, according to a request from a requester. <P>SOLUTION: An information processing system is provided with a processing execution means 55 for executing the processing according to the request from the requester, a sub-processing selection means 55 for selecting one or more of the sub-processings corresponding to the processing, among the plurality of sub-processings, based on the request, and a sub-processing execution means 55 for executing the selected sub-processing at least before or after execution. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、情報処理技術に関し、具体的には、例えば、EJB(Enterprise JavaBeans)を利用した情報処理技術に関する。   The present invention relates to information processing technology, and specifically, to information processing technology using, for example, EJB (Enterprise JavaBeans).

例えば、クライアントマシンとサーバシステムとを備えたシステムがある。サーバシステムは、例えば、プレゼンテーション層、ビジネスロジック層及びデータストア層から成る三階層で構築することができる。プレゼンテーション層は、ユーザから入力を受付けたりユーザに情報を出力したりするためのユーザインターフェースを提供できる層であり、例えば、WEBサーバにより実現することができる。ビジネスロジック層は、情報処理を行うための層であり、例えば、EJBサーバにより実現することができる。データストア層は、情報を保存するための層であり、例えば、データベースにより実現することができる。   For example, there is a system including a client machine and a server system. For example, the server system can be constructed in three layers including a presentation layer, a business logic layer, and a data store layer. The presentation layer is a layer that can provide a user interface for receiving input from the user and outputting information to the user, and can be realized by, for example, a WEB server. The business logic layer is a layer for performing information processing, and can be realized by an EJB server, for example. The data store layer is a layer for storing information, and can be realized by a database, for example.

EJB(Enterprise JavaBeans)を利用した情報処理技術としては、例えば特許文献1乃至特許文献5に開示の技術が知られている。   As information processing technology using EJB (Enterprise JavaBeans), for example, technologies disclosed in Patent Documents 1 to 5 are known.

特開2000−250768号公報JP 2000-250768 A 特開2002−082926号公報JP 2002-082926 A 特開2003−323405号公報JP 2003-323405 A 特開2004−086355号公報JP 2004-086355 A 特開2004−318831号公報JP 2004-318831 A

上記のシステムでは、EJBサーバは、処理を実行することの要求をWEBサーバから受け、その要求に応答して、その要求に従う処理を実行することができる。ここで、EJBサーバに、その処理に加えて、それとは別のサブ処理(例えば、第一の処理を実行するときの時刻のログをとる、障害が発生した場合に障害のログをとる等の付加的な処理)を行ってもらいたい場合がある。その際、実行される処理がどんなものかに応じて、実行されるサブ処理を違えることができれば利便性が高まると考えられる。   In the above system, the EJB server can receive a request to execute processing from the WEB server, and can execute processing according to the request in response to the request. Here, in addition to the processing, the EJB server has a different sub-process (for example, logs the time when executing the first process, logs the failure when a failure occurs, etc.) In some cases, you may want to perform additional processing. At that time, if the executed sub-process can be changed depending on what is executed, the convenience is expected to increase.

これは、EJBサーバに限らず、他種のサーバについても同様であると考えられる。   This is considered to be the same not only for the EJB server but also for other types of servers.

従って、本発明の目的の一つは、要求元からの要求に従って実行される処理がどんなものかに応じて、実行されるサブ処理を違えることを可能にすることにある。   Accordingly, one of the objects of the present invention is to make it possible to change the sub-process to be executed depending on what is executed according to the request from the request source.

本発明の一つの側面に従う情報処理システムは、要求元からの要求に従う処理を実行する処理実行手段と、前記処理に対応する一以上のサブ処理を前記要求に基づいて複数のサブ処理の中から選択するサブ処理選択手段と、前記選択されたサブ処理を前記処理の実行前及び実行後のうちの少なくとも一方で実行するサブ処理実行手段とを備える。   An information processing system according to one aspect of the present invention includes: a process execution unit that executes a process according to a request from a request source; and one or more sub-processes corresponding to the process from a plurality of sub-processes based on the request Sub-process selection means for selecting, and sub-process execution means for executing the selected sub-process at least one of before and after execution of the process.

ここで、「情報処理システム」は、一台のコンピュータマシンで構成されても良いし、複数台のコンピュータマシンで構成されても良い。   Here, the “information processing system” may be configured by a single computer machine or may be configured by a plurality of computer machines.

一つの実施態様では、情報処理システムは、複数のサブ処理にそれぞれ対応した複数のサブ処理ID及び複数のサブ処理選択条件を記憶した記憶手段を備えることができる。前記サブ処理選択手段は、前記要求に適合する一以上のサブ処理選択条件を前記複数のサブ処理選択条件の中から特定し、特定された一以上のサブ処理選択条件に対応する一以上のサブ処理IDから識別される一以上のサブ処理を選択することができる。   In one embodiment, the information processing system can include a storage unit that stores a plurality of sub-process IDs and a plurality of sub-process selection conditions respectively corresponding to a plurality of sub-processes. The sub-process selection unit specifies one or more sub-process selection conditions that meet the request from the plurality of sub-process selection conditions, and one or more sub-process selection conditions corresponding to the specified one or more sub-process selection conditions. One or more sub-processes identified from the process ID can be selected.

一つの実施態様では、前記サブ処理選択条件は、キーワードを含んでもよい。前記サブ処理選択手段は、前記要求に含まれている特定の文字列と、サブ処理選択条件を構成するキーワードとに基づいて、前記要求に適合する一以上のサブ処理選択条件を特定することができる。   In one embodiment, the sub-process selection condition may include a keyword. The sub-process selection unit may specify one or more sub-process selection conditions that match the request based on a specific character string included in the request and a keyword constituting the sub-process selection condition. it can.

一つの実施態様では、前記サブ処理選択条件は、キーワードと正規表現との組み合わせで構成されていてもよい。前記サブ処理選択手段は、前記要求に含まれている特定の文字列と、サブ処理選択条件を構成するキーワード及び正規表現とに基づいて、前記要求に適合する一以上のサブ処理選択条件を特定することができる。   In one embodiment, the sub-process selection condition may be composed of a combination of a keyword and a regular expression. The sub-process selection unit specifies one or more sub-process selection conditions that match the request based on a specific character string included in the request, and a keyword and a regular expression constituting the sub-process selection condition. can do.

一つの実施態様では、前記処理には、一つの本名と一以上の別名とがあってもよい。前記要求には特定の文字列が含まれており、前記特定の文字列は、要求対象となる処理の本名と別名とのいずれか一方を表していてもよい。   In one embodiment, the process may have one real name and one or more aliases. The request includes a specific character string, and the specific character string may represent either a real name or an alias of a process to be requested.

なお、情報処理システムは、複数のコンピュータプログラムを記憶する記憶資源と、前記記憶資源に記憶された複数のコンピュータプログラムのうちの少なくとも一つを実行する少なくとも一つのコンピュータとを備えてもよい。前記複数のコンピュータプログラムには、要求元からの処理要求を受付ける受付けプログラムと、所定の処理を実行する一以上の処理プログラムとが含まれていてもよい。前記処理要求には、実行すべき複数の処理対象と前記複数の処理対象の実行順序とが定義されていてもよい。前記受付けプログラムが、前記処理要求を受け(例えば、前記要求元からの前記処理要求の内容に関わらず前記処理要求を受け)、前記受けた処理要求を解析し、前記処理要求で定義されている前記実行順序で、前記処理要求で定義されている複数の処理対象の各々の処理を、前記一以上の処理プログラムのうちの少なくとも一つに依頼してもよい。前記受付けプログラムから処理の依頼を受けた処理プログラムが、依頼された処理対象の処理を行ってもよい。   The information processing system may include a storage resource that stores a plurality of computer programs and at least one computer that executes at least one of the plurality of computer programs stored in the storage resource. The plurality of computer programs may include an acceptance program that accepts a processing request from a request source, and one or more processing programs that execute predetermined processing. In the processing request, a plurality of processing targets to be executed and an execution order of the plurality of processing targets may be defined. The receiving program receives the processing request (for example, receives the processing request regardless of the content of the processing request from the request source), analyzes the received processing request, and is defined in the processing request In the execution order, each of a plurality of processing targets defined in the processing request may be requested to at least one of the one or more processing programs. The processing program that has received the processing request from the receiving program may perform the requested processing target processing.

ここで、「情報処理システム」は、一台のコンピュータマシンで構成されても良いし、複数台のコンピュータマシンで構成されても良い。また、「コンピュータ」は、コンピュータマシンであっても良いし、コンピュータマシンに搭載されるプロセッサ(例えばCPU)であっても良い。また、「記憶資源」は、複数の記憶装置(例えば、ハードディスク又はメモリ)のうちの少なくとも一つによって構成されてもよい。   Here, the “information processing system” may be configured by a single computer machine or may be configured by a plurality of computer machines. Further, the “computer” may be a computer machine or a processor (for example, CPU) mounted on the computer machine. Further, the “storage resource” may be configured by at least one of a plurality of storage devices (for example, a hard disk or a memory).

一つの実施態様では、前記処理要求には、少なくとも一つのトランザクション分離範囲と、そのトランザクション分離範囲に属する処理対象とを定義することができる。前記受付けプログラムが、トランザクション分離範囲に属する処理対象については、トランザクション分離範囲に属さない処理対象に関するトランザクションから独立した処理が行われるように前記一以上の処理プログラムに処理を依頼することができる。   In one embodiment, the processing request may define at least one transaction isolation range and a processing target belonging to the transaction isolation range. For the processing target belonging to the transaction isolation range, the accepting program can request the one or more processing programs to perform processing independent of the transaction related to the processing target not belonging to the transaction isolation range.

一つの実施態様では、前記一以上の処理プログラムには、第一の処理を実行する第一の処理プログラムと、前記第一の処理とは別の第二の処理を実行する第二の処理プログラムとを含めることができる。前記受付けプログラムが、前記受けた処理要求を解析することにより、トランザクション分離範囲が検出された場合には、前記第一の処理プログラムに処理を依頼し、処理対象が検出された場合には、前記第二の処理プログラムに処理を依頼することができる。   In one embodiment, the one or more processing programs include a first processing program for executing a first processing and a second processing program for executing a second processing different from the first processing. And can be included. When the acceptance program detects the transaction separation range by analyzing the received processing request, the processing is requested to the first processing program, and when the processing target is detected, Processing can be requested to the second processing program.

一つの実施態様では、前記受付けプログラム及び前記第二の処理プログラムは、呼出し元に返ってコミットする性質を有することができる(例えば、Requiredという属性のEJBであるとすることができる)。前記第一の処理プログラムは、新たにトランザクションを作成し、呼び出し元のトランザクションに参加せずにトランザクションを完結させる性質を有することができる(例えば、Requires Newという属性のEJBであるとすることができる)。前記受付けプログラムから処理の依頼を受けた前記第一の処理プログラムが、前記トランザクション分離範囲に属する処理対象の処理を前記第二の処理プログラムに依頼することができる。前記受付けプログラム又は前記第一の処理プログラムから処理の依頼を受けた前記第二の処理プログラムが、依頼された処理対象の処理を実行し、実行の結果を依頼元に返すことができる。前記第一の処理プログラムは、前記第二の処理プログラムから実行の結果を受けた場合、処理の依頼元である受付けプログラムのトランザクションに参加することなく、依頼した処理に関わるトランザクションをコミットすることができる。前記受付けプログラムは、前記第二の処理プログラムから実行の結果を受けた場合、依頼した処理に関わるトランザクションをコミットすることができる。   In one embodiment, the accepting program and the second processing program may have the property of returning to the caller and committing (for example, it may be an EJB with a required attribute). The first processing program can have a property of creating a new transaction and completing the transaction without participating in the caller transaction (for example, it can be assumed that the EJB has an attribute of “Requires New”. ). The first processing program that has received a processing request from the accepting program can request the second processing program for processing to be processed belonging to the transaction isolation range. The second processing program that has received a processing request from the accepting program or the first processing program can execute the requested processing target process and return the execution result to the request source. When the first processing program receives the execution result from the second processing program, the first processing program may commit the transaction related to the requested processing without participating in the transaction of the receiving program that is the processing request source. it can. When receiving the execution result from the second processing program, the receiving program can commit the transaction related to the requested processing.

一つの実施態様では、前記処理要求には、トランザクション分離範囲に含まれる更なるトランザクション分離範囲を定義することができる。前記第一の処理プログラムは、前記更なるトランザクション分離範囲が検出された場合には、自分に対して前記更なるトランザクション分離範囲の処理を依頼することができる。   In one embodiment, the processing request may define a further transaction isolation range included in the transaction isolation range. When the further transaction isolation range is detected, the first processing program can request the processing of the further transaction isolation range from itself.

一つの実施態様では、前記一以上の処理プログラムには、依頼された処理対象の処理を実行する実行プログラムを含めることができる。前記受付けプログラム及び前記実行プログラムは、呼出し元に返ってコミットする性質を有することができる(例えば、Requiredという属性のEJBであるとすることができる)。前記受付けプログラムから処理の依頼を受けた前記実行プログラムが、依頼された処理対象の処理を実行することができる。   In one embodiment, the one or more processing programs may include an execution program that executes a requested processing target process. The accepting program and the execution program may have a property of returning to the caller and committing (for example, it may be an EJB with an attribute of Required). The execution program that has received a processing request from the receiving program can execute the requested processing target process.

情報処理システムは、複数のコンピュータプログラムを記憶する記憶資源と、前記記憶資源に記憶された多数のコンピュータプログラムのうちの少なくとも一つを実行する少なくとも一つのコンピュータとを備えてもよい。前記多数のコンピュータプログラムには、複数の処理要素実行プログラムと、処理要素実行プログラムの数よりも少ない数の処理プログラムとが含まれていてもよい。前記複数の処理要素実行プログラムの各々は、所定の処理対象の処理を構成する一以上の処理要素のうちの所定の処理要素を実行してもよい。前記処理プログラムは、前記所定の処理対象の処理を構成する一以上の処理要素をそれぞれ実行する一以上の処理要素実行プログラムを実行することにより、前記所定の処理対象の処理を実行してもよい。   The information processing system may include a storage resource that stores a plurality of computer programs and at least one computer that executes at least one of a large number of computer programs stored in the storage resource. The multiple computer programs may include a plurality of processing element execution programs and a number of processing programs smaller than the number of processing element execution programs. Each of the plurality of processing element execution programs may execute a predetermined processing element among one or more processing elements constituting a predetermined processing target process. The processing program may execute the predetermined processing target process by executing one or more processing element execution programs that respectively execute one or more processing elements constituting the predetermined processing target process. .

一つの実施態様では、前記記憶資源には、各処理対象に対応した各処理定義データが記憶されていてもよい。各処理定義データには、各処理対象の処理を構成する一以上の処理要素の実行手順に関する定義を記述することができる。前記処理プログラムが、所定の処理対象に対応した処理定義データに基づいて、その所定の処理対象の処理を実行することができる。   In one embodiment, each processing definition data corresponding to each processing target may be stored in the storage resource. Each process definition data can describe a definition relating to an execution procedure of one or more process elements constituting each process target process. The processing program can execute the processing of the predetermined processing target based on the process definition data corresponding to the predetermined processing target.

一つの実施態様では、前記複数の処理要素実行プログラム以外の一以上のコンピュータプログラムのうちの少なくとも一つが、前記所定の処理対象に対応する処理定義データに基づいて、その処理定義データで定義された実行手順でその処理定義データで定義された一以上の処理要素を実行するための処理実行対象を生成することができる。前記処理プログラムが、前記処理実行対象を実行することにより、前記所定の処理対象の処理を実行することができる。   In one embodiment, at least one of one or more computer programs other than the plurality of processing element execution programs is defined by the process definition data based on the process definition data corresponding to the predetermined process target. A process execution target for executing one or more process elements defined by the process definition data in the execution procedure can be generated. When the processing program executes the process execution target, the predetermined process target process can be executed.

一つの実施態様では、前記処理定義データには、前記実行手順に関する定義として、第一の処理要素実行プログラムの出力を第二の処理要素実行プログラムに入力してその第二の処理要素実行プログラムがその出力を用いて処理することが記述されていてもよい。前記処理実行対象が、前記処理定義データに従って、前記第一の処理要素実行プログラムの出力を第二の処理要素実行プログラムに入力してその第二の処理要素実行プログラムにその出力を用いて処理を行わせることができる。   In one embodiment, the process definition data includes, as a definition relating to the execution procedure, an output of a first process element execution program that is input to a second process element execution program. Processing using the output may be described. In accordance with the process definition data, the process execution target inputs the output of the first process element execution program to a second process element execution program and performs processing using the output of the second process element execution program. Can be done.

一つの実施態様では、前記複数のコンピュータプログラムには、要求元からの処理要求を受付ける受付けプログラムが含まれていてもよい。前記受付けプログラムが、前記要求元からの処理要求を受け、前記受けた処理要求を解析し、前記処理要求で定義されている一以上の処理対象の各々の処理を、前記処理プログラムに依頼することができる。前記処理プログラムが、前記受付けプログラムから依頼された処理対象の処理を行うことができる。前記受付けプログラム及び前記処理プログラムは、ステートレスセッションビーンとしてのEJBとすることができる。   In one embodiment, the plurality of computer programs may include an acceptance program that accepts a processing request from a request source. The receiving program receives a processing request from the request source, analyzes the received processing request, and requests the processing program to process each of one or more processing targets defined in the processing request. Can do. The processing program can perform processing of a processing target requested by the receiving program. The acceptance program and the processing program may be an EJB as a stateless session bean.

一つの実施態様では、前記処理定義データには、その処理定義データに基づいて生成される処理実行対象が前記一以上の処理要素実行プログラムのために確保されたリソースを開放することが記述されていてもよい。前記処理実行対象が、前記前記一以上の処理要素実行プログラムのために確保されたリソースを開放することができる。   In one embodiment, the process definition data describes that a process execution target generated based on the process definition data releases resources reserved for the one or more process element execution programs. May be. The processing execution target can release resources reserved for the one or more processing element execution programs.

一つの実施態様では、前記複数のコンピュータプログラムには、要求元からの処理要求を受付ける受付けプログラムが含まれていてもよい。前記受付けプログラムが、前記要求元からの処理要求を受け、前記受けた処理要求を解析し、前記処理要求で定義されている一以上の処理対象の各々の処理を、前記処理プログラムに依頼することができる。前記処理プログラムが、前記受付けプログラムから依頼された処理対象の処理を行うことができる。   In one embodiment, the plurality of computer programs may include an acceptance program that accepts a processing request from a request source. The receiving program receives a processing request from the request source, analyzes the received processing request, and requests the processing program to process each of one or more processing targets defined in the processing request. Can do. The processing program can perform processing of a processing target requested by the receiving program.

一つの実施態様では、前記複数の処理要素実行プログラムとは異なる一以上のコンピュータプログラムのうちの前記実行される一以上の処理要素実行プログラムのために確保されたリソースを開放するリソース開放手段を備え、前記リソース開放手段が前記一以上の処理要素実行プログラムではないことを特徴とすることができる。   In one embodiment, resource release means for releasing resources reserved for the one or more processing element execution programs to be executed out of one or more computer programs different from the plurality of processing element execution programs is provided. The resource releasing means is not the one or more processing element execution programs.

以下、図面を参照して、本発明の一実施形態について説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の一実施形態に係るシステムのハードウェア構成の概要を示すブロック図である。   FIG. 1 is a block diagram showing an outline of a hardware configuration of a system according to an embodiment of the present invention.

クライアントシステム3に、サーバシステム6が通信可能に(例えば、インターネット等の通信ネットワークを介して)接続されている。   A server system 6 is communicably connected to the client system 3 (for example, via a communication network such as the Internet).

クライアントシステム3は、例えば、一以上のCPU(Central Processing Unit)13や一以上の記憶資源(例えば一以上のメモリ15や一以上のハードディスク17)等のハードウェア資源を備えたコンピュータシステムである。クライアントシステム3は、例えば、パーソナルコンピュータ、ワークステーション、メインフレーム等として構成することができる。クライアントシステム3は、例えば、キーボードスイッチやポインティングデバイス、マイクロフォン等の情報入力装置(図示せず)と、例えば、モニタディスプレイやスピーカー等の情報出力装置(図示せず)とを備えることもできる。   The client system 3 is a computer system including hardware resources such as one or more CPUs (Central Processing Units) 13 and one or more storage resources (for example, one or more memories 15 and one or more hard disks 17). The client system 3 can be configured as, for example, a personal computer, a workstation, a main frame, or the like. The client system 3 can also include an information input device (not shown) such as a keyboard switch, a pointing device, and a microphone, and an information output device (not shown) such as a monitor display and a speaker, for example.

サーバシステム6は、例えば、プレゼンテーション層、ビジネスロジック層及びデータストア層から成る三階層で構成することができる。この場合、例えば、プレゼンテーション層を、WEBサーバ5で構成し、ビジネスロジック層を、EJBサーバ7で構成し、データストア層を、データベース38で構成することができる。WEBサーバ5は、例えば、一以上のCPU23や一以上の記憶資源(例えば一以上のメモリ25や一以上のハードディスク27)等のハードウェア資源を備えたコンピュータシステムである。EJBサーバ7も、例えば、一以上のCPU33や一以上の記憶資源(例えば一以上のメモリ35や一以上のハードディスク37)等のハードウェア資源を備えたコンピュータシステムである。データベース38も、図示しないが、一以上のCPUや一以上の記憶資源等のハードウェア資源を備えたコンピュータシステムとすることができる。   The server system 6 can be configured in, for example, three layers including a presentation layer, a business logic layer, and a data store layer. In this case, for example, the presentation layer can be composed of the WEB server 5, the business logic layer can be composed of the EJB server 7, and the data store layer can be composed of the database 38. The WEB server 5 is a computer system including hardware resources such as one or more CPUs 23 and one or more storage resources (for example, one or more memories 25 and one or more hard disks 27). The EJB server 7 is also a computer system including hardware resources such as one or more CPUs 33 and one or more storage resources (for example, one or more memories 35 and one or more hard disks 37). Although not shown, the database 38 can also be a computer system provided with hardware resources such as one or more CPUs and one or more storage resources.

なお、サーバシステム6の構成は、図示の構成に限らず、他の構成を採用することができる。また、クライアントシステム3、WEBサーバ5、EJBサーバ7及びデータベース38のうちの少なくとも一つは、一台のコンピュータシステムで構成されていても良いし、複数台のコンピュータシステムで構成されていても良い。   The configuration of the server system 6 is not limited to the illustrated configuration, and other configurations can be employed. In addition, at least one of the client system 3, the WEB server 5, the EJB server 7, and the database 38 may be configured by a single computer system or may be configured by a plurality of computer systems. .

図2は、図1に示したシステムのソフトウェア構成の概要を示すブロック図である。   FIG. 2 is a block diagram showing an outline of the software configuration of the system shown in FIG.

クライアントシステム3には、WEBブラウザ43が備えることができる。WEBブラウザ43は、WEBサーバ5に対して要求を発行したり、その要求に従う情報をWEBサーバ5から受信して表示したりすることができる。   The client system 3 can include a WEB browser 43. The WEB browser 43 can issue a request to the WEB server 5 and can receive and display information according to the request from the WEB server 5.

WEBサーバ5には、ファサードバリュー記憶域49と、外部アプリケーション45とが備えられる。   The WEB server 5 includes a facade value storage area 49 and an external application 45.

ファサードバリュー記憶域49は、上述した記憶資源上に設けられるものであり、一又は複数のファサードバリューを記憶することができる。ファサードバリューは、本実施形態における一つの特徴であり、トランザクションをフローとして記述することができるコマンドパッケージである。ファサードバリューについては、後に詳細に説明する。   The facade value storage area 49 is provided on the storage resource described above, and can store one or more facade values. The facade value is one feature in the present embodiment, and is a command package that can describe a transaction as a flow. The facade value will be described in detail later.

外部アプリケーション45は、EJBサーバ7の外部に存在するアプリケーションプログラムであり、メモリ25からCPU23に読み込まれることにより、EJBサーバ7から情報を取得したり、その取得した情報をWEBブラウザ43に提供したりすることができる。具体的には、例えば、外部アプリケーション45は、ファサードバリュー選択プログラム47を備え、そのプログラム47により、WEBブラウザ43からの要求(例えば、画面切替え要求)に対応したファサードバリューをファサードバリュー記憶域49の中から選択し、選択したファサードバリューをEJBサーバ7に送信する。それにより、外部アプリケーション45は、WEBブラウザ43からの要求に従う情報をEJBサーバ7から受信し、その受信した情報をWEBサーバ5に提供することができる。なお、この実施形態では、WEBサーバ5がEJBサーバ7に対して要求する処理別にファサードバリューがファサードバリュー記憶域49に記憶されているものとする。しかし、例えば、WEBサーバ5の管理者が、任意のタイミングで、キーボード等の情報入力装置を用いてファサードバリューを作成し、作成したファサードバリューをファサードバリュー記憶域49に記憶させたり、作成したファサードバリューをWEBサーバ5からEJBサーバ7に送信させたりすることもできる。   The external application 45 is an application program that exists outside the EJB server 7 and is read into the CPU 23 from the memory 25 to acquire information from the EJB server 7 or provide the acquired information to the WEB browser 43. can do. Specifically, for example, the external application 45 includes a facade value selection program 47, and the program 47 stores a facade value corresponding to a request (for example, a screen switching request) from the WEB browser 43 in the facade value storage area 49. The selected facade value is sent to the EJB server 7. Thereby, the external application 45 can receive information according to the request from the WEB browser 43 from the EJB server 7 and provide the received information to the WEB server 5. In this embodiment, it is assumed that a facade value is stored in the facade value storage area 49 for each process requested by the WEB server 5 to the EJB server 7. However, for example, the administrator of the WEB server 5 creates a facade value at an arbitrary timing using an information input device such as a keyboard, and stores the created facade value in the facade value storage area 49, or creates the created facade. The value can be transmitted from the WEB server 5 to the EJB server 7.

EJBサーバ7には、後述するビーンフロー定義ファイルが記憶されるビーンフロー定義ファイル記憶域57や、後述するビーンフローが記憶されるビーンフロー記憶域59や、複数のプログラムモジュールが記憶されるプログラムモジュール記憶域61や、後述するインターセプタ定義ファイルが記憶されるインターセプタ定義ファイル記憶域63や、複数のEJBがデプロイされたEJBコンテナ14が備えられる。各記憶域57、59、61及び63は、上述した記憶資源上に設けられるものである。プログラムモジュール記憶域61に記憶されるプログラムモジュールには、例えば、ビーンや、インターセプタ(これも、ビーンであってもよい)等がある。その記憶域61に記憶されるビーンは、後述する工夫により、EJBではなくPOJO(Plain Old Java Object)とすることができる。EJBコンテナ14にデプロイされた複数のEJBとして、例えば、ファサード層EJB51と、トランザクション分離層EJB53と、ビーンフロー実行層EJB55とがある。各EJB51、53及び55、後述するビーンやインターセプタ等の種々のコンピュータプログラムは、例えば、記憶資源からCPUに読み込まれることにより実行される。   The EJB server 7 has a bean flow definition file storage area 57 in which a bean flow definition file described later is stored, a bean flow storage area 59 in which a bean flow described later is stored, and a program module in which a plurality of program modules are stored. A storage area 61, an interceptor definition file storage area 63 in which an interceptor definition file described later is stored, and an EJB container 14 in which a plurality of EJBs are deployed are provided. Each of the storage areas 57, 59, 61 and 63 is provided on the storage resource described above. Examples of the program module stored in the program module storage area 61 include a bean and an interceptor (which may also be a bean). A bean stored in the storage area 61 can be a POJO (Plain Old Java Object) instead of an EJB by a device described later. As a plurality of EJBs deployed in the EJB container 14, for example, there are a facade layer EJB 51, a transaction separation layer EJB 53, and a bean flow execution layer EJB 55. The various computer programs such as the EJBs 51, 53, and 55, and beans and interceptors, which will be described later, are executed by being read from a storage resource by the CPU.

ファサード層EJB51は、呼び出し元(この実施形態ではWEBサーバ5)にとっての呼出し口となるものであり、呼び出し元から発行されるファサードバリューを受けて解釈するEJBである。ファサードバリューの記述内容に関わらず、同一のファサード層EJB51が呼び出される。換言すれば、ファサードバリューで定義されたフローがどんなものであっても、ファサードバリューの受付口は、この一つのファサード層EJB51で済む。こうすることができた理由については、後に詳細に説明する。   The facade layer EJB 51 serves as a call port for the caller (the WEB server 5 in this embodiment), and is an EJB that receives and interprets the facade value issued from the caller. The same facade layer EJB 51 is called regardless of the description contents of the facade value. In other words, regardless of the flow defined by the facade value, the single facade layer EJB 51 is sufficient for the facade value reception port. The reason why this can be done will be described in detail later.

トランザクション層EJB53は、ファサードバリューで定義されているユニットオブワークを処理するEJBである。ユニットオブワークについては後に詳述する。   The transaction layer EJB 53 is an EJB that processes a unit of work defined by a facade value. The unit of work will be described in detail later.

ビーンフロー実行層EJB55は、ファサードバリューで定義されているコマンドオブジェクトを処理するEJBである。コマンドオブジェクトについても後に詳述する。   The bean flow execution layer EJB 55 is an EJB that processes a command object defined by a facade value. The command object will be described later in detail.

上述した3つのEJB51、53及び55や、プログラムモジュール記憶域61に記憶されているビーンは、CPU33に読み込まれることにより動作することができる。また、EJBサーバ7が、複数台のコンピュータシステムにより構築された分散型システムの場合には、各コンピュータシステムの各CPUに読み込まれることにより、EJB51、53又は55や、プログラムモジュール記憶域61に記憶されているプログラムモジュールが動作することができる。   The three EJBs 51, 53, and 55 described above and the beans stored in the program module storage area 61 can operate by being read by the CPU 33. When the EJB server 7 is a distributed system constructed by a plurality of computer systems, it is stored in the EJB 51, 53 or 55 or the program module storage area 61 by being read by each CPU of each computer system. The program module being operated can operate.

EJBの種類は幾つかあるが、上述したEJB51、53及び55は、いずれも、ステートレスセッションビーン(つまり、状態値を保持しないタイプのEJB)である。   Although there are several types of EJBs, the above-described EJBs 51, 53, and 55 are all stateless session beans (that is, EJBs that do not hold state values).

EJB51、53及び55のうち、ファサード層EJB51及びビーンフロー実行層EJB55は、第一の属性として、例えば「Required」という属性を有し、トランザクション層EJB53は、第二の属性として、例えば「Requires New」という属性を有する。属性「Required」を有するEJBは、呼び出し元のトランザクションに参加する性質(具体的には、呼出し元に返って初めてコミットする性質)を持つ。属性「Requires New」を有するEJBは、呼び出し元のトランザクションには参加せずに、呼出しの範囲内で(すなわち、属性「Requires New」のEJBのメソッドを読んだ範囲内で)、新たに独立したトランザクションを作成する性質を持つ。例えば、属性「Requires New」を有するEJBは、第一のEJBから呼ばれて、第二のEJBを呼び出した場合、第一のEJBのトランザクションには参加せずに、第二のEJBのトランザクションを完結させる。これにより、例えば、第一のEJBの処理で障害が発生した場合、第一のEJBのトランザクションについてはロールバックが行われるが、第二のEJBのトランザクションは完結しているので、その第二のEJBのトランザクションまでロールバックされない。   Among the EJBs 51, 53, and 55, the facade layer EJB 51 and the bean flow execution layer EJB 55 have, for example, an attribute “Required” as the first attribute, and the transaction layer EJB 53 has, for example, “Requires New ”Attribute. The EJB having the attribute “Required” has the property of participating in the caller transaction (specifically, the property of committing only after returning to the caller). An EJB with the attribute “Requires New” does not participate in the caller's transaction, and is newly independent within the scope of the call (ie, within the scope of reading the EJB method with the attribute “Requires New”). Has the property of creating transactions. For example, when an EJB having the attribute “Requires New” is called from the first EJB and calls the second EJB, the transaction of the second EJB is not participated in the transaction of the first EJB. Complete. As a result, for example, when a failure occurs in the processing of the first EJB, the first EJB transaction is rolled back, but the second EJB transaction is completed, so the second EJB transaction is completed. It is not rolled back until the EJB transaction.

以上が、この実施形態に係るシステムでのソフトウェア構成の概要である。以下、そのシステムで行われる処理の流れの概要について説明する。   The above is the outline of the software configuration in the system according to this embodiment. Hereinafter, an outline of the flow of processing performed in the system will be described.

図3は、図2に示したシステムで行われる処理の流れの概要を示す。   FIG. 3 shows an outline of the flow of processing performed in the system shown in FIG.

外部アプリケーション45は、WEBブラウザ43から何らかの指示を受ける(ステップS1)。外部アプリケーション45は、例えば、WEBブラウザ43に表示される画面の画面構成の変更の指示、或いは、ユーザが指定した銀行口座からの出金の指示など、様々な指示を受付けることができる。   The external application 45 receives some instruction from the WEB browser 43 (step S1). The external application 45 can accept various instructions such as an instruction to change the screen configuration of the screen displayed on the WEB browser 43 or an instruction to withdraw from a bank account designated by the user.

外部アプリケーション45は、受けた指示を解析し、ファサードバリュー選択プログラム47により、その解析結果に対応するファサードバリュー46をファサードバリュー記憶域49(つまり、複数のファサードバリューの中)から検索する(S2)。そして、外部アプリケーション45は、検索ヒットしたファサードバリュー46をファサードバリュー記憶域49から取得し(S3)、ファサード層EJB51を呼び出して、取得したファサードバリュー46をファサード層EJB51に送信する(S4)。   The external application 45 analyzes the received instruction, and searches the facade value storage area 49 (that is, among the plurality of facade values) for the facade value 46 corresponding to the analysis result by the facade value selection program 47 (S2). . Then, the external application 45 acquires the facade value 46 that has been searched for from the facade value storage area 49 (S3), calls the facade layer EJB 51, and transmits the acquired facade value 46 to the facade layer EJB 51 (S4).

ファサード層EJB51は、外部アプリケーション45から呼び出されてファサードバリュー46を受信し、受信したファサードバリュー46を解析し、その解析結果に応じて、トランザクション分離層EJB53及びビーンフロー実行層EJB55のうちのどちらを呼び出すかを選択し、選択したEJB53又は55を呼び出して処理を依頼する。具体的には、ファサード層EJB51は、上記解析の結果、後述するユニットオブワーク(トランザクション境界オブジェクト)を検出した場合には、トランザクション分離層EJB53を呼び出してユニットオブワークの処理を依頼し、そうではなく、後述するコマンドオブジェクトを検出した場合には、ビーンフロー実行層EJB55を呼び出してそのコマンドオブジェクトの処理を依頼する。トランザクション分離層EJB53は、ユニットオブワークの処理の際、そのユニットオブワーク内にある別のユニットオブワークを検出した場合には、自分を呼び出してその別のユニットオブワークの処理を行い(つまり再帰的に処理を行い)、そのユニットオブワーク内にあるコマンドオブジェクトを検出した場合には、ビーンフロー実行層EJB55を呼び出してそのコマンドオブジェクトの処理を依頼する。ビーンフロー実行層EJB55は、依頼されたコマンドオブジェクトの処理を実行する。以上のようにして、EJBサーバ7において、ファサード層EJB51が受信したファサードバリュー46の記述に応じた処理が行われる(S5)。   The facade layer EJB 51 is called from the external application 45, receives the facade value 46, analyzes the received facade value 46, and selects either the transaction separation layer EJB 53 or the bean flow execution layer EJB 55 according to the analysis result. Select whether to call, and call the selected EJB 53 or 55 to request processing. Specifically, when the facade layer EJB 51 detects a unit of work (transaction boundary object) described later as a result of the above analysis, it calls the transaction separation layer EJB 53 to request processing of the unit of work. If a command object to be described later is detected, the bean flow execution layer EJB 55 is called to request processing of the command object. When the transaction separation layer EJB 53 detects another unit of work in the unit of work during processing of the unit of work, the transaction separation layer EJB 53 calls itself to perform the processing of the other unit of work (that is, recursion). When a command object in the unit of work is detected, the bean flow execution layer EJB55 is called to request processing of the command object. The bean flow execution layer EJB 55 executes processing of the requested command object. As described above, the EJB server 7 performs processing according to the description of the facade value 46 received by the facade layer EJB 51 (S5).

本実施形態では、上述したように、ファサードバリュー46で定義されたフローがどんなものであっても、ファサードバリュー46を解釈することができるファサード層EJB51が一つあれば、呼出し口はこの一つで済む。以下、ファサードバリュー46の構成、並びに、そのファサードバリュー46が処理される際に行われる処理流れ(つまり、上記S5の詳細の一例)について説明する。   In the present embodiment, as described above, if there is one facade layer EJB 51 capable of interpreting the facade value 46 regardless of the flow defined by the facade value 46, the calling port is one of these. Just do it. Hereinafter, the configuration of the facade value 46 and the processing flow performed when the facade value 46 is processed (that is, an example of the details of the above S5) will be described.

図4Aは、ファサードバリューの構成の一例を示す。   FIG. 4A shows an example of the configuration of the facade value.

ファサードバリュー46には、ユニットオブワークと、コマンドオブジェクトとの両方を記述することができる。   In the facade value 46, both a unit of work and a command object can be described.

ユニットオブワークは、トランザクションの境界(別の言い方をすれば「分離」)を表すオブジェクトである。一つのユニットオブワーク内には、別のユニットオブワークを記述することもできるし、一又は複数のコマンドオブジェクトを記述することもできる。   A unit of work is an object that represents a transaction boundary (in other words, “separation”). Another unit of work can be described in one unit of work, and one or a plurality of command objects can be described.

コマンドオブジェクトは、一つのコマンドに対応するオブジェクトであり、後述するビーンフローを特定するためのキー(例えばコマンド名)を含み、そのキーに対応するビーンフローの実行を指示するためのものである。コマンドオブジェクトは、例えば、図示のように、ビーンフローキー72、入力オブジェクト74、出力オブジェクト76及び例外オブジェクト78を含む。ビーンフローキー72は、ビーンフロー記憶域59から、ビーンフローを取得するためのキーである。ビーンフローキー72は、プログラムモジュール記憶域61からインターセプタを取得するキーとして使用することもできる。入力オブジェクト74は、このコマンドオブジェクトで指定されたコマンド(ビーンフロー)を実行するビーンに入力することができるオブジェクトである。出力オブジェクト76は、そのコマンドの実行結果を保持することができるオブジェクトである。例外オブジェクト78は、そのコマンドの実行中に発生した例外を保持することができるオブジェクトである。   The command object is an object corresponding to one command, and includes a key (for example, command name) for specifying a bean flow to be described later, and is for instructing execution of the bean flow corresponding to the key. The command object includes, for example, a bean flow key 72, an input object 74, an output object 76, and an exception object 78 as illustrated. The bean flow key 72 is a key for obtaining a bean flow from the bean flow storage area 59. The bean flow key 72 can also be used as a key for obtaining an interceptor from the program module storage area 61. The input object 74 is an object that can be input to a bean that executes a command (bean flow) specified by the command object. The output object 76 is an object that can hold the execution result of the command. The exception object 78 is an object that can hold an exception that occurred during execution of the command.

ファサードバリューに記述されたユニットオブワークやコマンドオブジェクトは、ファサードバリューの先頭から順に処理される。このため、ファサードバリュー上で、コマンドオブジェクトとユニットオブワークとをどのように配列するかや、そのユニットオブワーク内にコマンドオブジェクト(或いはユニットオブワーク)をどのように配列するかによって、トランザクションのフローを定義することができる。すなわち、ファサードバリューにより、呼び出し元(この実施形態ではWEBサーバ)からトランザクションのコントロールを行うことができる。以下、一つの具体例を説明する。   The unit object and command object described in the facade value are processed in order from the top of the facade value. Therefore, depending on how the command object and unit of work are arranged on the facade value, and how the command object (or unit of work) is arranged in the unit of work, the flow of the transaction Can be defined. That is, a transaction can be controlled from a caller (a WEB server in this embodiment) by using a facade value. Hereinafter, one specific example will be described.

例えば、呼出し元が、コマンド(ビーンフロー)A、B及びCを実行させたいとする。但し、コマンドAとコマンドCの実行は、呼出し元から独立したトランザクションとして実行させ、コマンドBの実行は、呼出し側のトランザクションに参加させたいとする。   For example, assume that the caller wants to execute commands (bean flow) A, B, and C. However, it is assumed that the execution of the command A and the command C is executed as a transaction independent from the caller, and the execution of the command B is desired to participate in the caller transaction.

トランザクションの分離は、トランザクションを分離するためのオブジェクトであるユニットオブワークを利用することで行う。すなわち、上記例のようなトランザクションコントロールを行うためには、図4Aに示すように、ファサードバリュー46におけるオブジェクト群の先頭に、コマンドAを実行するためのコマンドオブジェクトAを内包した第一のユニットオブワーク10Aを記述し、その第一のユニットオブワーク10Aの次に、ユニットオブワークに内包させずにコマンドBを実行するためのコマンドオブジェクトBを記述し、そのコマンドオブジェクトBの次に、コマンドCを実行するためのコマンドオブジェクトCを内包した第二のユニットオブワーク10Bを記述する必要がある。   Transaction separation is performed by using a unit of work which is an object for separating transactions. That is, in order to perform the transaction control as in the above example, as shown in FIG. 4A, the first unit object including the command object A for executing the command A at the head of the object group in the facade value 46 is used. A work 10A is described, a command object B for executing the command B without being included in the unit of work is described next to the first unit of work 10A, and a command C is described next to the command object B. It is necessary to describe the second unit of work 10B including the command object C for executing the above.

図4Aに示したファサードバリュー46が外部アプリケーション(以下、外部AP)45からEJBサーバ7に送信されたならば、EJBサーバ7では、図4Bに示す流れで処理が行われる。   If the facade value 46 shown in FIG. 4A is transmitted from the external application (hereinafter referred to as an external AP) 45 to the EJB server 7, the EJB server 7 performs processing in the flow shown in FIG. 4B.

図4Bは、図4Aに示したファサードバリュー46の処理流れを示す。   FIG. 4B shows a processing flow of the facade value 46 shown in FIG. 4A.

外部AP45からファサード層EJB51が呼び出されてファサードバリュー46が送信された場合(図3及び図4BのS4)、ファサード層EJB51がそのファサードバリュー46を受信して、そのファサードバリュー46の記述に従う処理が行われる(図3のS5)。   When the facade layer EJB 51 is called from the external AP 45 and the facade value 46 is transmitted (S4 in FIGS. 3 and 4B), the facade layer EJB 51 receives the facade value 46, and processing according to the description of the facade value 46 is performed. This is performed (S5 in FIG. 3).

具体的には、ファサード層EJB51は、受信したファサードバリュー46を解析する。それにより、第一のユニットオブワーク10A、コマンドオブジェクトB及び第二のユニットオブワーク10Bの順でフローが構成されていることが検出される。   Specifically, the facade layer EJB 51 analyzes the received facade value 46. Thereby, it is detected that the flow is configured in the order of the first unit of work 10A, the command object B, and the second unit of work 10B.

第一のユニットオブワーク10Aが検出された場合、ファサード層EJB51は、トランザクション分離層EJB53を呼出し、その第一のユニットオブワーク10Aの処理を、トランザクション分離層EJB53に依頼する(S5A)。   When the first unit of work 10A is detected, the facade layer EJB 51 calls the transaction separation layer EJB 53, and requests the transaction separation layer EJB 53 to process the first unit of work 10A (S5A).

呼び出されたトランザクション分離層EJB53は、ファサード層EJB51からの依頼に従って、第一のユニットオブワーク10Aの処理を行う。具体的には、例えば、トランザクション分離層EJB53は、第一のユニットオブワーク10Aを解析する。第一のユニットオブワーク10Aには、コマンドオブジェクトAが含まれているので、そのコマンドオブジェクトAが検出される。コマンドオブジェクトAが検出された場合、トランザクション分離層EJB53は、ビーンフロー実行層EJB55を呼出し、そのコマンドオブジェクトAの処理をビーンフロー実行層EJB55に依頼する(S5B)。   The called transaction separation layer EJB 53 performs processing of the first unit of work 10A in accordance with a request from the facade layer EJB 51. Specifically, for example, the transaction separation layer EJB 53 analyzes the first unit of work 10A. Since the first unit of work 10A includes the command object A, the command object A is detected. When the command object A is detected, the transaction separation layer EJB 53 calls the bean flow execution layer EJB 55 and requests the bean flow execution layer EJB 55 to process the command object A (S5B).

呼び出されたビーンフロー実行層EJB55は、トランザクション分離層EJB53からの依頼に従って、コマンドオブジェクトAから特定されるコマンド(ビーンフロー)の処理を実行し(S5C)、応答(例えば処理結果)を、呼び出し元であるトランザクション分離層EJB53に返す(S5D)。   The called bean flow execution layer EJB 55 executes processing of a command (bean flow) specified from the command object A in accordance with a request from the transaction separation layer EJB 53 (S5C), and sends a response (for example, processing result) to the caller. Is returned to the transaction separation layer EJB 53 (S5D).

トランザクション分離層EJB53は、呼び出し先のビーンフロー実行層EJB55から応答を受けた場合、S5Bで処理依頼したコマンドオブジェクトAについてコミットする(S5E−1〜S5E−3)。   When receiving a response from the callee bean flow execution layer EJB 55, the transaction separation layer EJB 53 commits the command object A requested for processing in S5B (S5E-1 to S5E-3).

具体的には、トランザクション分離層EJB53は、呼び出し先のビーンフロー実行層EJB55から応答を受け、コミットの準備ができた場合、その旨を、自分の呼び出し元であるファサード層EJB51に通知する(S5E−1)。ファサード層EJB51は、コミットの準備ができた旨の通知を受けた場合、トランザクション分離層EJB53に所定の指令(例えば、コミットの実行指令)を送る(S5E−2)。トランザクション分離層EJB53は、ファサード層EJB51から所定の指令を受けたときに、コマンドオブジェクトAについてコミットする。そして、トランザクション分離層EJB53は、コミットが完了した旨の通知を、ファサード層EJB51に送る(S5E−3)。これにより、ファサード層EJB51は、コマンドオブジェクトAについての処理から抜けることができる。   Specifically, when the transaction separation layer EJB 53 receives a response from the callee bean flow execution layer EJB 55 and is ready to commit, it notifies the call facade layer EJB 51 (S5E). -1). When the facade layer EJB 51 receives a notification that the commit is ready, the facade layer EJB 51 sends a predetermined command (for example, commit execution command) to the transaction separation layer EJB 53 (S5E-2). The transaction separation layer EJB 53 commits the command object A when receiving a predetermined command from the facade layer EJB 51. Then, the transaction separation layer EJB 53 sends a notification that the commit has been completed to the facade layer EJB 51 (S5E-3). As a result, the facade layer EJB 51 can escape from the process for the command object A.

このように、ユニットオブワークがファサード層EJB51で検出された場合、ファサード層EJB51に依頼されたトランザクションの処理(つまり、そのユニットオブワークが表すトランザクションの処理)が、ファサード層EJB51からトランザクション分離層EJB53に新たに依頼される。そして、その新たな依頼先は、「Requires New」という属性を持つEJBであり、その「Requires New」のEJB53から、そのユニットオブワーク内のコマンドオブジェクトの処理依頼が、「Required」という属性を持ったビーンフロー実行層EJB55に発行される。このため、ファサード層EJB51は、「Required」という属性であるが、ユニットオブワークが表すトランザクションの処理では、呼出し元である外部AP45のトランザクションに参加しなくて済む。つまり、トランザクションが分離される。   As described above, when the unit of work is detected in the facade layer EJB 51, the transaction processing requested by the facade layer EJB 51 (that is, the transaction processing indicated by the unit of work) is changed from the facade layer EJB 51 to the transaction separation layer EJB 53. Newly requested. The new request destination is an EJB having the attribute “Requires New”, and the processing request of the command object in the unit of work from the EJB 53 of “Requires New” has the attribute “Required”. Issued to the bean flow execution layer EJB55. For this reason, the facade layer EJB 51 has the attribute “Required”. However, in the transaction processing represented by the unit of work, it is not necessary to participate in the transaction of the caller external AP 45. That is, transactions are separated.

次に、第一のユニットオブワーク10Aの次に記述されているコマンドオブジェクトBの処理が行われる。すなわち、ファサード層EJB51が、ビーンフロー実行層EJB55を呼出し、コマンドオブジェクトBの処理をビーンフロー実行層EJB55に依頼する(S5F)。呼び出されたビーンフロー実行層EJB55は、その依頼に従って、コマンドオブジェクトBを処理し(S5G)、応答(例えば処理結果)を、呼出し元であるファサード層EJB51に返す(S5H)。   Next, the command object B described next to the first unit of work 10A is processed. That is, the facade layer EJB 51 calls the bean flow execution layer EJB 55 and requests the bean flow execution layer EJB 55 to process the command object B (S5F). In response to the request, the called bean flow execution layer EJB 55 processes the command object B (S5G), and returns a response (for example, a processing result) to the facade layer EJB 51 that is the call source (S5H).

次に、コマンドオブジェクトBの処理が成功したか否かに関わらず、コマンドオブジェクトBの次に記述されているオブジェクトについての処理が行われる。つまり、ここでは、第二のユニットオブワーク10Bの処理が行われる。第二のユニットオブワーク10Bについての処理流れは、前述した第一のユニットオブワーク10Aについての処理流れS5A〜S5E−3と同様である(S5I〜S5M−3)。   Next, regardless of whether the processing of the command object B is successful, the processing for the object described next to the command object B is performed. That is, here, the processing of the second unit of work 10B is performed. The processing flow for the second unit of work 10B is the same as the processing flow S5A to S5E-3 for the first unit of work 10A described above (S5I to S5M-3).

ファサード層EJB51は、コマンドオブジェクトBのコミットの準備ができたならば、S5M−3の後(若しくは、S5H以降のファサード層EJB51の任意のタイミングで)、外部AP45に対して、その旨を通知する(S5N−1)。外部AP45は、コミットの準備ができた旨の通知をファサード層EJB51から受けた場合、所定の指令(例えばコミットの実行指令)をファサード層EJB51に送る(S5N−2)。ファサード層EJB51は、その指令を受けたときに、コマンドオブジェクトBについてコミットし、コミットが完了した場合に、所定の通知(例えばコミットの完了通知)を、外部AP45に送る(S5N−3)。   When the preparation of the command object B is ready, the facade layer EJB 51 notifies the external AP 45 after S5M-3 (or at any timing of the facade layer EJB 51 after S5H). (S5N-1). When the external AP 45 receives notification from the facade layer EJB 51 that it is ready to commit, the external AP 45 sends a predetermined command (for example, a commit execution command) to the facade layer EJB 51 (S5N-2). When receiving the command, the facade layer EJB 51 commits the command object B, and when the commit is completed, sends a predetermined notification (for example, a completion notification of commit) to the external AP 45 (S5N-3).

以上の流れで、図4Aに例示したファサードバリュー46が処理される。このように、トランザクションを分離することができるので、例えば、コマンドオブジェクトBの処理が失敗しロールバックが起こっても、コマンドオブジェクトAの処理までロールバックさせずに独立して処理を行わせることができる。つまり、呼び出し側のトランザクションから独立させたい処理は、ユニットオブワークで実行し、呼び出し側のトランザクションに参加させたい処理は、ユニットオブワークに包んでいないコマンドオブジェクトで実行する。   With the above flow, the facade value 46 illustrated in FIG. 4A is processed. As described above, since the transactions can be separated, for example, even if the processing of the command object B fails and the rollback occurs, the processing of the command object A can be performed independently without being rolled back. it can. That is, a process that is desired to be independent from the caller transaction is executed by the unit of work, and a process that is desired to participate in the caller transaction is executed by a command object that is not included in the unit of work.

次に、EJB51、53及び55がそれぞれ行う処理の流れについて個々に説明する。   Next, the flow of processing performed by each of the EJBs 51, 53, and 55 will be described individually.

図5Aは、ファサード層EJB51が行う処理の流れを示す。   FIG. 5A shows the flow of processing performed by the facade layer EJB51.

ファサード層EJB51は、ファサードバリューを受信した場合(S11でYES)、そのファサードバリューを解析する(S12)。それにより、オブジェクトの実行順序がわかる。   When receiving the facade value (YES in S11), the facade layer EJB 51 analyzes the facade value (S12). Thereby, the execution order of the objects is known.

今回処理すべきオブジェクトがユニットオブワークであれば(S13でYES)、ファサード層EJB51は、トランザクション分離層EJB53を呼び出し、そのユニットオブワークの処理をトランザクション分離層EJB53に依頼する(S14)。ファサード層EJB51は、その依頼に対する応答を受けた場合(S15でYES)、特定の処理を行う(例えば上記S5E−2を行う)(S15A)。S11で受けたファサードバリュー内の全てのオブジェクトが処理されたならば(S17でYES)、ファサード層EJB51は、ファサードバリューの受信待ちとなり、そうではなく未処理のオブジェクトが残っていれば(S17でNO)、S13に戻る。   If the object to be processed this time is a unit of work (YES in S13), the facade layer EJB 51 calls the transaction separation layer EJB 53 and requests the transaction separation layer EJB 53 to process the unit of work (S14). When the facade layer EJB 51 receives a response to the request (YES in S15), the facade layer EJB 51 performs specific processing (for example, performs the above S5E-2) (S15A). If all the objects in the facade value received in S11 have been processed (YES in S17), the facade layer EJB 51 waits for reception of the facade value, but if there is an unprocessed object remaining (in S17) NO), it returns to S13.

今回処理すべきオブジェクトがコマンドオブジェクトであれば(S13でNO)、ファサード層EJB51は、ビーンフロー実行層EJB55を呼び出し、そのコマンドオブジェクトの処理をビーンフロー実行層EJB55に依頼する(S16)。その後、特定の処理が行われた後(例えば、上記のS5H及びS5N−1〜S5N−3の処理が行われた後)(S16A)、S17の処理が行われる。   If the object to be processed this time is a command object (NO in S13), the facade layer EJB 51 calls the bean flow execution layer EJB 55 and requests the bean flow execution layer EJB 55 to process the command object (S16). Thereafter, after a specific process is performed (for example, after the processes of S5H and S5N-1 to S5N-3 are performed) (S16A), the process of S17 is performed.

図5Bは、トランザクション分離層EJB53が行う処理の流れを示す。   FIG. 5B shows the flow of processing performed by the transaction separation layer EJB 53.

トランザクション分離層EJB53は、呼び出された場合(S20でYES)、処理依頼されたユニットオブワークを解析する(S21)。   When the transaction separation layer EJB 53 is called (YES in S20), it analyzes the unit of work requested to be processed (S21).

S21の解析の結果、コマンドオブジェクトが検出されたならば(S22でNO)、トランザクション分離層EJB53は、ビーンフロー実行層EJB55を呼び出し、そのコマンドオブジェクトの処理をビーンフロー実行層EJB55に依頼する(S24)。その後、応答を受けたならば(S25でYES)、トランザクション分離層EJB53は、特定の処理を行う(例えば、上記S5E−1〜S5E−3の処理を行う)(S26)。   If a command object is detected as a result of the analysis in S21 (NO in S22), the transaction separation layer EJB 53 calls the bean flow execution layer EJB 55 and requests the bean flow execution layer EJB 55 to process the command object (S24). ). Thereafter, if a response is received (YES in S25), the transaction separation layer EJB 53 performs a specific process (for example, performs the processes of S5E-1 to S5E-3) (S26).

S21の解析の結果、ユニットオブワークが検出されたならば(S22でYES)、トランザクション分離層EJB53は、自分を呼び出し(S23)、S21に戻る。つまり、ユニットオブワーク内にユニットオブワークが検出された場合には、再帰的に処理が行われる。   If the unit of work is detected as a result of the analysis in S21 (YES in S22), the transaction separation layer EJB 53 calls itself (S23) and returns to S21. That is, when a unit of work is detected in the unit of work, processing is performed recursively.

図5Cは、ビーンフロー実行層EJB55が行う処理の流れを示す。   FIG. 5C shows the flow of processing performed by the bean flow execution layer EJB55.

ビーンフロー実行層EJB55は、呼び出された場合(S31でYES)、処理依頼されたコマンドオブジェクトの処理を行い(S22)、応答(例えば処理結果)を、自分の呼び出し元(ファサード層EJB51又はトランザクション分離層EJB53)に返す(S33)。なお、S22の処理で例外(例えばエラー)が発生した場合には、ビーンフロー実行層EJB55は、ファサードバリューの送信元であるWEBサーバに、応答(例えば例外オブジェクト)を返すことができる。   When the bean flow execution layer EJB 55 is called (YES in S31), it processes the requested command object (S22), and sends a response (for example, a processing result) to its caller (facade layer EJB 51 or transaction separation). Return to the layer EJB53) (S33). When an exception (for example, an error) occurs in the process of S22, the bean flow execution layer EJB 55 can return a response (for example, an exception object) to the WEB server that is the transmission source of the facade value.

以上の説明によれば、ユニットオブワーク内に何を記述するかや、コマンドオブジェクトやユニットオブワークの配列をどうするかによって、ファサードバリュー上で、トランザクションのフローを定義することができる。EJBサーバ7には、そのファサードバリューを受けて解析するファサード層EJB51と、ユニットオブワークを処理するトランザクション分離層EJB53と、コマンドオブジェクトを処理するビーンフロー実行層EJB55とが備えられる。ファサード層EJB51及びビーンフロー実行層EJB55の属性は「Required」であり、トランザクション分離層EJB53の属性は「Requires New」である。ユニットオブワークに包まれていないコマンドオブジェクトの処理の依頼は、ファサード層EJB51からトランザクション分離層EJB53を介することなくビーンフロー実行層EJB55にされるが、ユニットオブワークに包まれたコマンドオブジェクトの処理の依頼は、ファサード層EJB51からトランザクション分離層EJB53を介してビーンフロー実行層EJB55にされる。以上のことにより、EJBをたくさんつくらなくても、呼び出し側でのファサードバリューの構成の仕方で、複雑なEJBの規約に関係無く、呼び出し側からEJBサーバ7に対してトランザクションのフローをコントロールすることができる。例えば、図6Aに例示するようなファサードバリューを作成してEJBサーバ7に与えれば、図6Bに例示するようなトランザクションフローを実行させることができる(図6Bにおける点線は、トランザクション境界を示す)。   According to the above description, it is possible to define a transaction flow on the facade value depending on what is described in the unit of work and how the command object and unit of work are arranged. The EJB server 7 is provided with a facade layer EJB 51 that receives and analyzes the facade value, a transaction separation layer EJB 53 that processes a unit of work, and a bean flow execution layer EJB 55 that processes a command object. The attribute of the facade layer EJB 51 and the bean flow execution layer EJB 55 is “Required”, and the attribute of the transaction separation layer EJB 53 is “Requires New”. A request for processing a command object not wrapped in a unit of work is sent from the facade layer EJB 51 to the bean flow execution layer EJB 55 without going through the transaction separation layer EJB 53, but the processing of the command object wrapped in the unit of work. The request is made from the facade layer EJB 51 to the bean flow execution layer EJB 55 via the transaction separation layer EJB 53. As described above, even if a lot of EJBs are not created, the caller controls the flow of transactions to the EJB server 7 regardless of the complicated EJB rules, by configuring the facade value on the call side. Can do. For example, if a facade value as illustrated in FIG. 6A is created and given to the EJB server 7, a transaction flow as illustrated in FIG. 6B can be executed (a dotted line in FIG. 6B indicates a transaction boundary).

なお、上記の説明では、ファサード層EJB51が、ファサードバリューの送信の際に呼び出されるが、それに代えて、例えば、ファサードバリューを蓄積するためのキューをEJBサーバ7に設け、EJBサーバ7で受信されたファサードバリューはそのキューに蓄積され、ファサード層EJB51が、順次、そのキューからファサードバリューを読み出して処理することもできる。すなわち、ステートレスな処理において、同期・非同期を気にしなくて済む。   In the above description, the facade layer EJB 51 is called when the facade value is transmitted. Instead, for example, a queue for storing the facade value is provided in the EJB server 7 and received by the EJB server 7. The facade value is accumulated in the queue, and the facade layer EJB 51 can sequentially read the facade value from the queue and process it. That is, there is no need to worry about synchronization / asynchronization in stateless processing.

さて、以下、上述したビーンフロー実行層EJB55が行うことのできる処理について詳細に説明する。   Now, processing that can be performed by the above-described bean flow execution layer EJB 55 will be described in detail.

図7Aは、ビーンフロー実行層EJB55が行うことのできる一つの処理の流れを示す。   FIG. 7A shows the flow of one process that can be performed by the bean flow execution layer EJB55.

この図7Aに示すように、ビーンフロー実行層EJB55は、ビーンフロー定義ファイル記憶域57に記憶されている一以上のビーンフロー定義ファイルの中から一つのビーンフロー定義ファイル81を選択し、選択したビーンフロー定義ファイル81を読み出す(S41)。そして、ビーンフロー実行層EJB55は、読み出したビーンフロー定義ファイル81を解釈し、その解釈の結果に基づいて、ビーンフロー83を作成し、作成したビーンフロー83を、ビーンフロー記憶域59に格納する(S42)。   As shown in FIG. 7A, the bean flow execution layer EJB 55 selects one bean flow definition file 81 from one or more bean flow definition files stored in the bean flow definition file storage area 57, and selects the selected one. The bean flow definition file 81 is read (S41). The bean flow execution layer EJB 55 interprets the read bean flow definition file 81, creates a bean flow 83 based on the interpretation result, and stores the created bean flow 83 in the bean flow storage area 59. (S42).

これにより、一又は複数のビーンフローがビーンフロー記憶域59に記憶される。   As a result, one or more bean flows are stored in the bean flow storage area 59.

図7Bは、ビーンフロー定義ファイル81の構成の概要を示す。   FIG. 7B shows an outline of the configuration of the bean flow definition file 81.

ビーンフロー定義ファイル81は、所定の形式のファイル、例えば、XML(eXtensible Markup Language)形式のファイルである。ビーンフロー定義ファイル81は、例えば、コマンドオブジェクトと一対一で用意される。ビーンフロー定義ファイル81には、ビーンフローの定義が記述されている。ビーンフロー定義ファイル81には、一又は複数のビーンフローを定義することができる。つまり、一つのコマンドオブジェクトで、一つのビーンフローだけでなく、複数のビーンフローを実行させるようにすることができる。   The bean flow definition file 81 is a file in a predetermined format, for example, an XML (eXtensible Markup Language) format file. The bean flow definition file 81 is prepared, for example, one-to-one with a command object. The bean flow definition file 81 describes the definition of the bean flow. In the bean flow definition file 81, one or a plurality of bean flows can be defined. That is, it is possible to execute not only one bean flow but also a plurality of bean flows with one command object.

一つのビーンフローの定義90の中には、例えば、ビーンフローの名称である「フロー名」、ビーンフローの偽の名前である「エイリアス名」、ビーンフローの実行の際に確保されるべきリソースに関する「リソース情報」、及び、ビーンフローを構成するビーンの実行に関する「実行単位記述」が含まれる。   The bean flow definition 90 includes, for example, a “flow name” that is the name of the bean flow, an “alias name” that is a false name of the bean flow, and resources that are to be secured when executing the bean flow. "Resource information" and "execution unit description" related to the execution of the beans constituting the bean flow.

エイリアス名は、例えば、呼び出し側の管理者或いはEJBサーバ7の管理者が、登録することができる。エイリアス名は、一つのビーンフローに複数個登録することもできる。このため、呼び出し元は、EJBサーバ7に対してエイリアス名でビーンフローを指定すれば、異なるエイリアス名であっても同一のビーンフローを実行させることができる。   The alias name can be registered, for example, by the administrator on the call side or the administrator of the EJB server 7. Multiple alias names can be registered in one bean flow. For this reason, if the caller specifies a bean flow with an alias name for the EJB server 7, the same bean flow can be executed even with different alias names.

リソース情報には、例えば、リソースの名称である「リソース名」や、リソースを取得する際のキーとなる「リソースキー」が含まれる。また、リソース情報には、ビーンフローがリソースに対してフローコントロールを行うか否か(例えば、正常終了時にリソースに対してコミットを指示し、異常終了時にロールバックをリソースに対して指示するか否か)を表す情報や、確保されたリソースをビーンフローの終了時にクローズするか否かを表す情報等も含めることができる。   The resource information includes, for example, a “resource name” that is the name of the resource and a “resource key” that is a key for acquiring the resource. Also, in the resource information, whether or not the bean flow performs flow control on the resource (for example, whether to instruct the resource to commit at the normal end and whether to instruct the resource to roll back at the abnormal end) Or information indicating whether or not the reserved resources are closed at the end of the bean flow.

実行単位記述には、例えば、実行単位の名称である「実行単位名」や、実行するビーンの「クラス名」や、実行するビーンの「メソッド名」や、実行単位の出力オブジェクトを取得するゲッターの名称である「ゲッター名」や、実行単位の属性に関する「属性情報」が含まれる。一つのビーンフローにおいて複数の実行単位がある場合には、実行単位の実行順序に従って、それら複数の実行単位にそれぞれ対応した複数の実行単位記述が並ぶ。ここで、実行単位とは、クラス名で指定されたビーン(以下、指定ビーン)における、メソッド名で指定されたメソッド(以下、指定メソッド)のことである。また、属性情報には、例えば、指定ビーンのインスタンスを生成して指定メソッドを実行することを意味する第一の属性値と、ビーンフローへの入力オブジェクトを指定ビーンに渡して指定メソッドを実行することを意味する第二の属性値と、直前の実行単位のビーンを指定ビーンに渡して指定メソッドを実行することを意味する第三の属性値との少なくとも一つを含めることができる。   The execution unit description includes, for example, an “execution unit name” that is the name of the execution unit, a “class name” of the bean to be executed, a “method name” of the bean to be executed, and a getter that acquires an output object of the execution unit. The “getter name” that is the name of the name and “attribute information” regarding the attribute of the execution unit are included. When there are a plurality of execution units in one bean flow, a plurality of execution unit descriptions respectively corresponding to the plurality of execution units are arranged according to the execution order of the execution units. Here, the execution unit is a method (hereinafter, designated method) designated by a method name in a bean designated by a class name (hereinafter, designated bean). The attribute information includes, for example, a first attribute value that means that an instance of the specified bean is generated and the specified method is executed, and an input object to the bean flow is passed to the specified bean and the specified method is executed. At least one of the second attribute value meaning that the bean of the previous execution unit is passed to the designated bean and the designated method is executed can be included.

図8A、図8B及び図8Cは、ビーンフロー定義ファイル81における記述の具体例を示す。具体的には、図8Aは、一つのビーンフローが一つの実行単位を実行するための記述の一例である。図8Bは、一つのビーンフローが二つの実行単位を実行し、且つ、二つ目の実行単位で一つの実行単位におけるビーンから値を取得するための記述の一例である。図8Cは、一つのビーンフローが一つの実行単位を実行し、且つ、入力オブジェクトのメソッドを実行してその実行結果をそのビーンフローの出力オブジェクトとして返すための記述の一例である。   8A, 8B, and 8C show specific examples of descriptions in the bean flow definition file 81. FIG. Specifically, FIG. 8A is an example of a description for one bean flow to execute one execution unit. FIG. 8B is an example of a description for one bean flow to execute two execution units and to acquire a value from a bean in one execution unit in the second execution unit. FIG. 8C is an example of a description in which one bean flow executes one execution unit, executes an input object method, and returns the execution result as an output object of the bean flow.

ビーンフロー定義ファイル81は、XML等の構造化タグ言語で表すことができる。ビーンフロー定義ファイル81を解釈するビーンフロー実行層EJB55は、どんなタグがあるかによって、生成すべきビーンフローを決定する。   The bean flow definition file 81 can be expressed in a structured tag language such as XML. The bean flow execution layer EJB 55 that interprets the bean flow definition file 81 determines a bean flow to be generated depending on what tag is present.

以下、幾つかのタグについて説明する。   Hereinafter, some tags will be described.

タグ「flow」で設定された範囲には、一つのビーンフローの定義が表される。ここにおける「name」は、ビーンフローの名称(flow name)を表している。タグ「flow」で設定された範囲には、複数のリソース要素、エイリアス要素、ステップ要素(実行単位要素)を含む。   The range set by the tag “flow” represents one bean flow definition. Here, “name” represents the name of the bean flow (flow name). The range set by the tag “flow” includes a plurality of resource elements, alias elements, and step elements (execution unit elements).

タグ「resource」で設定された範囲には、リソース情報が表される。具体的には、リソースの取得や、リソースに対するコミット或いはロールバック等のフローコントロールをビーンフローが行う(換言すれば、ビーンそれ自体がリソースの取得やフローコントロールを行うことを排除する)ために、このリソース情報を使用して、リソースの取得とフローコントロールがビーンフローによって行われる。ここのタグで設定された範囲における「name」は、リソースの名前(resource name)を表し、「key」は、リソースを取得する際のキーを表す。「trancontrol」及び「tranclose」は、リソースに対して何を行うかをビーンフローに設定するための情報である。「trancontrol」は、属性値「true」の場合、ビーンフローがリソースに対してフローコントロールを行うことを意味する(すなわち、ビーンフローの全ての実行単位が正常に終了した場合、リソースに対してコミットを指示し、ビーンフローの実行中に例外が発生したならば、リソースに対してロールバックを指示することを意味する)。また、「trancontrol」は、属性値「false」の場合、ビーンフローがリソースに対してフローコントロールは行わないようにすることを意味する。「tranclose」は、属性値「true」の場合、ビーンフローの終了時に、ビーンフローがリソースに対してクローズを実行することを意味する。「tranclose」は、属性値「false」の場合、ビーンフローはリソースに対してクローズは実行しない。なお、「trancontrol」及び「tranclose」のうちの少なくとも一方は属性値の記述が省略可能であり、省略されている場合には、一方の属性値(例えばtrue)が設定されているものとして扱われる。   Resource information is represented in the range set by the tag “resource”. Specifically, in order to perform flow control such as resource acquisition, resource commit or rollback (in other words, the bean itself excludes resource acquisition and flow control), Using this resource information, resource acquisition and flow control are performed by bean flow. “Name” in the range set by the tag here represents the name of the resource (resource name), and “key” represents the key for acquiring the resource. “Trancontrol” and “tranclose” are information for setting in the bean flow what to do with the resource. "Trancontrol" means that if the attribute value is "true", the bean flow performs flow control on the resource (that is, if all the execution units of the bean flow are completed normally, commit to the resource) This means that if an exception occurs during the execution of the bean flow, the resource is instructed to roll back). “Trancontrol” means that when the attribute value is “false”, the bean flow does not perform flow control on the resource. “Tranclose”, when the attribute value is “true”, means that when the bean flow ends, the bean flow executes close on the resource. When “tranclose” has an attribute value “false”, the bean flow does not perform closing on the resource. Note that at least one of "trancontrol" and "tranclose" can be omitted, and if omitted, one attribute value (for example, true) is treated as being set. .

タグ「alias」で設定された範囲には、エイリアス名(alias name)が設定される。   An alias name (alias name) is set in the range set by the tag “alias”.

タグ「step」で設定された範囲には、任意のビーンの任意のメソッドを1つのビーンフロー中に関連付けて動作させることを定義することができる。また、ビーンフロー中の各実行単位(ステップ)は、名前を有し、他の実行単位(又はそこでのビーン)を名前で参照することができる。ここの範囲における「name」は、実行単位の名前を表し、「class Name」は、実行単位で実行するビーンのクラス名を表し、「method Name」は、実行単位で実行するビーンのメソッドの名前を表す。また、「getter Name」は、実行単位の出力オブジェクトを取得するゲッターの名称を表す。ここで、「this」を指定された場合、実行単位で実行したビーンそのものが出力オブジェクトとなることを意味する。また、「type」は、実行単位でのメソッドの実行に関する属性を表す。具体的には、例えば、属性値「new」の場合、「className」で指定されたビーンのインスタンスを生成し、「methodName」で指定されたメソッドを実行することを意味する。また、例えば、属性値「input」の場合、ビーンフローへの入力オブジェクトを「className」で指定されたビーンに渡し「methodName」で指定されたメソッドがその入力オブジェクトを用いて処理を実行することを意味する。また、例えば、属性値「step」の場合、直前の実行単位の出力値を「className」で指定されたビーンに渡し、「methodName」で指定されたメソッドがその出力値を用いて処理を実行することを意味する。   In the range set by the tag “step”, it is possible to define that any method of any bean is operated in association with one bean flow. Each execution unit (step) in the bean flow has a name, and other execution units (or beans therein) can be referred to by name. In this range, “name” represents the name of the execution unit, “class Name” represents the class name of the bean that is executed in the execution unit, and “method Name” is the name of the method of the bean that is executed in the execution unit. Represents. “Getter Name” represents the name of the getter that acquires the output object of the execution unit. Here, when “this” is specified, it means that the bean itself executed in the execution unit becomes the output object. “Type” represents an attribute related to the execution of a method in an execution unit. Specifically, for example, when the attribute value is “new”, it means that an instance of the bean specified by “className” is generated and the method specified by “methodName” is executed. Also, for example, in the case of the attribute value “input”, the input object to the bean flow is passed to the bean specified by “className”, and the method specified by “methodName” executes processing using the input object. means. Also, for example, in the case of the attribute value “step”, the output value of the previous execution unit is passed to the bean specified by “className”, and the method specified by “methodName” executes processing using the output value. Means that.

以上のようなタグや属性値をビーンフロー定義ファイルでどのように設定するかによって、例えば、後述する図11A〜図11Eに例示するような処理を実行できるビーンフローの作成が可能となる。   Depending on how the tags and attribute values as described above are set in the bean flow definition file, for example, it is possible to create a bean flow that can execute the processes illustrated in FIGS. 11A to 11E described later.

なお、ビーンフロー定義ファイルに複数のビーンフローが定義されている場合には、例えば、<flows>というタグが、複数のビーンフロー定義よりも前に記述される。ビーンフロー実行層EJB55は、このタグから、ビーンフローを生成するビーンフロー実行層EJB55が、ビーンフロー定義ファイル81に、一つのビーンフローが定義されているのか、或いは、複数のビーンフローが定義されているのかを判別することができる。   When a plurality of bean flows are defined in the bean flow definition file, for example, a tag <flows> is described before the plurality of bean flow definitions. From the tag, the bean flow execution layer EJB 55 generates a bean flow. The bean flow execution layer EJB 55 defines whether one bean flow is defined in the bean flow definition file 81 or a plurality of bean flows are defined. Can be determined.

ビーンフロー実行層EJB55は、以上のようなビーンフロー定義ファイルを解釈し、そのビーンフロー定義ファイル上で定義されている通りのビーンフロー83を作成する。一つのビーンフロー定義ファイルに複数のビーンフロー定義があれば、それら複数のビーンフロー定義にそれぞれ対応した複数のビーンフローが作成される。   The bean flow execution layer EJB 55 interprets the above bean flow definition file and creates a bean flow 83 as defined in the bean flow definition file. If there are a plurality of bean flow definitions in one bean flow definition file, a plurality of bean flows corresponding to the plurality of bean flow definitions are created.

図9Aは、ビーンフローの構成例を示す。   FIG. 9A shows an example of a bean flow configuration.

ビーンフロー83は、一又は複数のビーンを実行させるためのオブジェクトである。一つのビーンフロー83は、ビーンフロー定義ファイル81の一つのビーンフロー定義90に対応する。ビーンフロー83には、対応するビーンフロー定義90で表されているビーンフロー名、エイリアス名及びリソース情報が設定される。また、ビーンフロー83には、対応するビーンフロー定義90で表されている複数(例えば3つ)の実行単位記述にそれぞれ対応した複数(例えば3つ)の実行単位設定86A、86B及び86Cがセットされる。複数の実行単位設定86A、86B及び86Cは、実行単位の実行順序に従って並べられる。各実行単位設定86A、86B、86Cには、その実行単位設定に対応した実行単位記述で表されている種々の設定要素(例えば、実行単位名、クラス名、メソッド名、属性情報)がセットされる。   The bean flow 83 is an object for executing one or a plurality of beans. One bean flow 83 corresponds to one bean flow definition 90 in the bean flow definition file 81. In the bean flow 83, the bean flow name, the alias name, and the resource information represented by the corresponding bean flow definition 90 are set. In the bean flow 83, a plurality (for example, three) of execution unit settings 86A, 86B, and 86C respectively corresponding to the plurality of (for example, three) execution unit descriptions represented by the corresponding bean flow definition 90 are set. Is done. The plurality of execution unit settings 86A, 86B, and 86C are arranged according to the execution order of the execution units. In each execution unit setting 86A, 86B, 86C, various setting elements (for example, execution unit name, class name, method name, attribute information) represented by the execution unit description corresponding to the execution unit setting are set. The

ビーンフロー実行層EJB55は、コマンドオブジェクトの処理依頼を受けた場合、そのコマンドオブジェクトに対応するビーンフロー83がどれであるかを特定し、特定されたビーンフロー83を実行することができる。   When receiving the command object processing request, the bean flow execution layer EJB 55 can identify which bean flow 83 corresponds to the command object and execute the specified bean flow 83.

図9Bは、コマンドオブジェクトの処理依頼を受けた場合にビーンフロー実行層EJB55が行う処理の流れを示す。   FIG. 9B shows the flow of processing performed by the bean flow execution layer EJB 55 when a processing request for a command object is received.

ビーンフロー実行層EJB55は、コマンドオブジェクトの処理依頼を受けた場合、そのコマンドオブジェクト内のビーンフローキーを参照する(S50)。ビーンフローキーは、ビーンフロー名を表すキーであってもよいし、エイリアス名を表すキーであってもよい。ビーンフロー実行層EJB55は、参照したビーンフローキーがビーンフロー名とエイリアス名とのどちらを表しているかを、例えば、ビーンフローキーに所定のコードが含まれているか否かにより、判別することができる。この場合、例えば、ファサードバリューを作成する呼び出し元側で、コマンドオブジェクトを記述する際に、ビーンフローキーに所定のコードを含めるか否かにより、ビーンフロー名として特定させるか或いはエイリアス名として特定させるかをコントロールすることができる。   When receiving the command object processing request, the bean flow execution layer EJB 55 refers to the bean flow key in the command object (S50). The bean flow key may be a key representing a bean flow name or a key representing an alias name. The bean flow execution layer EJB 55 can determine whether the referenced bean flow key represents a bean flow name or an alias name, for example, depending on whether a predetermined code is included in the bean flow key. it can. In this case, for example, when a command object is described on the caller side that creates a facade value, it is specified as a bean flow name or an alias name depending on whether or not a predetermined code is included in the bean flow key. Can be controlled.

ビーンフロー実行層EJB55は、参照したビーンフローキーに対応するビーンフロー及びインターセプタの検索を行う(S51)。具体的には、例えば、ビーンフロー実行層EJB55は、参照したビーンフローキーがビーンフロー名を表しているのか、或いは、エイリアス名を表しているのかを判別する。ビーンフロー名を表していると判別された場合、ビーンフロー実行層EJB55は、ビーンフローキーに適合するビーンフロー名を有するビーンフロー83をビーンフロー記憶域59から検索し、且つ、ビーンフローキーとインターセプタ定義ファイル80との比較を行い、その比較により特定されたインターセプタ95をプログラムモジュール記憶域61から取得する。一方、エイリアス名を表していると判別された場合、ビーンフロー実行層EJB55は、ビーンフローキーに適合するエイリアス名を有するビーンフロー83をビーンフロー記憶域59から検索し、且つ、ビーンフローキーとインターセプタ定義ファイル80との比較を行い、その比較により特定されたインターセプタ95をプログラムモジュール記憶域61から取得する。   The bean flow execution layer EJB 55 searches for a bean flow and an interceptor corresponding to the referenced bean flow key (S51). Specifically, for example, the bean flow execution layer EJB 55 determines whether the referenced bean flow key represents a bean flow name or an alias name. If it is determined that it represents the bean flow name, the bean flow execution layer EJB 55 retrieves the bean flow 83 having the bean flow name that matches the bean flow key from the bean flow storage area 59, and A comparison with the interceptor definition file 80 is performed, and the interceptor 95 specified by the comparison is acquired from the program module storage area 61. On the other hand, when it is determined that the name represents an alias name, the bean flow execution layer EJB 55 searches the bean flow 83 having an alias name that matches the bean flow key from the bean flow storage area 59, and A comparison with the interceptor definition file 80 is performed, and the interceptor 95 specified by the comparison is acquired from the program module storage area 61.

ビーンフロー実行層EJB55は、S51で検索されたビーンフロー83及びインターセプタ95を実行する(S52)。ここでは、例えば、S51で複数のビーンフロー83が検索ヒットした場合(具体的には、ビーンフロー定義ファイル81に複数のビーンフロー定義90があったことにより複数のビーンフロー83が取得された場合)、ビーンフロー実行層EJB55は、それら複数のビーンフロー83を、ビーンフロー定義ファイル81で定義されている順番で実行することができる。どんな順番で実行するかは、例えば、ビーンフロー定義ファイル81を参照することで特定されてもよいし、ビーンフロー83に実行順序が書き込まれていれば、その実行順序から特定されてもよい。ビーンフロー83の実行では、そのビーンフロー83に設定された情報に基づいて、プログラムモジュール61からビーン85が検索され、そのビーン85のインスタンス化や、インスタンス化されたビーン85の実行等が行われる。   The bean flow execution layer EJB 55 executes the bean flow 83 and the interceptor 95 searched in S51 (S52). Here, for example, when a plurality of bean flows 83 are hit in S51 (specifically, when a plurality of bean flows 83 are acquired because there are a plurality of bean flow definitions 90 in the bean flow definition file 81). The bean flow execution layer EJB 55 can execute the plurality of bean flows 83 in the order defined in the bean flow definition file 81. The order of execution may be specified, for example, by referring to the bean flow definition file 81, or may be specified from the execution order if the execution order is written in the bean flow 83. In the execution of the bean flow 83, the bean 85 is retrieved from the program module 61 based on the information set in the bean flow 83, and instantiation of the bean 85, execution of the instantiated bean 85, and the like are performed. .

ビーンフロー実行層EJB55は、例えば、図10Aに例示する方法により、外部AP45に対してビーンフローの参照を提供することができる。   The bean flow execution layer EJB 55 can provide a bean flow reference to the external AP 45 by, for example, the method illustrated in FIG. 10A.

すなわち、ビーンフロー実行層EJB55は、例えば、各ビーンフロー定義ファイル81を参照することにより、ビーンフロー毎に、エイリアス名とビーンフロー名との対応付けを表した名称変換マップ201を生成する。   That is, the bean flow execution layer EJB 55 generates, for example, a name conversion map 201 that indicates an association between an alias name and a bean flow name for each bean flow by referring to each bean flow definition file 81.

ビーンフロー実行層EJB55は、エイリアス名であるビーンフローキーを含んだビーンフロー取得要求を外部AP45から受け、その要求に応答して、そのビーンフローキー(エイリアス名)に対応するビーンフローの参照(つまりビーンフロー名)を取得し、取得したビーンフロー名を外部AP45に返す。   The bean flow execution layer EJB 55 receives a bean flow acquisition request including a bean flow key that is an alias name from the external AP 45, and in response to the request, references to the bean flow corresponding to the bean flow key (alias name) ( That is, the bean flow name) is acquired, and the acquired bean flow name is returned to the external AP 45.

これにより、外部AP45は、ビーンフローを、エイリアス名だけでなく、ビーンフロー名で指定することができるようになる(なお、格別図示しないが、ビーンフロー実行層EJB55と外部AP45とのやりとりは、ファサード層EJB51を介して行われる)。   As a result, the external AP 45 can specify the bean flow not only by the alias name but also by the bean flow name (note that although not specifically illustrated, the exchange between the bean flow execution layer EJB 55 and the external AP 45 is as follows. Via the facade layer EJB 51).

エイリアス名或いはビーンフロー名で或るビーンフロー83が指定された場合、そのビーンフロー83は以下のような処理を行う。   When a certain bean flow 83 is designated by an alias name or a bean flow name, the bean flow 83 performs the following processing.

図10Bは、ビーンフロー83が行う処理の流れの一例を示す。   FIG. 10B shows an example of the flow of processing performed by the bean flow 83.

(1)ビーンフロー83がビーンフロー実行層EJB55から実行指示を受ける。具体的には、例えば、ビーンフロー83で特定されているメソッドが、コマンドオブジェクトの処理依頼を受けたビーンフロー実行層EJB55から、そのコマンドオブジェクト内の入力オブジェクトを引数に、コールされる。   (1) The bean flow 83 receives an execution instruction from the bean flow execution layer EJB 55. Specifically, for example, the method specified in the bean flow 83 is called from the bean flow execution layer EJB 55 that has received the command object processing request, using the input object in the command object as an argument.

(2)ビーンフロー83は、リソース情報に基づいて、リソース群(例えば、メモリ領域、JMS(Java Messaging System)セッション等)92から、リソース名から特定されるリソース94を、リソースキーを用いて取得し確保する。   (2) The bean flow 83 acquires a resource 94 specified by a resource name from a resource group (for example, a memory area, a JMS (Java Messaging System) session, etc.) 92 using a resource key based on the resource information. And secure.

(3)ビーンフロー83は、ビーンフロー83の実行単位設定86A(図9A参照)に基づいて、実行単位88Aを構築する。具体的には、ビーンフロー83は、実行単位設定86A内のクラス名に適合するビーンをプログラムモジュール記憶域61から選択し、選択されたビーンをインスタンス化する(ビーンをロード可能な状態にする)。プログラムモジュール記憶域61に記憶されているビーンは、EJBの規約で作られたビーンではなく、POJOである。その記憶域61に格納されている複数のPOJOには、例えば、データベース38内の検索を行うためのPOJOや、データベース38の更新を行うためのPOJO等、データベース38の操作を行うためのPOJOが含まれている。   (3) The bean flow 83 constructs an execution unit 88A based on the execution unit setting 86A (see FIG. 9A) of the bean flow 83. Specifically, the bean flow 83 selects a bean that matches the class name in the execution unit setting 86A from the program module storage area 61, and instantiates the selected bean (makes the bean loadable). . A bean stored in the program module storage area 61 is a POJO, not a bean created according to the EJB rules. The plurality of POJOs stored in the storage area 61 include POJOs for operating the database 38 such as POJOs for searching in the database 38 and POJOs for updating the database 38. include.

(4)ビーンフロー83は、実行単位設定86A内の属性情報の全部又は一部を、インスタンス化されたビーン(POJO)に対して設定する。このような処理により、実行単位88Aが構築される。具体的には、例えば、実行単位88Aにおけるビーン(インスタンス化されたビーン)が動作可能な状態となる。   (4) The bean flow 83 sets all or part of the attribute information in the execution unit setting 86A for the instantiated bean (POJO). The execution unit 88A is constructed by such processing. Specifically, for example, the bean (instanced bean) in the execution unit 88A becomes operable.

(5)以後、ビーンフロー83で定義された処理順(換言すれば、ビーンフロー定義ファイル81で定義された処理順)で処理が行われる。ここでは、ビーン85Aにおける指定メソッドがビーンフロー83により実行される。   (5) Thereafter, processing is performed in the processing order defined in the bean flow 83 (in other words, processing order defined in the bean flow definition file 81). Here, the specified method in the bean 85 </ b> A is executed by the bean flow 83.

(6)全ての実行単位が行われた場合、或る実行単位(例えば最後の実行単位)におけるメソッドの処理結果(又は、処理を実行したビーンそれ自体)が、出力オブジェクトとして、ビーンフロー実行層EJB55に返される。   (6) When all execution units are performed, the processing result of the method (or the bean itself that executed the process itself) in a certain execution unit (for example, the last execution unit) is output as the bean flow execution layer. Returned to EJB55.

(7)ビーンフロー83の実行が正常に終了した場合、リソース情報に基づいて、ビーンフロー83が、確保されたリソース94をクローズする(つまり開放する)。また、ビーンフロー83は、例えば、例外(例えば障害)が発生した場合には、ビーンフローの正常終了でなくても、リソース94を開放する。   (7) When the execution of the bean flow 83 ends normally, the bean flow 83 closes (that is, releases) the reserved resource 94 based on the resource information. Further, the bean flow 83 releases the resource 94 even if the bean flow is not normally terminated when, for example, an exception (for example, a failure) occurs.

前述したように、ビーンフロー定義ファイル81には、複数の実行単位を登録することができる。この場合、例えば、上記(3)〜(5)の処理が、実行単位の数、繰り返される。   As described above, a plurality of execution units can be registered in the bean flow definition file 81. In this case, for example, the processes (3) to (5) are repeated for the number of execution units.

ビーンフロー定義ファイル81の記述によって、以下のことも可能である。すなわち、例えば、ビーンフロー定義ファイル81における各実行単位記述で、「第一のビーンによる第一の処理結果が第二のビーンに渡され、その第一の処理結果を受けた第二のビーンがその第一の処理結果を保持し、その第二のビーンの処理結果による第二の処理結果が処理依頼元に返される」というような定義がされていたとする。この場合は、その定義に従って、ビーンフロー83が各ビーンを実行させる。それにより、第一のビーンによる第一の処理結果が第二のビーンに渡され、その第一の処理結果を受けた第二のビーンがその第一の処理結果を保持し、その第二のビーンの処理結果による第二の処理結果が処理依頼元に返される、ということが行われる。   Depending on the description of the bean flow definition file 81, the following is also possible. That is, for example, in each execution unit description in the bean flow definition file 81, “the first processing result by the first bean is passed to the second bean and the second bean that has received the first processing result is It is assumed that a definition such as “holding the first processing result and returning the second processing result based on the processing result of the second bean to the processing request source” is made. In this case, the bean flow 83 causes each bean to be executed according to the definition. Thereby, the first processing result by the first bean is passed to the second bean, and the second bean that has received the first processing result retains the first processing result, and the second bean. The second processing result based on the bean processing result is returned to the processing request source.

以上の一連の処理では、ビーンフロー83は、ビーン85Aを実行する際、確保されたリソース94をビーン85Aの処理の際に利用させるが、リソース94に対するコントロールまではビーン85Aに行わせない。また、例えば、ビーン85Aの処理の際に例外(例えば障害)が発生した場合、そのビーン85Aは、コマンドオブジェクト内の例外オブジェクトを、処理依頼元(或いは大本の呼出し元)に送ってもよい。   In the series of processes described above, the bean flow 83 uses the reserved resource 94 when processing the bean 85A when executing the bean 85A, but does not cause the bean 85A to perform control until the resource 94 is controlled. For example, when an exception (for example, a failure) occurs during the processing of the bean 85A, the bean 85A may send the exception object in the command object to the processing request source (or the caller of the main book). .

以上が、ビーンフロー定義ファイル81に従って作成されるビーンフロー83の実行についての説明である。管理者(例えば、EJBサーバ7又はWEBサーバ5の管理者)は、ビーンフロー定義ファイル81のビーンフロー定義90内にどんな情報を設定するかにより、様々なビーンフロー83をEJBサーバ7に作成させること、換言すれば、一つのコマンドオブジェクトで様々な処理をEJBサーバ7に実行させることができる。   This completes the description of the execution of the bean flow 83 created in accordance with the bean flow definition file 81. An administrator (for example, the administrator of the EJB server 7 or the WEB server 5) causes the EJB server 7 to create various bean flows 83 depending on what information is set in the bean flow definition 90 of the bean flow definition file 81. In other words, the EJB server 7 can execute various processes with a single command object.

例えば、複数個の実行単位を一つのビーンフローで定義することができる。具体的には、例えば、図11Aに例示するように、実行単位名「step1」の実行単位におけるビーンのゲッター(ゲッター名から特定されるもの)が取得した情報と、実行単位名「step2」の実行単位におけるビーンのゲッターが取得した情報とを、実行単位名「step3」の実行単位におけるビーンにセットさせることができる。   For example, a plurality of execution units can be defined by one bean flow. Specifically, for example, as illustrated in FIG. 11A, information acquired by the bean getter (specified from the getter name) in the execution unit of the execution unit name “step1” and the execution unit name “step2” The information acquired by the bean getter in the execution unit can be set in the bean in the execution unit having the execution unit name “step3”.

また、例えば、図11Bに例示するように、実行単位88Dに、コマンドオブジェクト内の入力オブジェクト87Aを入力し、インスタンス化されたビーン85Dに、その入力オブジェクト87Aを用いて処理を実行させることもできる。   Also, for example, as illustrated in FIG. 11B, an input object 87A in the command object can be input to the execution unit 88D, and the instantiated bean 85D can execute processing using the input object 87A. .

また、例えば、図11Cに例示するように、実行単位88Eに、コマンドオブジェクト内の入力オブジェクト87Bを、ビーンとして、指定メソッドを実行させることもできる。   Further, for example, as illustrated in FIG. 11C, the execution method 88E can be caused to execute the specified method using the input object 87B in the command object as a bean.

また、例えば、図11Dに例示するように、処理を実行したビーン85Eのゲッターを使って、ビーンフローの出力オブジェクト89を取得させることもできる。   For example, as illustrated in FIG. 11D, the bean flow output object 89 can be acquired using the getter of the bean 85E that has executed the process.

また、例えば、図11Eに例示するように、処理を実行したビーン85Fの参照を、ビーンフローの戻り値として、コマンドオブジェクトの処理依頼元(又は大本の呼び出し元)に、返させることもできる。   For example, as illustrated in FIG. 11E, the reference of the bean 85 </ b> F that has executed the process can be returned as the return value of the bean flow to the command object processing requester (or the caller of the main book). .

以上、これまでに述べた実施形態の説明から、以下のようなことが言える。   The following can be said from the description of the embodiments described above.

例えば、従来は、EJBサーバによりデータベースの操作を行うためには、エンティティビーンを作成し、EJBコンテナにデプロイする必要がある。   For example, conventionally, in order to operate a database by an EJB server, it is necessary to create an entity bean and deploy it to an EJB container.

しかし、上述した実施形態によれば、3つのEJB51、53及び55により、トランザクションコントロールを行うことができるため、エンティティビーンを作成する必要はない。上記のように、所定の処理を実行するプログラムモジュールを多数個準備しておきさえすれば、後は、ビーンフロー定義ファイル81での定義次第で、ビーンフロー実行層EJB55に、それら多数のプログラムモジュールの中から一又は複数のプログラムモジュールが選択させ、選択された一又は複数のプログラムモジュールの実行順序を決定させ、決定された順序で一又は複数のプログラムモジュールが実行させられる。これにより、例えば、様々なトランザクションコントロールをEJBサーバに行わせたい場合でも、それら様々なトランザクションコントロールをそれぞれ実行させるために様々なエンティティビーンを作成する必要はなくなる。   However, according to the above-described embodiment, since the transaction control can be performed by the three EJBs 51, 53, and 55, it is not necessary to create an entity bean. As described above, as long as a large number of program modules for executing a predetermined process are prepared, depending on the definition in the bean flow definition file 81, the bean flow execution layer EJB 55 may include a large number of program modules. One or a plurality of program modules are selected from the above, the execution order of the selected one or a plurality of program modules is determined, and the one or a plurality of program modules are executed in the determined order. Thus, for example, even when it is desired to perform various transaction controls on the EJB server, it is not necessary to create various entity beans to execute the various transaction controls.

また、上述した実施形態によれば、ビーンフロー定義ファイル81の定義次第で、例えば、第一のビーンのゲッターで取得した情報を第二のビーンにセットしたり、第一のビーンフローの出力(例えば処理結果)を第二のビーンフローに入力しその出力を用いて第二のビーンフローに処理を実行させたりすることもできる。つまり、こういったことを別の言い方をするのであれば、「ステートフルなビーンをステートレスに表すことができる」と言えよう。すなわち、EJB51、53及び55は、ステートレスなビーンであるが、インスタンス化されるPOJOに入力される属性情報次第で(つまり、ビーンフロー定義ファイル81の定義次第で)、そのPOJOをステートフルなビーンとして動作させることができる。   Further, according to the embodiment described above, depending on the definition of the bean flow definition file 81, for example, the information acquired by the getter of the first bean is set in the second bean, or the output of the first bean flow ( For example, the processing result) can be input to the second bean flow, and the output can be used to cause the second bean flow to execute the processing. In other words, if you say something different, you can say that you can represent stateful beans statelessly. That is, the EJBs 51, 53, and 55 are stateless beans, but depending on the attribute information input to the instantiated POJO (that is, depending on the definition of the bean flow definition file 81), the POJO is a stateful bean. It can be operated.

さて、上述した通り、コマンドオブジェクトに含まれているビーンフローキーから一又は複数のビーンフローが特定されるが、それに加えて、ビーンフローキーに基づいて、一又は複数のインターセプタが特定される。特定された一又は複数のインターセプタによる処理は、特定された一又は複数のビーンフローの実行の前及び後の少なくとも一方で行われる。以下、それに関して詳細に説明する。   As described above, one or more bean flows are specified from the bean flow key included in the command object. In addition, one or more interceptors are specified based on the bean flow key. The processing by the identified one or more interceptors is performed at least one of before and after execution of the identified one or more bean flows. Hereinafter, this will be described in detail.

図12は、インターセプタ定義ファイル91の一例を示す。   FIG. 12 shows an example of the interceptor definition file 91.

インターセプタ定義ファイル91は、所定形式のファイル、例えば、XML形式のファイルとすることができる。インターセプタ定義ファイル91には、プログラムモジュール記憶域61に存在する全てのインターセプタ(例えばJava(登録商標)のクラス)についての定義が記述されていてもよい。また、所定の種別毎にインターセプタ定義ファイル91が用意され、各インターセプタ定義ファイル91に、その種別に応じたインターセプタ定義が記述されていてもよい。   The interceptor definition file 91 can be a file in a predetermined format, for example, an XML format file. In the interceptor definition file 91, definitions for all the interceptors (for example, Java (registered trademark) classes) existing in the program module storage area 61 may be described. Further, an interceptor definition file 91 may be prepared for each predetermined type, and an interceptor definition corresponding to the type may be described in each interceptor definition file 91.

インターセプタ定義ファイル91には、例えば、多数のインターセプタ95のうちの複数のインターセプタ95の各々について、インターセプタ名と、そのインターセプタ名を持つインターセプタが選択されるための条件(以下、インターセプタ選択条件)とが設定される。図12では、インターセプタ名は、<intercepter-name>と</intercepter-name>とのタグ間に存在する記述であり、インターセプタ選択条件は、<pattern>と</pattern>とのタグ間に存在する記述である。   In the interceptor definition file 91, for example, for each of a plurality of interceptors 95 out of a large number of interceptors 95, an interceptor name and a condition for selecting an interceptor having the interceptor name (hereinafter, interceptor selection condition) are included. Is set. In FIG. 12, the interceptor name is a description existing between the tags <intercepter-name> and </ intercepter-name>, and the interceptor selection condition exists between the tags <pattern> and </ pattern>. It is a description to do.

インターセプタ選択条件は、様々な方法で表し得るが、本実施形態では、キーワードと正規表現(ワイルドカード)との組み合わせで表すことができる。すなわち、この図12に例示するインターセプタ定義ファイル91によれば、インターセプタ名「bank#Inter-cepter-A」というインターセプタ(以下、説明の便宜上、これを「インターセプタA」と称する)は、ビーンフローキーにキーワード「bank.」が含まれてさえいれば選択される。また、インターセプタ名「bank#Inter-cepter-B」というインターセプタ(以下、説明の便宜上、これを「インターセプタB」と称する)は、ビーンフローキーにキーワード「bank.service.」が含まれてさえいれば選択される。また、インターセプタ名「bank#Inter-cepter-C」というインターセプタ(以下、説明の便宜上、これを「インターセプタC」と称する)は、ビーンフローキーにキーワード「bank.service.furikomi」が含まれてさえいれば選択される。また、インターセプタ名「bank#Inter-cepter-D」というインターセプタ(以下、説明の便宜上、これを「インターセプタD」と称する)は、ビーンフローキーにキーワード「master.」が含まれてさえいれば選択される。   The interceptor selection condition can be expressed by various methods, but in this embodiment, it can be expressed by a combination of a keyword and a regular expression (wild card). That is, according to the interceptor definition file 91 illustrated in FIG. 12, the interceptor name “bank # Inter-cepter-A” (hereinafter referred to as “interceptor A” for convenience of explanation) is the bean flow key. Is selected as long as it contains the keyword "bank." An interceptor named “bank # Inter-cepter-B” (hereinafter referred to as “interceptor B” for convenience of explanation) may include the keyword “bank.service.” In the bean flow key. Selected. In addition, an interceptor named “bank # Inter-cepter-C” (hereinafter referred to as “interceptor C” for convenience of explanation) includes the keyword “bank.service.furikomi” in the bean flow key. If it exists, it is selected. An interceptor named “bank # Inter-cepter-D” (hereinafter referred to as “interceptor D” for convenience of explanation) is selected as long as the keyword “master.” Is included in the bean flow key. Is done.

なお、例えば、ビーンフローキーが指すものをビーンフロー名とエイリアス名のどちらにするかによって、同一のビーンフローが実行されても、選択されるインターセプタを違えることができる。具体例を言えば、ビーンフロー名「bank.service.」とエイリアス名「master.」とを有したビーンフローがあった場合、ビーンフローキーが「bank.service.」であっても「master.」であっても、そのビーンフローが実行されることになるが、そのビーンフローの実行の際に選択されるインターセプタは異なる。すなわち、ビーンフローキーが「bank.service.」であった場合には、インターセプタA及びBが選択されることになるが、ビーンフローキーが「master.」であった場合には、インターセプタDが選択されることになる。   For example, even if the same bean flow is executed, the interceptor to be selected can be changed depending on whether the bean flow key indicates the bean flow name or the alias name. For example, if there is a bean flow with the bean flow name “bank.service.” And the alias name “master.”, Even if the bean flow key is “bank.service.” ”, The bean flow is executed, but the interceptor selected when the bean flow is executed is different. That is, when the bean flow key is “bank.service.”, Interceptors A and B are selected. When the bean flow key is “master.”, Interceptor D is Will be selected.

以上のようなインターセプタ定義ファイル91では、四つのインターセプタA〜Dの名称とインターセプタ選択条件とが定義されている。そのインターセプタ選択条件に従って複数のインターセプタが選択された場合、例えば、選択された複数のインターセプタがビーンフローの実行の前に実行されるのであれば、選択された複数のインターセプタは、このインターセプタ定義ファイル91での記述の順序で実行される。また、例えば、選択された複数のインターセプタがビーンフローの実行の後に実行されるのであれば、選択された複数のインターセプタは、このインターセプタ定義ファイル91での記述の順序とは逆の順序で実行される。   In the interceptor definition file 91 as described above, the names of the four interceptors A to D and the interceptor selection conditions are defined. When a plurality of interceptors are selected according to the interceptor selection condition, for example, if the selected plurality of interceptors are executed before the execution of the bean flow, the selected plurality of interceptors are the interceptor definition file 91. It is executed in the order of description. Further, for example, if the selected plurality of interceptors are executed after the execution of the bean flow, the selected plurality of interceptors are executed in the reverse order of the description order in the interceptor definition file 91. The

以下、コマンドオブジェクト内のビーンフローキーに基づいて選択されるインターセプタがA及びBである場合を例に採り、その場合に行われる処理の流れについて説明する。   Hereinafter, the case where the interceptors selected based on the bean flow key in the command object are A and B will be described as an example, and the flow of processing performed in that case will be described.

図13Aは、コマンドオブジェクト内のビーンフローキーに基づいて選択されるインターセプタがA及びBである場合に実行される処理の説明図である。図13Bは、その処理の流れを示す。   FIG. 13A is an explanatory diagram of processing executed when the interceptors selected based on the bean flow key in the command object are A and B. FIG. FIG. 13B shows the flow of the processing.

ビーンフロー実行層EJB55には、インターセプタ管理オブジェクト402と、ビーンフロー実行オブジェクト403とが含まれている。ビーンフロー実行層EJB55は、インターセプタ管理オブジェクト402により、ビーンフローキーとインターセプタ選択条件とに基づいて一以上のインターセプタを選択したり、インターセプタ定義ファイル91での記述に基づいて、上記選択された一以上のインターセプタの実行順序を特定したりすることができる。また、ビーンフロー実行層EJB55は、ビーンフローを実行させるビーンフローオブジェクト403により、ビーンフローキーに適合するビーンフローを実行させることができる。   The bean flow execution layer EJB 55 includes an interceptor management object 402 and a bean flow execution object 403. The bean flow execution layer EJB 55 selects one or more interceptors based on the bean flow key and the interceptor selection condition by the interceptor management object 402, or selects one or more selected based on the description in the interceptor definition file 91. The execution order of the interceptors can be specified. In addition, the bean flow execution layer EJB 55 can execute a bean flow suitable for the bean flow key by the bean flow object 403 for executing the bean flow.

具体的には、インターセプタ管理オブジェクト402が、インターセプタA及びBの順序で実行することが特定された場合に、まず、インターセプタAを実行させる(S60)。それにより、インターセプタAが、所定の前処理(ビーンフローの実行前に実行すべき所定の処理)を実行し(S61)、その前処理が終わったならば、インターセプタ管理オブジェクト402を呼び出す。次に、インターセプタ管理オブジェクト402が、インターセプタBを実行させる(S62)。それにより、インターセプタBが、所定の前処理を実行し(S63)、その前処理が終わったならば、インターセプタ管理オブジェクト402を呼び出す。最後のインターセプタBから呼び出されたならば、インターセプタ管理オブジェクト402が、ビーンフロー実行オブジェクト403を呼び出す(S64)。呼び出されたビーンフロー実行オブジェクト403は、ビーンフローキーに適合するビーンフローを実行させる。   Specifically, when the interceptor management object 402 is specified to be executed in the order of interceptors A and B, first, the interceptor A is executed (S60). Thereby, the interceptor A executes predetermined preprocessing (predetermined processing to be executed before execution of the bean flow) (S61), and when the preprocessing is completed, the interceptor management object 402 is called. Next, the interceptor management object 402 executes the interceptor B (S62). Thereby, the interceptor B executes predetermined preprocessing (S63), and when the preprocessing is completed, the interceptor management object 402 is called. If called from the last interceptor B, the interceptor management object 402 calls the bean flow execution object 403 (S64). The called bean flow execution object 403 causes a bean flow matching the bean flow key to be executed.

その後、ビーンフローの実行終了が検出されたならば(例えば、ビーンフロー実行オブジェクト403がビーンフローから所定の出力を受けたならば)、ビーンフロー実行オブジェクト403がインターセプタ管理オブジェクト402を呼び出す。呼び出されたインターセプタ管理オブジェクト402は、上記特定された実行順序(前処理の実行順序)とは逆の順序でインターセプタを実行させる。すなわち、インターセプタ管理オブジェクト402は、インターセプタBを実行させる(S66)。インターセプタBにより所定の後処理(ビーンフローの実行後に実行すべき所定の処理)が実行された後(S67)、インターセプタBから呼び出されたならば、インターセプタ管理オブジェクト402は、インターセプタAを実行させる(S68)。インターセプタAにより所定の後処理が行われた後(S69)、インターセプタAから呼び出されたならば、インターセプタ管理オブジェクト402は、情報(例えば、上記選択された一以上のインターセプタの実行結果)を出力する(S70)。   Thereafter, if the end of execution of the bean flow is detected (for example, if the bean flow execution object 403 receives a predetermined output from the bean flow), the bean flow execution object 403 calls the interceptor management object 402. The invoked interceptor management object 402 causes the interceptors to be executed in the reverse order to the specified execution order (preprocessing execution order). That is, the interceptor management object 402 executes the interceptor B (S66). After predetermined post-processing (predetermined processing to be executed after execution of the bean flow) is executed by the interceptor B (S67), if called from the interceptor B, the interceptor management object 402 causes the interceptor A to be executed ( S68). After a predetermined post-process is performed by the interceptor A (S69), if called from the interceptor A, the interceptor management object 402 outputs information (for example, the execution result of the selected one or more interceptors). (S70).

以上の説明によれば、インターセプタ定義ファイル91に設定するキーワードと正規表現との組み合わせにより、コマンドオブジェクトに含まれているビーンフローキーに応じて、実行させる一以上のインターセプタやそれらの実行順序とを違えることができる。   According to the above description, one or more interceptors to be executed and their execution order are determined according to the bean flow key included in the command object by the combination of the keyword set in the interceptor definition file 91 and the regular expression. Can be different.

以上、本発明の好適な実施形態を説明したが、これは本発明の説明のための例示であって、本発明の範囲をこの実施形態にのみ限定する趣旨ではない。本発明は、他の種々の形態でも実施することが可能である。例えば、上述の説明では、或る対象を特定するためのキーとして名称が用いられているが、それに限らず、多種のIDが採用されてもよい。また、ファサードバリュー上でのトランザクション境界の定義の仕方は、トランザクション分離の対象となるコマンドオブジェクトをユニットオブワークに内包させる仕方に限らず、例えば、トランザクション分離の対象となるコマンドオブジェクトに所定コードを付加する等の仕方を採用することもできる。   The preferred embodiment of the present invention has been described above, but this is an example for explaining the present invention, and the scope of the present invention is not limited to this embodiment. The present invention can be implemented in various other forms. For example, in the above description, a name is used as a key for specifying a certain target. However, the present invention is not limited to this, and various IDs may be adopted. In addition, the method of defining transaction boundaries on the facade value is not limited to the method of including the command object that is the target of transaction separation in the unit of work. For example, a predetermined code is added to the command object that is the target of transaction separation. It is also possible to adopt a method such as.

図1は、本発明の一実施形態に係るシステムのハードウェア構成の概要を示すブロック図である。FIG. 1 is a block diagram showing an outline of a hardware configuration of a system according to an embodiment of the present invention. 図2は、図1に示したシステムのソフトウェア構成の概要を示すブロック図である。FIG. 2 is a block diagram showing an outline of the software configuration of the system shown in FIG. 図3は、図2に示したシステムで行われる処理の流れの概要を示す。FIG. 3 shows an outline of the flow of processing performed in the system shown in FIG. 図4Aは、ファサードバリューの構成の一例を示す。図4Bは、図4Aに示したファサードバリュー46の処理流れを示す。FIG. 4A shows an example of the configuration of the facade value. FIG. 4B shows a processing flow of the facade value 46 shown in FIG. 4A. 図5Aは、ファサード層EJB51が行う処理の流れを示す。図5Bは、トランザクション分離層EJB53が行う処理の流れを示す。図5Cは、ビーンフロー実行層EJB55が行う処理の流れを示す。FIG. 5A shows the flow of processing performed by the facade layer EJB51. FIG. 5B shows the flow of processing performed by the transaction separation layer EJB 53. FIG. 5C shows the flow of processing performed by the bean flow execution layer EJB55. 図6Aは、ファサードバリューの構成の別の一例を示す。図6Bは、図6Aに示したファサードバリューの処理流れを示す。FIG. 6A shows another example of the configuration of the facade value. FIG. 6B shows a process flow of the facade value shown in FIG. 6A. 図7Aは、ビーンフロー実行層EJB55が行うことのできる一つの処理の流れを示す。図7Bは、ビーンフロー定義ファイル81の構成の概要を示す。FIG. 7A shows the flow of one process that can be performed by the bean flow execution layer EJB55. FIG. 7B shows an outline of the configuration of the bean flow definition file 81. 図8A、図8B及び図8Cは、ビーンフロー定義ファイル81における記述の具体例を示す。8A, 8B, and 8C show specific examples of descriptions in the bean flow definition file 81. FIG. 図9Aは、ビーンフローの構成例を示す。図9Bは、コマンドオブジェクトの処理依頼を受けた場合にビーンフロー実行層EJB55が行う処理の流れを示す。FIG. 9A shows an example of a bean flow configuration. FIG. 9B shows the flow of processing performed by the bean flow execution layer EJB 55 when a processing request for a command object is received. 図10Aは、外部APにビーンフローの参照が提供されるための方法の説明図である。図10Bは、ビーンフロー83が行う処理の流れの一例を示す。FIG. 10A is an illustration of a method for providing a bean flow reference to an external AP. FIG. 10B shows an example of the flow of processing performed by the bean flow 83. 図11Aは、ビーンフローの第一の処理実行例を示す。図11Bは、ビーンフローの第二の処理実行例を示す。図11Cは、ビーンフローの第三の処理実行例を示す。図11Dは、ビーンフローの第四の処理実行例を示す。図11Eは、ビーンフローの第五の処理実行例を示す。FIG. 11A shows a first process execution example of the bean flow. FIG. 11B shows a second execution example of the bean flow. FIG. 11C shows a third process execution example of the bean flow. FIG. 11D shows a fourth process execution example of the bean flow. FIG. 11E illustrates a fifth process execution example of the bean flow. 図12は、インターセプタ定義ファイル91の一例を示す。FIG. 12 shows an example of the interceptor definition file 91. 図13Aは、コマンドオブジェクト内のビーンフローキーに基づいて選択されるインターセプタがA及びBである場合に実行される処理の説明図である。図13Bは、その処理の流れを示す。FIG. 13A is an explanatory diagram of processing executed when the interceptors selected based on the bean flow key in the command object are A and B. FIG. FIG. 13B shows the flow of the processing.

符号の説明Explanation of symbols

1…情報処理サーバ 3…クライアントシステム 5…WEBサーバ 7…EJBサーバ 13、23、33…CPU 15、25、35…メモリ 17、27、37…ハードディスク 38…データベース 43…WEBブラウザ 45…外部アプリケーション 47…ファサードバリュー選択プログラム 49…ファサードバリュー記憶域 51…ファサード層EJB 53…トランザクション分離層EJB 55…ビーンフロー実行層EJB 57…ビーンフロー定義ファイル記憶域 59…ビーンフロー記憶域 61…プログラムモジュール記憶域 63…インターセプタ定義ファイル記憶域   DESCRIPTION OF SYMBOLS 1 ... Information processing server 3 ... Client system 5 ... WEB server 7 ... EJB server 13, 23, 33 ... CPU 15, 25, 35 ... Memory 17, 27, 37 ... Hard disk 38 ... Database 43 ... WEB browser 45 ... External application 47 ... Facade value selection program 49 ... Facade value storage area 51 ... Facade layer EJB 53 ... Transaction separation layer EJB 55 ... Bean flow execution layer EJB 57 ... Bean flow definition file storage area 59 ... Bean flow storage area 61 ... Program module storage area 63 ... interceptor definition file storage

Claims (6)

要求元からの要求に従う処理を実行する処理実行手段と、
前記処理に対応する一以上のサブ処理を前記要求に基づいて複数のサブ処理の中から選択するサブ処理選択手段と、
前記選択されたサブ処理を前記処理の実行前及び実行後のうちの少なくとも一方で実行するサブ処理実行手段と
を備える情報処理システム。
Processing execution means for executing processing according to the request from the request source;
Sub-process selection means for selecting one or more sub-processes corresponding to the process from a plurality of sub-processes based on the request;
An information processing system comprising: a sub-process executing unit that executes the selected sub-process at least one of before and after the execution of the process.
複数のサブ処理にそれぞれ対応した複数のサブ処理ID及び複数のサブ処理選択条件を記憶した記憶手段を備え、
前記サブ処理選択手段は、前記要求に適合する一以上のサブ処理選択条件を前記複数のサブ処理選択条件の中から特定し、特定された一以上のサブ処理選択条件に対応する一以上のサブ処理IDから識別される一以上のサブ処理を選択する、
請求項1記載の情報処理システム。
A storage unit that stores a plurality of sub-process IDs and a plurality of sub-process selection conditions respectively corresponding to a plurality of sub-processes,
The sub-process selection unit specifies one or more sub-process selection conditions that match the request from the plurality of sub-process selection conditions, and one or more sub-process selection conditions corresponding to the specified one or more sub-process selection conditions. Selecting one or more sub-processes identified from the process ID;
The information processing system according to claim 1.
前記サブ処理選択条件は、キーワードを含み、
前記サブ処理選択手段は、前記要求に含まれている特定の文字列と、サブ処理選択条件を構成するキーワードとに基づいて、前記要求に適合する一以上のサブ処理選択条件を特定する、
請求項2記載の情報処理システム。
The sub-process selection condition includes a keyword,
The sub-process selection unit specifies one or more sub-process selection conditions that match the request, based on a specific character string included in the request and a keyword constituting the sub-process selection condition.
The information processing system according to claim 2.
前記サブ処理選択条件は、キーワードと正規表現との組み合わせで構成されており、
前記サブ処理選択手段は、前記要求に含まれている特定の文字列と、サブ処理選択条件を構成するキーワード及び正規表現とに基づいて、前記要求に適合する一以上のサブ処理選択条件を特定する、
請求項3記載の情報処理システム。
The sub-processing selection condition is composed of a combination of a keyword and a regular expression,
The sub-process selection unit specifies one or more sub-process selection conditions that match the request based on a specific character string included in the request and a keyword and a regular expression constituting the sub-process selection condition. To
The information processing system according to claim 3.
前記処理には、一つの本名と一以上の別名とがあり、
前記要求には特定の文字列が含まれており、前記特定の文字列は、要求対象となる処理の本名と別名とのいずれか一方を表す、
請求項2記載の情報処理システム。
The process has one real name and one or more aliases,
The request includes a specific character string, and the specific character string represents either a real name or an alias name of a process to be requested.
The information processing system according to claim 2.
要求元からの要求に従う処理を実行するステップと、
前記処理に対応する一以上のサブ処理を前記要求に基づいて複数のサブ処理の中から選択するステップと、
前記選択されたサブ処理を前記処理の実行前及び実行後のうちの少なくとも一方で実行するステップと
を有する情報処理方法。
Executing a process according to the request from the requester;
Selecting one or more sub-processes corresponding to the process from a plurality of sub-processes based on the request;
An information processing method comprising: executing the selected sub-process at least one of before and after executing the process.
JP2005065133A 2005-03-09 2005-03-09 Information processor and processing method Pending JP2006251974A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005065133A JP2006251974A (en) 2005-03-09 2005-03-09 Information processor and processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005065133A JP2006251974A (en) 2005-03-09 2005-03-09 Information processor and processing method

Publications (1)

Publication Number Publication Date
JP2006251974A true JP2006251974A (en) 2006-09-21

Family

ID=37092425

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005065133A Pending JP2006251974A (en) 2005-03-09 2005-03-09 Information processor and processing method

Country Status (1)

Country Link
JP (1) JP2006251974A (en)

Similar Documents

Publication Publication Date Title
US10002155B1 (en) Dynamic code loading
US8122292B2 (en) Debugging of business flows deployed in production servers
US9740543B1 (en) Multi-endpoint method implementation
US6983400B2 (en) Distributed test harness model
US8291047B2 (en) Screen scraping interface
AU2008279001B2 (en) Transactional graph-based computation with error handling
JP4287276B2 (en) System for application server messaging using multiple shipping pools
US8032623B2 (en) Context-based dynamic policy assignment in a distributed processing environment
US8307058B2 (en) Apparatus, method, and computer program product for processing information
US20090037425A1 (en) System and method for dynamically configuring a multiplatform computing environment
US10871918B2 (en) Writing composite objects to a data store
US10768974B2 (en) Specifying an order of a plurality of resources in a transaction according to distance
US20050262517A1 (en) System and method for generating a web control in a Windows development environment
US20050086664A1 (en) Method and apparatus for transaction tracking in a web presentation architecture
US7676810B2 (en) Identification of execution context
US20230409295A1 (en) Building base applications with user interface micro frontends
US9047144B2 (en) System and method for providing Quality-of-Services in a multi-event processing environment
JP4889953B2 (en) Information processing apparatus and method
US7275238B2 (en) Program event activated and configured debugger method, system, article of manufacture, computer program product, and data structure
US7765284B2 (en) Dynamically modified, multiple-platform computer programs, and methods and apparatus utilizing same
JP4764649B2 (en) Information processing apparatus and method
US7853605B2 (en) Auxiliary data provider
US20220365832A1 (en) System to facilitate transition to microservices
JP2006251974A (en) Information processor and processing method
US20050235247A1 (en) Using behavioral annotations in source code to build middleware applications