Version 4

    EJB 3.0 TrailBlazer: Hike 4: &12521;&12531;&12479;&12452;&12512;&12469;&12540;&12499;&12473; (Runtime Services)

     

    As we have learned in the "Service Objects Management" hike, an EJB 3.0 client uses downloaded stub objects to make method calls against the service objects. The stub delegates the request to the EJB 3.0 server / container, which in turn invokes the managed service object and returns the result. In the process, the EJB 3.0 container can inspect and intercept any method calls that go through it. The container can then apply runtime services before and after the target service method invocation. For instance, the container can check whether the client has the permission to call the method, profile and trace the method invocation stack, and tie multiple calls into a transaction. At the end of a transaction, the container can also perform extra work to commit the transaction or roll it back.

     

    &12300;&12469;&12540;&12499;&12473;&12458;&12502;&12472;&12455;&12463;&12488;&31649;&29702;&12301;&12495;&12452;&12461;&12531;&12464;&12391;&23398;&12435;&12384;&12424;&12358;&12395;&12289;EJB 3.0&12463;&12521;&12452;&12450;&12531;&12488;&12399;&12480;&12454;&12531;&12525;&12540;&12489;&12375;&12383;&12473;&12479;&12502;&12458;&12502;&12472;&12455;&12463;&12488;&12434;&20351;&12387;&12390;&12469;&12540;&12499;&12473;&12458;&12502;&12472;&12455;&12463;&12488;&12395;&12513;&12477;&12483;&12489;&21628;&12403;&20986;&12375;&12434;&34892;&12356;&12414;&12377;&12290;&12473;&12479;&12502;&12399;&12522;&12463;&12456;&12473;&12488;&12434;EJB 3.0&12469;&12540;&12496;/&12467;&12531;&12486;&12490;&12395;&22996;&35698;&12375;&12289;&12467;&12531;&12486;&12490;&12399;&27425;&12356;&12391;&31649;&29702;&23550;&35937;&12469;&12540;&12499;&12473;&12458;&12502;&12472;&12455;&12463;&12488;&12434;&21628;&12403;&20986;&12375;&12390;&12289;&32080;&26524;&12434;&36820;&12375;&12414;&12377;&12290;&12371;&12398;&12503;&12525;&12475;&12473;&12391;&12399;&12289;EJB 3.0&12467;&12531;&12486;&12490;&12399;&36890;&36942;&12377;&12427;&12393;&12398;&12424;&12358;&12394;&12513;&12477;&12483;&12489;&21628;&12403;&20986;&12375;&12418;&26908;&26619;&12375;&12289;&12452;&12531;&12479;&12540;&12475;&12503;&12488;&12377;&12427;&12371;&12392;&12364;&12391;&12365;&12414;&12377;&12290;&12381;&12398;&12392;&12365;&12467;&12531;&12486;&12490;&12399;&23550;&35937;&12398;&12469;&12540;&12499;&12473;&12513;&12477;&12483;&12489;&21628;&12403;&20986;&12375;&12398;&21069;&24460;&12395;&12521;&12531;&12479;&12452;&12512;&12469;&12540;&12499;&12473;&12434;&36969;&29992;&12377;&12427;&12371;&12392;&12364;&12391;&12365;&12414;&12377;&12290;&20363;&12360;&12400;&12467;&12531;&12486;&12490;&12399;&12289;&12463;&12521;&12452;&12450;&12531;&12488;&12364;&12513;&12477;&12483;&12489;&21628;&12403;&20986;&12375;&12434;&35377;&21487;&12373;&12428;&12390;&12356;&12427;&12363;&12393;&12358;&12363;&12434;&12481;&12455;&12483;&12463;&12375;&12383;&12426;&12289;&12513;&12477;&12483;&12489;&21628;&12403;&20986;&12375;&12473;&12479;&12483;&12463;&12434;&12503;&12525;&12501;&12449;&12452;&12523;&12420;&12488;&12524;&12540;&12473;&12375;&12383;&12426;&12289;&35079;&25968;&12398;&21628;&12403;&20986;&12375;&12434;&12402;&12392;&12388;&12398;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12395;&32080;&12403;&12388;&12369;&12427;&12371;&12392;&12364;&12391;&12365;&12414;&12377;&12290;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12398;&26368;&24460;&12391;&12399;&12289;&12467;&12531;&12486;&12490;&12399;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12434;&12467;&12511;&12483;&12488;&12354;&12427;&12356;&12399;&12525;&12540;&12523;&12496;&12483;&12463;&12377;&12427;&12383;&12417;&12398;&36861;&21152;&20966;&29702;&12434;&34892;&12358;&12371;&12392;&12418;&12391;&12365;&12414;&12377;&12290;

     

    In this hike, we will first explore how to configure transaction and security properties for service objects and methods. In the last trail, we will also discuss how to develop your own interceptors and expand the container services.

     

    &12371;&12398;&12495;&12452;&12461;&12531;&12464;&12391;&12399;&12289;&12414;&12378;&12469;&12540;&12499;&12473;&12458;&12502;&12472;&12455;&12463;&12488;&12420;&12513;&12477;&12483;&12489;&12395;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12420;&12475;&12461;&12517;&12522;&12486;&12451;&12398;&12503;&12525;&12497;&12486;&12451;&12434;&35373;&23450;&12377;&12427;&26041;&27861;&12434;&25506;&32034;&12375;&12414;&12377;&12290;&26368;&24460;&12398;&23567;&36947;&12391;&12399;&12289;&29420;&33258;&12398;&12452;&12531;&12479;&12475;&12503;&12479;&12434;&38283;&30330;&12375;&12467;&12531;&12486;&12490;&12398;&12469;&12540;&12499;&12473;&12434;&25313;&24373;&12377;&12427;&26041;&27861;&12395;&12388;&12356;&12390;&12418;&35542;&12376;&12414;&12377;&12290;

     

    トランザクション

     

    This trail shows how to declare transactional properties for any POJO methods in an EJB 3.0 application and how transactions work for database operations.

     

    &12371;&12398;&23567;&36947;&12391;&12399;&12289;EJB 3.0&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12391;POJO&12398;&12513;&12477;&12483;&12489;&12395;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12398;&12503;&12525;&12497;&12486;&12451;&12434;&23459;&35328;&12377;&12427;&26041;&27861;&12392;&12289;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12364;&12487;&12540;&12479;&12505;&12540;&12473;&25805;&20316;&12395;&23550;&12375;&12393;&12398;&12424;&12358;&12395;&20685;&12367;&12363;&12434;&35211;&12390;&12356;&12365;&12414;&12377;&12290;

     

    アプリケーショントランザクション

     

    Application transaction is a long running transaction that spans across several method invocations in different threads. It especially useful in session-based web applications, where each transaction might involve a series of pages. In this trail, we will show how application transaction is handled in JBoss's EJB 3.0 implementation.

     

    &12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12392;&12399;&12289;&30064;&12394;&12427;&12473;&12524;&12483;&12489;&12391;&12398;&12356;&12367;&12388;&12418;&12398;&12513;&12477;&12483;&12489;&21628;&12403;&20986;&12375;&12395;&12431;&12383;&12427;&12289;&12525;&12531;&12464;&12521;&12531;&12491;&12531;&12464;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12398;&12371;&12392;&12391;&12377;&12290;&12371;&12428;&12399;&12289;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12364;&19968;&36899;&12398;&12506;&12540;&12472;&12395;&12431;&12383;&12427;&12424;&12358;&12394;&12289;&12475;&12483;&12471;&12519;&12531;&12505;&12540;&12473;&12398;Web&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12391;&29305;&12395;&26377;&29992;&12391;&12377;&12290;&12371;&12398;&23567;&36947;&12391;&12399;&12289;JBoss&12398;EJB 3.0&23455;&35013;&12391;&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12488;&12521;&12531;&12470;&12463;&12471;&12519;&12531;&12364;&12393;&12398;&12424;&12358;&12395;&25201;&12431;&12428;&12427;&12398;&12363;&12434;&35211;&12390;&12356;&12365;&12414;&12377;&12290;

     

    セキュリティ

     

    This trail discusses how to setup role based security constraints to limit access to any POJO methods in an EJB 3.0 application.

     

    &12371;&12398;&23567;&36947;&12391;&12399;&12289;EJB 3.0&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12391;POJO&12398;&12513;&12477;&12483;&12489;&12408;&12398;&12450;&12463;&12475;&12473;&12434;&21046;&38480;&12377;&12427;&12525;&12540;&12523;&12505;&12540;&12473;&12398;&12475;&12461;&12517;&12522;&12486;&12451;&21046;&32004;&12434;&12393;&12398;&12424;&12358;&12395;&12475;&12483;&12488;&12450;&12483;&12503;&12377;&12427;&12363;&12395;&12388;&12356;&12390;&35542;&12376;&12414;&12377;&12290;

     

    汎用インタセプタ

     

    Using EJB 3.0 interceptors, you can write your own container services and apply them to any POJOs via simple annotations. In trail, we will use a familiar logging / tracing example to show how it is done.

     

    EJB 3.0&12398;&12452;&12531;&12479;&12475;&12503;&12479;&12434;&20351;&12358;&12371;&12392;&12391;&12289;&29420;&33258;&12398;&12467;&12531;&12486;&12490;&12469;&12540;&12499;&12473;&12434;&35352;&36848;&12375;&12289;&31777;&21336;&12394;&12450;&12494;&12486;&12540;&12471;&12519;&12531;&12395;&12424;&12387;&12390;&12381;&12428;&12425;&12434;POJO&12395;&36969;&29992;&12377;&12427;&12371;&12392;&12364;&12391;&12365;&12414;&12377;&12290;&12371;&12398;&23567;&36947;&12391;&12399;&12289;&12381;&12428;&12364;&12393;&12398;&12424;&12358;&12395;&34892;&12431;&12428;&12427;&12398;&12363;&12289;&12362;&12394;&12376;&12415;&12398;&12525;&12462;&12531;&12464;/&12488;&12524;&12540;&12471;&12531;&12464;&12398;&20363;&12391;&35211;&12390;&12356;&12365;&12414;&12377;&12290;

     

    �2002-2005 JBoss Inc. All rights reserved. JBoss is a registered trademark and servicemark of JBoss, Inc.

    Privacy Policy