Click here to load reader

GlassFish v3.1 のご紹介

  • View
    230

  • Download
    4

Embed Size (px)

Text of GlassFish v3.1 のご紹介

  • Oracle Direct Seminar

    GlassFish v3.1

    Java

  • Copyright 2010, Oracle. All rights reserved.

    Agenda

    Java EE 6

    Oracle GlassFish Server v3

    Oracle GlassFish Server v3

    GlassFish v3.1

    2

  • Copyright 2010, Oracle. All rights reserved.

  • Copyright 2010, Oracle. All rights reserved. 4

    2011 2 28

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish Java

    GlassFish OSS

    GlassFish ()

    /Wiki

    /ML

    CDDL/GPLv2

    GlassFish GlassFish Server Open Source Edition ()

    Oracle GlassFish Server (Oracle Fusion Middleware)

    5

    GlassFish

    Server

    http://glassfish.org

    http://www.oracle.com

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish

    GlassFish v1

    Java EE 5

    GlassFish v2

    Java EE 5

    GlassFish v3

    Java EE 6

    OSGi

    6

    2005

    2006

    Ver 1

    2007

    Ver 2

    2009

    Ver 3

    2011

    Ver 3.1

  • Copyright 2010, Oracle. All rights reserved.

    7

    1Download

    /1Year

  • Copyright 2010, Oracle. All rights reserved. 8

    Oracle

    OEM

    /

    Oracle

    GlassFish Server

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish v3.1 2/28

    Java EE 6

    100

    ssh

    GlasFish v2.x

    GlassFish API

    JAX-RS(RESTful API)

    9

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish v2.1.1 34 %

    SSH

    glassfish-lbconfigurator-3_1.zip

    Metro

    Reliable messaging sequence failover

    Secure conversation session failover

    MQ

    10

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish

    11

  • Copyright 2010, Oracle. All rights reserved.12

    GlassFish Server Control

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish Server Control

    Oracle Access Manager (OAM)

    WebSphere/WebLogic JMS

    /

    Oracle DataBase Thin Driver

    MySQL Database Driver

    Coherence *Web ( Ver 3.7) 2011

    DTrace ( JDK 7 )

    13

  • Copyright 2010, Oracle. All rights reserved.

    /

    GlassFish v2.x v3.1

    3.x ( 3.0.x) v3.1

    asadmin start-domain upgrade mydomain

    14

  • Copyright 2010, Oracle. All rights reserved.

    http://glassfish.org

    PDF ZIP

    http://glassfish.org/docs

    http://www.oracle.com/goto/glassfish

    PDF

    http://download.oracle.com/docs/cd/E18930_01/index.htm

    15

    http://glassfish.orghttp://glassfish.org/docshttp://download.oracle.com/docs/cd/E18930_01/index.htm

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish

    16

  • Copyright 2010, Oracle. All rights reserved.

    Java EE 6

  • Copyright 2010, Oracle. All rights reserved.

    Java EE 6

    Web

    Enterprise Platform

    Pruning

    DI, CDI, JAX-RS, Bean Validation

    JPA 2.0, EJB 3.1, JSF 2.0

    18

  • Copyright 2010, Oracle. All rights reserved.

    Java EE 6

    Java EE Spring, Struts, Wicket 3rd

    Servlet Servlet

    web fragment

    19

  • Copyright 2010, Oracle. All rights reserved.

    Java EE 6

    Java EE

    Java EE

    Java EE 6 Web(Web)

    Enterprise Platform(Java EE)

    Full Java EE 6 (Enterprise Platform)

    Web Profile X Profile Y Profile

  • Copyright 2010, Oracle. All rights reserved.

    Web Web

    Servlet

    JSP / EL

    JSTL

    JSF

    Bean Validation

    EJB Lite

    Web

    JPA

    JTA

    DI/CDI

    Managed Beans

    Interceptors

    Common Annotations

  • Copyright 2010, Oracle. All rights reserved.

    Java EE 6

    (Pruning)

    2 API

    (Java EE 7)

    JAX-RPC(->JAX-WS)

    EJB Entity Beans(->JPA)

    JAXR

    JSR-88

  • Copyright 2010, Oracle. All rights reserved. 23

  • Copyright 2010, Oracle. All rights reserved.

    Java EE 6

    Servlet 3.0

    JSP 2.2

    JSF 2.0

    EJB 3.1

    JTA 1.1

    JPA 2.0

    JAX-WS 2.2

    JAXB 2.2

    JAX-RS 1.1

    DI 1.0/CDI 1.0

    Bean Validation 1.0

    24

    JMS 1.1

    JavaMail 1.4

    EL 2.2

    Common Annotations 1.1

    Managed Bean 1.0

    Interceptors 1.1

    JACC 1.4

  • Copyright 2010, Oracle. All rights reserved.

    Servlet 3.0

    JSR-315

    (web.xml)

    web-fragments.xml

    Servlet

    login/logout

    25

    Java SE 5

  • Copyright 2010, Oracle. All rights reserved.

    JavaServer Faces 2.0

    JSR-314

    (MVC) Facelets

    Ajax

    faces-config.xml

    Bean Validation

    Servlet Servlet 3.0 2.5

    26

  • Copyright 2010, Oracle. All rights reserved.

    EJB 3.1

    JSR-318

    EJB 3.1 Lite

    Global JNDI

    Java SEEJB

    27

  • Copyright 2010, Oracle. All rights reserved.

    EJB Lite

    Web Profile

    Lite

    Beans

    CMT/BMT

    Declarative Security

    Interceptors

    Full = Lite +

    Message-Driven Beans

    Web Service Endpoint

    2.x/3.x Remote view

    RMI-IIOP Interoperability

    Timer Service

    Async method call

    2.x Local view

    CMP/BMP Entity

    28

    Full EJB 3.1

  • Copyright 2010, Oracle. All rights reserved.

    Bean Validation 1.0

    Bean

    Null

    JSF 2.0 f:validateRequired, f:validateRegexp

    ManagedBean

    @NotNull, @Size(max=40) String address

    JPA 2.0 Entity

    @NotNull, @Size(max=40) String address

    29

  • Copyright 2010, Oracle. All rights reserved.

    JAX-RS 1.1

    RESTful HTTP API

    POJO API

    HTTP GET, POST, PUT, DELETE

    EJB JAX-RS

    30

  • Copyright 2010, Oracle. All rights reserved.

    Dependency Injection

    DI 1.0 / CDI 1.0

    @Inject @Inject @LoggedIn User user;

    Injection BeanInject

    EJB session beans

    Plain classes with @ManagedBean

    CDI

    beans.xml

    META-INF/WEB-INF/

    31

  • Copyright 2010, Oracle. All rights reserved.

    Oracle GlassFish Server v3

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish v3

    Java EE 6 Java EE 6

    WebFull Platform

    RESTful

    OSGi

    I/O

    unzip(Tomcat)

    Oracle JRockit VM

    33

  • Copyright 2010, Oracle. All rights reserved.

    Oracle GlassFish Server

    Full Platform Java EE API

    Web Full Platform Web

    Web Full Platform

    34

    http://www.oracle.com/technetwork/middleware/glassfish/index.html

  • Copyright 2010, Oracle. All rights reserved.

    Oracle

    35

    C:glassfishv3bin> asadmin version --verbose

    = Oracle GlassFish Server 3.0.1 (build 22)JRE 1.6.0_21

    version

    C:glassfishv3bin> asadmin version --verbose

    = GlassFish Server Open Source Edition 3.0.1 (build 22)JRE 1.6.0_21

    version

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish v3

    36

    IPS

    GlassFish

    (asadmin )

    ,startserv

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish v3

    37

    ()

    GlassFish dtd,xsd

    ( jar )

    OSGi

    JavaDB

    OpenMQ

    IPS

    GUI

    OSGi GlassFish v2.x

    GlassFish v3.1 nodeagent

  • Copyright 2010, Oracle. All rights reserved.

    Web Profile 4 (CPU: 2.4GHz Core 2Duo/4GB)

    38

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish

    39

    GlassFish domain1

    (domain2, domain3 )

    Web

    RESTful

    JMX/AMX domain1

    domain2

    domain3

    domains

  • Copyright 2010, Oracle. All rights reserved.

    Web

    Web http://IP_ADDRESS:PORT/

    4848

    40

    http://IP_ADDRESS:4848

    http://IP_ADDRESS:PORT/

  • Copyright 2010, Oracle. All rights reserved.

    GlassFish $GLASSFISH_INSTALL/bin/asadmin

    > asadmin [] *[[--]]

    41

    asadmin

    --host

    --port

    --user

    --password

    >./asadmin create-domain - help

    asadmin Utility Subcommands create-domain(1)

    NAME

    create-domain - creates a domain

    SYNOPSIS

    create-domain [--help]

    [--adminport adminport]

    [--instanceport instanceport]

  • Copyright 2010, Oracle. All rights reserved.

    RESTful GlassFish v3.0

    RESTful GlassFish v3

    HTML, JSON, XML

    HTTP

    Accept: application/html

    Accept: application/json

    Accept: application/xml

    JAX-RS

    GET

    POST

    42

    http://IP_ADDRESS:4848/management/domain

  • Copyright 2010, Oracle. All rights reserved.

    RESTful

    43

    > curl -u admin:adminadmin -X GET -H "Accept: application/json" http://

    localhost:4848/management/domain/configs/config/server-config/network-

    config/network-listeners/network-listener/http-listener-1

    { "HttpListener1":{"port":"8080", "enabled":"true", "protocol":"http-

    listener-1 , "transport":"tcp", "address":"0.0.0.0", "name":"http-

    listener-1", "jk-enabled :"false", "thread-pool":"http-thread-pool"},

    > curl -u admin:adminadmin -X POST -d "port=18080" -H "Accept: application/

    json" http://localhost:4848/management/domain/configs/config/server-config/

    network-config/network-listeners/network-listener/http-listener-1

    "ht