Version 3

    Enterprise Java Made Easy

     

    &12488;&12524;&12452;&12523;&65297;&12288;&12456;&12531;&12479;&12540;&12503;&12521;&12452;&12474;Java&12399;&38627;&12375;&12367;&12394;&12356;

     

    &12399;&12376;&12417;&12395;&65288;Introduction&65289;

     

    J2EE is known for its power and flexibility in developing database driven enterprise middleware applications. Enterprise Java Bean (EJB) is a key component in J2EE.

     

    J2EE&12399;&12487;&12540;&12479;&12505;&12540;&12473;&20013;&24515;&12398;&12456;&12531;&12479;&12540;&12503;&12521;&12452;&12474;&12398;&12511;&12489;&12523;&12454;&12455;&12450;&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12434;&38283;&30330;&12377;&12427;&12398;&12395;&24517;&35201;&12394;&27231;&33021;&65288;&35379;&27880;&65306;&21407;&35486;&12399;power&65289;&12392;&25313;&24373;&24615;{FOOTNOTE DEF 1 1}&12434;&25345;&12388;&12371;&12392;&12391;&26377;&21517;&12391;&12377;&12290;&12381;&12398;J2EE&12398;&12461;&12540;&12392;&12394;&12427;&12467;&12531;&12509;&12540;&12493;&12531;&12488;&12364;EJB&12391;&12377;&12290;

     

    {FOOTNOTE RED #1 1} &8594;&26580;&36575;&24615; -tokobayashi

     

    However, the current J2EE 1.4 and EJB 2.1 are complex specifications. Novice Java developers need to learn the EJB component model, APIs, XML-based deployment descriptor files, and various design patterns before they can create usable systems. The complex programming model is one of the major factors that hinders the adoption of J2EE. Misuse of J2EE by inexperienced developers also results in poor software qualities.

     

    &12375;&12363;&12375;&12289;&29694;&22312;&12398;J2EE 1.4&12392;EJB 2.1&12398;&20181;&27096;&12399;&12392;&12390;&12418;&35079;&38609;&12394;&12418;&12398;&12391;&12377;&12290;Java&38283;&30330;&12398;&21021;&24515;&32773;&12364;&23455;&38555;&12395;&12471;&12473;&12486;&12512;&12434;&27083;&31689;&12391;&12365;&12427;&12424;&12358;&12395;&12394;&12427;&12383;&12417;&12395;&12399;&12289;EJB&12467;&12531;&12509;&12540;&12493;&12531;&12488;&12514;&12487;&12523;&12289;&65288;EJB&12398;&65289;&12288;API&12289;XML&12505;&12540;&12473;&12398;&37197;&32622;&35352;&36848;&23376;&12289;&12381;&12375;&12390;&12383;&12367;&12373;&12435;&12398;&12487;&12470;&12452;&12531;&12497;&12479;&12540;&12531;&12434;&32722;&24471;&12377;&12427;&24517;&35201;&12364;&12354;&12426;&12414;&12377;&12290;&12371;&12398;&12503;&12525;&12464;&12521;&12511;&12531;&12464;&12514;&12487;&12523;&12398;&35079;&38609;&12373;&12364;J2EE&12398;&25505;&29992;&12434;&22952;&12370;&12427;&22823;&12365;&12394;&35201;&22240;&12392;&12394;&12387;&12390;&12356;&12427;&12398;&12391;&12377;&12290;&12414;&12383;&12289;&26410;&29087;&12394;&38283;&30330;&32773;&12364;&35492;&12387;&12383;J2EE&12398;&20351;&12356;&26041;&12434;&12377;&12427;&12392;&12289;&20302;&21697;&36074;&12398;&12477;&12501;&12488;&12454;&12455;&12450;&12434;&29983;&12435;&12391;&12375;&12414;&12358;&12398;&12391;&12377;&12290;

     

    To address this complexity problem, the EJB 3.0 expert group has developed a new programming model for the next generation enterprise Java middleware applications. The new model leverages the knowledge and experience learned from proven successful Open Source projects, such as Hibernate and XDoclet. It is based on Java annotations and POJO (plain old Java objects) services. The EJB 3 programming model is easy to understand and preserves the power of J2EE at the same time.

     

    &12371;&12398;&35079;&38609;&12373;&12398;&21839;&38988;&12434;&35299;&28040;&12377;&12427;&12383;&12417;&12395;&12289;EJB 3.0&12398;&12456;&12461;&12473;&12497;&12540;&12488;&36948;&12399;&27425;&19990;&20195;&12398;&12456;&12531;&12479;&12540;&12503;&12521;&12452;&12474;Java&12511;&12489;&12523;&12454;&12455;&12450;&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12398;&26032;&12383;&12394;&12503;&12525;&12464;&12521;&12511;&12531;&12464;&12514;&12487;&12523;&12434;&38283;&30330;&12375;&12383;&12398;&12391;&12377;&12290;&26032;&12375;&12356;&65288;&12503;&12525;&12464;&12521;&12511;&12531;&12464;&65289;&12514;&12487;&12523;&12391;&12399;&12289;Hibernate&12420;XDoclet&12392;&12356;&12387;&12383;&12289;&12377;&12391;&12395;&25104;&21151;&12434;&21454;&12417;&12390;&12356;&12427;&12458;&12540;&12503;&12531;&12477;&12540;&12473;&12503;&12525;&12472;&12455;&12463;&12488;&12398;&30693;&35672;&12392;&32076;&39443;&12364;&29983;&12363;&12373;&12428;&12390;&12356;&12414;&12377;&12290;EJB3&12398;&12503;&12525;&12464;&12521;&12511;&12531;&12464;&12514;&12487;&12523;&12399;&29702;&35299;&12375;&12420;&12377;&12356;&12392;&21516;&26178;&12395;&12289;&26082;&23384;&12398;J2EE&12398;&33021;&21147;&12434;&32153;&25215;&12375;&12390;&12356;&12414;&12377;&12290;

     

    JBoss is a key driving force behind EJB 3.0. It not only supports the EJB 3.0 specification but also makes the EJB 3.0 programming model more generally available for other enterprise middleware services in the JBoss Enterprise Middleware Suite (JEMS) of products.

     

    JBoss&12399;EJB 3.0&12398;&37325;&35201;&12394;&39366;&21205;&21147;&12391;&12377;&12290;JBoss&12399;EJB 3.0&12398;&20181;&27096;&12434;&23455;&35013;&12375;&12390;&12356;&12427;&12384;&12369;&12391;&12394;&12367;&12289;EJB 3.0&12503;&12525;&12464;&12521;&12511;&12531;&12464;&12514;&12487;&12523;&12434;JEMS&12398;&20182;&12398;&12503;&12525;&12480;&12463;&12488;&12391;&12418;&19968;&33324;&30340;&12395;&20351;&29992;&12391;&12365;&12427;&12424;&12358;&12395;&12375;&12390;&12356;&12414;&12377;&12290;

     

    &12450;&12494;&12486;&12540;&12471;&12519;&12531;&65288;Annotations&65289;

     

    Annotation is a new Java language feature introduced in JDK 1.5. It allows us to associate code attributes (meta data) and configuration options directly with Java classes, methods, and fields in the source code. For instance, you can use an annotate a Java class to specify whether it should be accessible via remote invocation.

     

    &12450;&12494;&12486;&12540;&12471;&12519;&12531;&12399;JDK 1.5&12391;&23455;&35013;&12373;&12428;&12383;Java&12398;&26032;&12383;&12394;&27231;&33021;&12391;&12377;&12290;&12450;&12494;&12486;&12540;&12471;&12519;&12531;&12434;&20351;&12358;&12371;&12392;&12395;&12424;&12387;&12390;&12289;&12467;&12540;&12489;&23646;&24615;&65288;&12513;&12479;&12487;&12540;&12479;&65289;&12420;&35373;&23450;&12458;&12503;&12471;&12519;&12531;&12434;&12477;&12540;&12473;&12467;&12540;&12489;&12391;&30452;&25509;Java&12463;&12521;&12473;&12289;&12513;&12477;&12483;&12489;&12289;&12501;&12451;&12540;&12523;&12489;&12395;&32080;&12403;&12388;&12369;&12427;&12371;&12392;&12364;&12391;&12365;&12427;&12424;&12358;&12395;&12394;&12426;&12414;&12375;&12383;&12290;&12383;&12392;&12360;&12400;Java&12463;&12521;&12473;&12395;&12450;&12494;&12486;&12540;&12471;&12519;&12531;&12434;&35352;&36848;&12375;&12390;&12289;&12522;&12514;&12540;&12488;&36215;&21205;&12364;&21487;&33021;&12363;&12393;&12358;&12363;&12434;&25351;&23450;&12377;&12427;&12371;&12392;&12364;&12391;&12365;&12414;&12377;&12290;

     

    Annotations can replace the "tag" interfaces commonly used in J2EE 1.4 and almost completely eliminate the need for the bloated and redundant XML deployment descriptors.

     

    &12450;&12494;&12486;&12540;&12471;&12519;&12531;&12399;&12289;J2EE 1.4&12391;&12424;&12367;&20351;&12431;&12428;&12390;&12356;&12383;tag&12452;&12531;&12479;&12501;&12455;&12540;&12473;&12395;&20195;&12431;&12427;&12418;&12398;&12391;&12289;&32933;&22823;&21270;&12375;&12390;&20887;&38263;&12394;XML&37197;&32622;&35352;&36848;&23376;&12364;&12411;&12392;&12435;&12393;&19981;&35201;&12395;&12394;&12426;&12414;&12377;&12290;

     

    POJO&12469;&12540;&12499;&12473;&65288;POJO Services&65289;

     

    In the EJB 3.0 programming model, the old component model (e.g., the Home interfaces, the required deployment descriptors) is out. The new EJBs and service objects are simply container managed POJOs. You can build arbitrary inheritance structures around those POJOs.

     

    EJB 3.0&12503;&12525;&12464;&12521;&12511;&12531;&12464;&12514;&12487;&12523;&12391;&12399;&12289;&12418;&12399;&12420;&26082;&23384;&12398;&12467;&12531;&12509;&12540;&12493;&12531;&12488;&12514;&12487;&12523;&65288;&12383;&12392;&12360;&12400;&12289;&12507;&12540;&12512;&12452;&12531;&12479;&12501;&12455;&12540;&12473;&12392;&37197;&20633;&35352;&36848;&23376;&65289;&12399;&24517;&35201;&12354;&12426;&12414;&12379;&12435;&12290;&26032;&12375;&12356;EJB&12392;&12469;&12540;&12499;&12473;&12458;&12502;&12472;&12455;&12463;&12488;&12399;&12467;&12531;&12486;&12490;&12364;&31649;&29702;&12377;&12427;&21336;&12394;&12427;POJO&12391;&12377;&12290;&12371;&12428;&12425;&12398;POJO&12395;&23550;&12375;&12390;&20219;&24847;&12398;&32153;&25215;&27083;&36896;&12434;&20316;&25104;&12377;&12427;&12371;&12392;&12364;&21487;&33021;&12391;&12377;&12290;

     

    But without a component model, how can the container manage those POJOs? In EJB 3.0, the interaction between the POJO class and the container is declaratively specified using Java annotations.

     

    &12467;&12531;&12509;&12540;&12493;&12531;&12488;&12514;&12487;&12523;&12391;&12399;&12394;&12356;&12398;&12395;&12289;&12393;&12358;&12375;&12390;&12467;&12531;&12486;&12490;&12399;POJO&12434;&31649;&29702;&12391;&12365;&12427;&12398;&12391;&12375;&12423;&12358;&12363;&65311;EJB 3.0&12391;&12399;POJO&12463;&12521;&12473;&12392;&12467;&12531;&12486;&12490;&12398;&38291;&12398;&30456;&20114;&38306;&20418;&12399;&12289;Java&12398;&12450;&12494;&12486;&12540;&12471;&12519;&12531;&12395;&12424;&12387;&12390;&23459;&35328;&30340;&12395;&25351;&23450;&12373;&12428;&12427;&12398;&12391;&12377;&12290;

     

    &12469;&12531;&12503;&12523;&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&65288;Sample Application&65289;

     

    The sample application in this TrailBlazer is on investment calculator. Based on your investment preference and the fund growth rate, it calculates the final payout at the end of your investment period. The calculator is bundled with this trail map and you can try it directly from the trail pages.

     

    &12371;&12398;TrailBlazer&12391;&20351;&29992;&12377;&12427;&12469;&12531;&12503;&12523;&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12399;&25237;&36039;&35336;&31639;&12407;&12429;&12368;&12425;&12416;&12391;&12377;&12290;&25237;&36039;&12398;&21980;&22909;&12392;&36039;&37329;&25104;&38263;&29575;&12395;&24540;&12376;&12390;&12289;&25237;&36039;&26399;&38291;&12391;&12398;&26368;&32066;&37329;&38989;&12434;&35336;&31639;&12375;&12414;&12377;&12290;&12469;&12531;&12503;&12523;&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12399;&12371;&12398;&12488;&12524;&12452;&12523;&19978;&12395;&12354;&12426;&12414;&12377;&12398;&12391;&12289;&12488;&12524;&12452;&12523;&12398;&12506;&12540;&12472;&12363;&12425;&30452;&25509;&35430;&12375;&12390;&12415;&12427;&12371;&12392;&12364;&12391;&12365;&12414;&12377;&12290;

     

    We will refactor the investment calculator several times to showcase how to use different technologies in the EJB 3.0 programming model. All the source code is made available in the trails as we go through the application.

     

    EJB 3.0&12503;&12525;&12464;&12521;&12511;&12531;&12464;&12514;&12487;&12523;&12398;&27096;&12293;&12394;&12486;&12463;&12494;&12525;&12472;&12434;&12393;&12398;&12424;&12358;&12395;&21033;&29992;&12377;&12427;&12363;&12434;&23398;&12406;&12383;&12417;&12395;&12289;&36884;&20013;&12391;&20309;&24230;&12363;&35336;&31639;&12503;&12525;&12464;&12521;&12512;&12434;&25913;&22793;&12375;&12414;&12377;&12290;&12477;&12540;&12473;&12467;&12540;&12489;&12399;&12377;&12409;&12390;&12488;&12524;&12452;&12523;&12434;&36914;&12416;&20013;&12391;&21033;&29992;&21487;&33021;&12391;&12377;&12290;

     

    &21442;&32771;&25991;&29486;&65288;Further Reading&65289;

     

    Further references and tutorials for JBoss EJB 3.0 and Extensions are available from the JBoss web site.

     

    JBoss EJB 3.0&12392;&25313;&24373;&27231;&33021;&12398;&35443;&32048;&12392;&12481;&12517;&12540;&12488;&12522;&12450;&12523;&12364;JBoss Web&12469;&12452;&12488;&12395;&29992;&24847;&12373;&12428;&12390;&12356;&12414;&12377;&12290;

     

    • JBoss EJB 3.0 product page provides general information about the product and download links.

     

     

    • The JBoss EJB 3.0 tutorial is a collection of short code examples demonstrating the use of various EJB 3.0 APIs.

     

     

    • The JBoss EJB 3.0 reference guide complements this trailblazer and provides in depth information about EJB 3.0 programming.

     

     

    • JSR 220 is responsible for developing the EJB 3.0 specifications. Visit the web site to track the specification progress and download the latest public drafts.

     

    • JSR 220&12399;EJB 3.0&20181;&27096;&12395;&38306;&12377;&12427;&12469;&12452;&12488;&12391;&12377;&12290;&20181;&27096;&31574;&23450;&12398;&36914;&12415;&20855;&21512;&12420;&26368;&26032;&12489;&12521;&12501;&12488;&12434;&12480;&12454;&12531;&12525;&12540;&12489;&12377;&12427;&12395;&12399;&12371;&12385;&12425;&12434;&21442;&29031;&12375;&12390;&12367;&12384;&12373;&12356;&12290;

     

    • Here are some online articles explaining the basics of Java annotations.

     

    • Java&12450;&12494;&12486;&12540;&12471;&12519;&12531;&12395;&12388;&12356;&12398;&22522;&26412;&12434;&35500;&26126;&12375;&12390;&12356;&12427;&35352;&20107;&12391;&12377;&12290;

     

      • Guide to Java Annotations (Sun)

      • Java Annotation Facility - A Primer (JDJ)

      • Declarative Programming in Java (Onjava.com)

     

    &65288;&35379;&27880;&65306;&12371;&12428;&12425;&12399;&35328;&35486;&12398;&12414;&12414;&65311;&65289;

     

    &12414;&12392;&12417;&65288;Summary&65289;

     

    In this trail, you learned about the basic concepts behind the EJB 3.0 programming model. Next, let's discuss how to install and use the JBoss EJB 3.0 application server.

     

    &12371;&12398;&12488;&12524;&12452;&12523;&12391;&12399;&12289;EJB 3.0&12503;&12525;&12464;&12521;&12511;&12531;&12464;&12514;&12487;&12523;&12398;&22522;&26412;&30340;&12394;&12467;&12531;&12475;&12503;&12488;&12434;&23398;&32722;&12375;&12414;&12375;&12383;&12290;&12391;&12399;&27425;&12395;&12289;JBoss EJB&12450;&12503;&12522;&12465;&12540;&12471;&12519;&12531;&12469;&12540;&12496;&12398;&12452;&12531;&12473;&12488;&12540;&12523;&26041;&27861;&12392;&20351;&29992;&26041;&27861;&12395;&12388;&12356;&12390;&35696;&35542;&12375;&12414;&12375;&12423;&12358;&12290;

     

    Go on to the next trail

     

    &27425;&12398;&12488;&12524;&12452;&12523;&12408;

     

    (c) 2005 JBoss, Inc. All Rights Reserved