Cosminexus V9 アプリケーションサーバ システム構築・運用ガイド
Enterprise Bean(EJB2.0)を使用したサンプルプログラムは,次に示すディレクトリに格納されています。
<Application Serverのインストールディレクトリ>\CC\examples\ejb\ejb20
ここでは,サンプルプログラムの一覧,実行例,および各サンプルプログラムの概要について説明します。
サンプルプログラムの一覧およびサンプルプログラム実行時の注意事項を示します。サンプルプログラムの一覧は,Enterprise Beanの種類と動作概要をまとめた一覧と,利用する技術,リソース,および動作モードをまとめた一覧に分けて示します。
表M-1 サンプルプログラムの一覧(Enterprise Beanの種類と動作内容)
サンプル名 | Enterprise Bean種別 | パーシスタンス | トランザクション | 動作概要 |
---|---|---|---|---|
account | Entity Bean | BMP | − | 預金や払い戻しに応じて残高を計算し,データベースを更新します。 |
adder | Stateful Session Bean | − | CMT | 入力数値の合計を計算して,ブラウザ上に表示します。 |
bank | Stateful Session Bean | − | CMT | 当座預金口座から普通預金口座に資金を移動し,データベースを更新します。 |
cart | Stateful Session Bean | − | CMT | 購入する本をショッピングカートに入れます。カートにない本をカートから出そうとした場合は,例外を発生させます。 |
checker | Stateful Session Bean | − | CMT | 割引対象となる金額を超えた場合,割引率を基に割引後の金額を計算します。割引対象となる金額と割引率は,Enterprise Beanの環境エントリで指定します。 |
cmp20product | Entity Bean | CMP2.0 | − | 商品情報をデータベースに登録し,登録された商品情報を検索します。このサンプルは,CMP 2.0形式のEnterprise Beanを利用します。 |
confirmer | Stateless Session Bean | − | CMT | 商品の注文に対する確認メールを送信します。 |
converter | Stateless Session Bean | − | CMT | 通貨の種類をドルから円,円からユーロに変換します。 |
enroller | Stateless Session Bean | − | CMT | 学生と科目の追加,および受講登録をして,データベースを更新します。 |
Entity Bean | BMP | − | ||
jsptag※ | Stateless Session Bean | − | CMT | 通貨の種類をドルから円,円からユーロに変換します。このサンプルは,JSPを利用してブラウザ上に表示します。 |
jsptobean | Entity Bean | BMP | − | 預金や払い戻しに応じて残高を計算し,データベースを更新します。残高は,JSPを利用してブラウザ上に表示します。 |
localadder | Stateful Session Bean | − | CMT | 入力数値の合計を計算して,ブラウザ上に表示します。このサンプルは,サーブレットからローカルインタフェースを利用してEnterprise Beanを呼び出します。 |
message | Stateless Session Bean | − | CMT | JMSのキューを利用して,メッセージを送受信します。 |
Message -driven Bean | − | CMT | ||
order | Entity Bean | BMP | − | 注文番号と対応する商品情報を検索して表示します。注文番号と商品情報はデータベースで管理します。 |
product | Entity Bean | CMP | − | 商品情報をデータベースに登録し,登録された商品情報を検索します。 |
salesrep | Entity Bean | BMP | − | 顧客の追加と,担当する販売員の変更を行い,データベースを更新します。 |
shipper | Stateful Session Bean | − | CMT | 注文に対する商品在庫を計算し,データベースを更新します。在庫が一定の数量を下回った場合,引き当て処理を呼び出します。 |
Entity Bean | BMP | − | ||
storagebin | Entity Bean | BMP | − | データベースの部品情報テーブルと部品在庫情報テーブルから,対応する部品の情報と在庫を検索します。 |
teller | Stateful Session Bean | − | BMT | 銀行用端末機から当座預金のお金を引き出し,残高を計算します。 |
warehouse | Stateless Session Bean | − | CMT | 注文を受けた商品の状態,および商品の在庫を更新します。 |
注※ jsptagサンプルをコンパイルおよびアーカイブしたEARファイル(converter.ear)も提供しています。
サンプルプログラムの一覧と,接続するリソース,クライアントの種類を次の表に示します。なお,サンプルプログラムは,J2EEサーバの起動モードとして1.4モードを使用します。
表M-2 サンプルプログラム一覧(接続するリソース,クライアントの種類)
サンプル | 接続するリソース※1 | クライアントの種類※2 | |||
---|---|---|---|---|---|
データベース | メール | JMS | EJBクライアントアプリケーション | Webブラウザ | |
account | ○ | − | − | ○ | − |
adder | − | − | − | − | ○ |
bank | ○ | − | − | ○ | − |
cart | − | − | − | ○ | − |
checker | − | − | − | ○ | − |
confirmer | − | ○ | − | ○ | − |
converter | − | − | − | ○ | − |
enroller | ○ | − | − | ○ | − |
jsptag | − | − | − | − | ○ |
jsptobean | ○ | − | − | − | ○ |
order | ○ | − | − | ○ | − |
product | ○ | − | − | ○ | − |
salesrep | ○ | − | − | ○ | − |
shipper | ○ | − | − | ○ | − |
storagebin | ○ | − | − | ○ | − |
teller | ○ | − | − | ○ | − |
warehouse | ○ | − | − | ○ | − |
message | − | − | ○ | ○ | − |
cmp20product | ○ | − | − | ○ | − |
localadder | − | − | − | − | ○ |
注※1 接続するリソースごとに,必要な設定があります。接続するリソースに応じて,「付録M.2(1)(c) サンプルプログラムで使用するデータベースの設定」,「付録M.2(1)(d) サンプルプログラムで使用するメールの設定」または「付録M.2(1)(e) サンプルプログラムで使用するJMSの設定」を参照してください。
注※2 クライアントの種類に応じて,実行方法などが異なります。詳細は,「付録M.2(1)(f) サンプルプログラムのクライアントの種類」を参照してください。
ここでは,サンプルプログラムで使用するデータベースの設定について説明します。
表M-2の「データベース」列に「○」が付いているサンプルプログラムでは,リソースとしてデータベースを利用します。サンプルプログラムを実行する前に,データベースおよびデータベース接続関連の設定を適切にしてください。
なお,データベースとして利用できるのは,OracleまたはHiRDBです。
必要な設定を次に示します。
ここでは,サンプルプログラムで使用するメールの設定について説明します。
表M-2の「メール」列に「○」が付いているサンプルプログラムでは,リソースとしてメールを利用します。サンプルプログラムを実行する前に,メールサーバへの接続関連の設定を適切にしてください。
必要な設定を次に示します。
ここでは,サンプルプログラムで使用するJMSの設定について説明します。
表M-2の「JMS」列に「○」が付いているサンプルプログラムでは,リソースとしてJMSを利用します。サンプルプログラムを実行する前に,JMSへの接続関連の設定を適切にしてください。
必要な設定を次に示します。
サンプルプログラムのクライアントには,EJBクライアントアプリケーションと,Webブラウザで表示するアプリケーションの2種類があります。
http://<マシン名>:<ポート番号>/<ContextRoot>/<ターゲットファイル>
http://localhost/adder/adder_war/adder.html
converterを例に,サンプルの実行例を示します。converterは,クライアントのJavaアプリケーションからEnterprise Beanを呼び出すプログラムです。データベースなどのリソースは利用しません。リソースを利用する場合は,ここで示す手順に加え,リソースにアクセスできる環境を整える必要があります。リソースの設定方法については,マニュアル「アプリケーションサーバ 機能解説 基本・開発編(コンテナ共通機能)」の「3.3 リソース接続」を参照してください。
通貨の種類をドルから円,円からユーロに変換します。converterの構成を次に示します。
図M-1 converterの構成
サンプルで提供するバッチファイル(compileBean.batおよびcompileClient.bat)を使用して,Enterprise Beanとクライアントをコンパイルします。このバッチファイルで,アプリケーション(.earファイル)が作成されます。
C:\>cd C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\converter C:\Program Files\Hitachi\Cosminexus\CC\...\converter>compileBean C:\Program Files\Hitachi\Cosminexus\CC\...\converter> C:\Program Files\Hitachi\Cosminexus\CC\...\converter>compileClient C:\Program Files\Hitachi\Cosminexus\CC\...\converter> |
「付録M.1(1) J2EEサーバのセットアップ」を参照してください。
「付録M.1(2) J2EEサーバのカスタマイズ」を参照してください。
「付録M.1(3) J2EEサーバの起動」を参照してください。
サンプルで提供するバッチファイル(deployApp.bat)を使用して,アプリケーションをデプロイします。このバッチファイルでは,アプリケーションのJ2EEサーバへのインポートから,アプリケーションの設定,開始,EJBのスタブおよびインタフェースファイルの取得までが実行されます。
このバッチファイルで実行される処理の内容を示します。
サンプルで提供するバッチファイル(testClient.bat)を使用して,アプリケーションを実行します。実行後,EJBクライアントアプリケーションの起動コンソール画面に次のように表示されれば成功です。
C:\>cd C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\converter C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\converter>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\converter, PID = 3684) 12160.0 0.77 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\converter> |
「付録M.1(6) アプリケーションの停止,削除」を参照してください。
「付録M.1(7) J2EEサーバの終了」を参照してください。
Enterprise Bean(2.0)のサンプルの概要,構成,実行例を示します。なお,必要な設定については,「付録M.2(1)(b) サンプルプログラムの一覧(接続するリソース,クライアントの種類)」を参照してください。
預金や払い戻しに応じて残高を計算し,銀行口座テーブルを更新します。accountの構成を次に示します。
図M-2 accountの構成
accountの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\account>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\account, PID = 3684) balance = 68.25 balance = 32.55 456: 44.77 730: 19.54 268: 100.07 456: 44.77 836: 32.55 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\account> |
ブラウザから入力された数値の合計を計算します。adderの構成を次に示します。
図M-3 adderの構成
実行時には,ブラウザを起動し,URLに次の文字列を指定します。
http://<マシン名>:<ポート番号>/<ContextRoot>/adder.html
インプロセスHTTPサーバが使用できる場合,デフォルトでは次のURLを指定します。
http://localhost/adder/adder_war/adder.html
adderの実行例を示します。
図M-4 adderの実行例
当座預金口座から普通預金口座に資金を移動します。資金はデータベースで管理し,資金移動時に,対応する当座預金口座テーブルと普通預金口座テーブルを更新します。bankの構成を次に示します。
図M-5 bankの構成
bankの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\bank>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\bank, PID = 3684) checking: 60.0 saving: 540.0 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\bank> |
本を購入するショッピングカートです。3冊の本をカートに入れ,カートにない本1冊をカートから出そうとして「BookException」を発生させます。cartの構成を次に示します。
図M-6 cartの構成
cartの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\cart>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\cart, PID = 3684) The Martian Chronicles 2001 A Space Odyssey The Left Hand of Darkness Caught a BookException: Alice in Wonderland not in cart. KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\cart> |
割引対象となる金額を超えた場合,割引率を基に割引後の金額を計算します。割引対象となる金額と割引率は,Enterprise Beanの環境エントリで指定します。checkerの構成を次に示します。
図M-7 checkerの構成
checkerの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\checker>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\checker, PID = 3684) discount = 4200.0 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\checker> |
商品情報をデータベースに登録し,登録された商品情報を検索します。このサンプルは,CMP 2.0形式のEnterprise Beanを利用します。cmp20productの構成を次に示します。
図M-8 cmp20productの構成
cmp20productの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\cmp20product>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\cmp20product, PID = 3684) Ceramic Dog: 10.0 Ceramic Dog: 14.0 Chrome Fish: 22.0 999: Ivory Cat 19.0 789: Ivory Cat 33.0 123: 14.0 456: 13.0 999: 19.0 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\cmp20product> |
商品の注文に対する確認メールを送信します。confirmerの構成を次に示します。
図M-9 confirmerの構成
confirmerのクライアント(メール送信側)の実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\confirmer>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\confirmer, PID = 3684) KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\confirmer> |
クライアント実行後,ConfirmerClient.javaで指定したアドレスにメールが送信されます。受信されるメールの例を示します。
件名:"Test Message from ConfirmerEJB" 文面: Thank you for your order. We received your order on 2002/03/18 12:35. |
converterについては,「付録M.2(2) Enterprise Bean(EJB2.0)のサンプル実行手順」を参照してください。
学生と科目の追加,および受講登録をして,対応する学生情報テーブル,科目テーブル,受講登録情報テーブルを更新します。enrollerの構成を次に示します。
図M-10 enrollerの構成
enrollerの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\enroller>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\enroller, PID = 3684) Denise Smith: 220 Power J2EE Programming 333 XML Made Easy 777 An Introduction to Java Programming An Introduction to Java Programming: 823 Denise Smith 456 Joe Smith 388 Elizabeth Willis KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\enroller> |
通貨の種類をドルから円,円からユーロに変換します。変換した結果は,JSPを利用して,ブラウザに表示します。jsptagの構成を次に示します。
図M-11 jsptagの構成
実行時には,ブラウザを起動し,URLに次の文字列を指定します。
http://<マシン名>:<ポート番号>/<ContextRoot>/Converter.jsp
インプロセスHTTPサーバが使用できる場合,デフォルトでは次のURLを指定します。
http://localhost/jsptag/converter_war/Converter.jsp
jsptagの実行例を示します。
図M-12 jsptagの実行例
預金や払い戻しに応じて残高を計算し,データベースを更新します。残高は,JSPを利用してブラウザ上に表示します。jsptobeanの構成を次に示します。
図M-13 jsptobeanの構成
実行時には,ブラウザを起動し,URLに次の文字列を指定します。
http://<マシン名>:<ポート番号>/<ContextRoot>/Account.jsp
インプロセスHTTPサーバが使用できる場合,デフォルトでは次のURLを指定します。
http://localhost/jsptobean/account_war/Account.jsp
jsptobeanの実行例を示します。
図M-14 jsptobeanの実行例
入力数値の合計を計算して,ブラウザ上に表示します。このサンプルは,サーブレットからローカルインタフェースを利用してEnterprise Beanを呼び出します。localadderの構成を次に示します。
図M-15 localadderの構成
実行時には,ブラウザを起動し,URLに次の文字列を指定します。
http://<マシン名>:<ポート番号>/<ContextRoot>/adder.html
インプロセスHTTPサーバが使用できる場合,デフォルトでは次のURLを指定します。
http://localhost/localadder/localadder_war/adder.html
localadderの実行例を示します。
図M-16 localadderの実行例
Session BeanからJMSのQueueへ送信したメッセージを,Message-driven Beanで受信します。messageの構成を次に示します。
図M-17 messageの構成
messageのクライアントの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\message>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\message, PID = 3684) sending message=MY MESSAGE KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\message> |
クライアント実行後,メッセージの送受信が正常に完了した場合は,J2EEサーバの起動コンソール上に次のように表示されます。
... MessageBean: onMessage() MessageBean: received message=MY MESSAGE ... |
注文番号と対応する商品情報を検索して表示します。注文番号と商品情報は,それぞれ注文情報テーブルと商品情報テーブルで管理します。orderの構成を次に示します。
図M-18 orderの構成
orderの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\order>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\Hitachi\Cosminexus\CC\examples\ ejb\ejb20\order, PID = 3684) about to create 123 1 p23 12.0 123 2 p67 89.0 123 3 p11 41.0 123 456 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\order> |
商品名や価格などの商品情報をデータベースに登録し,登録された商品情報を検索します。商品情報は,商品情報テーブルで管理します。productの構成を次に示します。
図M-19 productの構成
productの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\product>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\product, PID = 3684) Ceramic Dog: 10.0 Ceramic Dog: 14.0 Chrome Fish: 22.0 999: Ivory Cat 19.0 789: Ivory Cat 33.0 123: 14.0 456: 13.0 999: 19.0 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\product> |
顧客の追加と,担当する販売員の変更を行い,データベースを更新します。二つのEnterprise Beanを連携し,顧客テーブルと販売員テーブルへの検索と更新を行います。salesrepの構成を次に示します。
図M-20 salesrepの構成
salesrepの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\salesrep>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\salesrep, PID = 3684) customerId = 221 customerId = 388 customerId = 456 customerId = 844 987: Mary Jackson 221: Alice Smith 388: Bill Williamson 456: Joe Smith 844: Buzz Murphy KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\salesrep> |
注文に対する商品在庫を計算し,データベースを更新します。在庫が一定の数量を下回った場合,引き当て処理を呼び出します。二つのEnterprise Beanを連携し,商品在庫情報テーブルへの検索と更新を行います。shipperの構成を次に示します。
図M-21 shipperの構成
shipperの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\shipper>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\shipper, PID = 3684) KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\shipper> |
shipperの実行後,J2EEサーバの起動コンソール上に次のように表示されます。
... ShipperEJB: ejbCreate() ShipperEJB: shipItem() StockEJB: updateOnHand() StockEJB: reorderNeeded() ... |
データベースから部品の情報と在庫を検索します。二つのEnterprise Beanを連携し,部品情報テーブルと部品在庫情報テーブルへの検索を行います。storagebinの構成を次に示します。
図M-22 storagebinの構成
storagebinの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\storagebin>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\storagebin, PID = 3684) 777 388 500 1.0 Duct Tape KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\storagebin> |
銀行用端末機から当座預金を引き出し,残高を計算します。データベースの(銀行用端末機の)入金情報テーブルと取引履歴情報テーブルに対し,取引内容を追加します。
tellerの構成を次に示します。
図M-23 tellerの構成
tellerの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\teller>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\teller, PID = 3684) checking = 500.0 checking = 440.0 KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\teller> |
注文を受けた商品の状態,および商品の在庫を更新します。データベースの商品情報テーブルと在庫情報テーブルのそれぞれを更新します。warehouseの構成を次に示します。
図M-24 warehouseの構成
warehouseの実行例を示します。
C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\warehouse>testClient KDJE40053-I The cjclstartap command will now start. (directory for the user definition file = C:\Program Files\HITACHI\Cosminexus\CC\examples\ ejb\ejb20\warehouse, PID = 3684) status = shipped KDJE40054-I The cjclstartap command was stopped. (PID = 3684, exit status = 0) C:\Program Files\Hitachi\Cosminexus\CC\examples\ejb\ejb20\warehouse> |
All Rights Reserved. Copyright (C) 2012, 2015, Hitachi, Ltd.