j2ee application deployment in weblogic 10.3.doc

Upload: automationqtp123

Post on 02-Jun-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    1/30

    Introduction Ito Weblogic 10.3

    Oracle BEA Weblogic 10.3:

    Oracle BEA Weblogic platform is a unified, simplified, and extensible platform

    for building, extending, integrating, deploying, and managing applications. Weblogicplatform includes a rich development and deployment framework for integrating

    valuable resources and tools into your environment third!party applicationpackages, custom applications, messaging systems, web services, trading partners,

    and more.

    Download link:"ink to download ! Oracle Workshop for Web"ogic #$.% ! &ackage 'nstaller

    http://www.oracle.co/technolog!/"o#tware/product"/ia"/bea$ain.htl

    In"tallation:

    While installing Web"ogic #$.% package, include workshop for weblogic along

    with weblogic server.

    Workshop for weblogic is a set of plug!ins to the Eclipse '(E platform that

    allows you to )uickly and easily create enterprise applications *+OA, -EE fordeployment on a wide variety of servers, including Web"ogic +erver, /omcat, Boss,

    and others.

    0or installation, please refer the below link,

    http://edoc".bea.co/wl"/doc"103/get"tart/o%er%iew.htl

    TCS Confidential

    http://www.oracle.com/technology/software/products/ias/bea_main.htmlhttp://edocs.bea.com/wls/docs103/getstart/overview.htmlhttp://www.oracle.com/technology/software/products/ias/bea_main.htmlhttp://edocs.bea.com/wls/docs103/getstart/overview.html
  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    2/30

    &tep" to con#igure a weblogic "er%er:

    1ight click on new 2 server in the server configuration area in '(E.

    3lick on the link 4click here to launch configuration wi5ard to create a new domain6to create new domain

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    3/30

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    4/30

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    5/30

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    6/30

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    7/30

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    8/30

    3lick on 4create6 to create the domain.

    What is a (omain and why we are creating (omain in weblogic server7

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    9/30

    (omain is logical grouping of resources and services and consists

    of Administration +erver, 8anaged +erver and cluster. /here can only be one

    administration +erver in domain and 5ero to 9 8anaged +erver.

    A domain is the basic administration unit for Web"ogic +erver instances. A

    domain consists of one or more Web"ogic +erver instances *and their associatedresources that you manage with a single Administration +erver. :ou can define

    multiple domains based on different system administrators; responsibilities,application boundaries, or geographical locations of servers. 3onversely, you can use

    a single domain to centrali5e all Web"ogic +erver administration activities.

    Each domain;s configuration is stored in a separate configuration file called

    config.xml, which is stored on the Administration +erver along with other files suchas logs and security files. When you use the Administration +erver to perform a

    configuration task, the changes you make apply only to the domain managed by thatAdministration +erver. /o manage another domain, use the Administration +erver for

    that domain. 0or this reason, the servers instances, applications, and resources inone domain should be treated as being independent of servers, applications, and

    resources in a different domain.:ou cannot perform configuration or deploymenttasks in multiple domains at the same time.

    '!pe" o# "er%er":

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    10/30

    Administration +erver ! A domain always includes one Web"ogic +erver instance thatis configured as an Administration +erver. /he Administration +erver provides a

    central point from which to manage the domain, and it provides access to Web"ogic+erver administration tools.

    8anaged +ervers ! All other Web"ogic +erver instances in a domain are called

    8anaged +ervers.8anaged +ervers host the application components and resources,which are also deployed and managed as part of the domain.

    3lusters ! A domain may also include Web"ogic +erver clusters, which are groups of

    Web"ogic

    +erver instances that work together to provide scalability and high availability for

    applications. 3lusters can improve performance and provide failover should a server

    instance becomes unavailable.

    &tep" in%ol%ed in deplo!ing a ()EE application:

    /he purpose of this document is to explain the deployment of a -EE

    application in Weblogic server #$.%. 'n our sample application user will submit a

    re)uest at front end and the re)uired information is fetched from (B and displayed ina report format.

    -EE pro

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    11/30

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    12/30

    Enter the pro

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    13/30

    +elect -EE modules to be added as part of the ear.

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    14/30

    3lick 0inish button to create a -EE application.

    Our sample -EE application includes a web module and EB module.

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    15/30

    /he structure of -EE application will be as below

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    16/30

    Basically web module will have the source files re)uired by the presentation layer

    and EB module will have different types of e

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    17/30

    An EB module is used to assemble one or more enterprise beans into a singledeployable unit. An EB module is stored in a standard ava archive *A1 file.

    An EB module contains the following

    One or more deployable enterprise beans.

    A deployment descriptor, stored in an Extensible 8arkup "anguage *>8" file./his file declares the contents of the module, defines the structure and

    external dependencies of the beans in the module, and describes how thebeans are to be used at run time.

    We can deploy an EB module as a stand alone application, or combine it with otherEB modules or with Web modules to create a -EE application. An EB module is

    installed and run in an enterprise bean container.

    3reate an EB in weblogic workshop '(E as below

    +ince we are using weblogic workshop '(E for our application development, EB gensupport which is an EB-.$ code generator can be used for creating and deploying

    EBs.

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    18/30

    +elect the package and enter the e

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    19/30

    3lcik 0inish button.

    Employee is created as below

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    20/30

    Once EmployeeBean is created our e

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    21/30

    [email protected]%.org-$$#>8"+chema!instancexsischema"ocation@http

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    22/30

    weblogic!e

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    23/30

    Enter name of the +& file and click finish button.

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    24/30

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    25/30

    3reate a new servlet in webmodule as below!

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    26/30

    Enter the package and name of the servlet

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    27/30

    3lick next button and specify 'nitiali5ation parameters if any and check the 1"

    mappings for the servlet which will be reflected in web.xml.

    *O'E:

    /he web.xml file provides configuration and deployment information for the Web

    components that comprise a Web application. Examples of Web components are

    servlet parameters, servlet and ava+erver &ages *+& definitions, and niform1esource "ocators *1" mappings.

    1" mapping for Employee servlet has been added in web.xml as below!

    TCS Confidential

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    28/30

    In%oking E(B #ro "er%let

    By using component naming environment business method of an EB is invoked from

    webmodule. /his can be achieved by creating an EB reference in web module asbelow!

    ?e

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    29/30

    In%oking the iBA'I&+related ethod" #ro e,b odule:

    'n the e

  • 8/10/2019 J2EE application deployment in weblogic 10.3.doc

    30/30

    /he collection ob