IBM Software Group I Web Sphere Software IBM Web Sphere Application Server v6 WebSphere Rapid Deployment Web Sphere 5uftuesre 叫 ND: DBI%删E IBM Proof of Technology O2005 3M Corporasan IBM Product Introduction Exploration IBM Software Group I Web Sphere software Agenda Web Sphere Rapid Deployment Overview b Annotation-based Programming b Deployment Automation Setting up and using WRD for Deployment Automation Annotation-based Programming Details Usage Scenarios a Summary
1 ® IBM Software Group © 2005 IBM Corporation IBM Proof of Technology IBM Product Introduction + Exploration IBM Software Group | WebSphere Software IBM WebSphere Application Server v6 WebSphere Rapid Deployment IBM Software Group | WebSphere software WebSphere Application Server v6 2 Agenda WebSphere Rapid Deployment Overview Annotation-based Programming Deployment Automation Setting up and using WRD for Deployment Automation Annotation-based Programming Details Usage Scenarios Summary
BM Software Group WebSphere software Section Web Sphere Rapid Deployment(WRD) Overview IBM Software Group I Web Sphere software WRD: Goals For the developer/tester it will Simplify development of Web Sphere applications ewer artifacts to produce and maintain Fewer concepts and technologies to understand Simplify deployment of Web Sphere applications Reduced amount of information that must be collected by user to install application Automated application installation process Automated process for activating incremental changes to an application on running
2 IBM Software Group | WebSphere software WebSphere Application Server v6 3 WebSphere Rapid Deployment (WRD) WebSphere Rapid Deployment (WRD) Overview Section IBM Software Group | WebSphere software WebSphere Application Server v6 4 WRD: Goals For the developer/tester it will: Simplify development of WebSphere applications: Fewer artifacts to produce and maintain Fewer concepts and technologies to understand Simplify deployment of WebSphere applications: Reduced amount of information that must be collected by user to install application Automated application installation process Automated process for activating incremental changes to an application on running server
WRD: What is it and Where does it run? WRD is a collection of Eclipse plug-ins hin IBM Rational l Developer and Application Server Toolkit (AST) applications b Deployment Automation: Uses a headless(non-GUn)mode on a user defined file m directory, defined as a WRD workspace Uses IDE for Annotation-based GUI) for Free- form and 二盖 deployment automation IBM Software Group I Web Sphere software WRD: Annotation-based Programming Developer adds metadata tags into application source code Uses XDoclet tag syntax, where defined he metadata to generate additional artifacts needed to run the application on Minimizes number of artifacts a developer needs to create and understand-user maintains the single artifact tiple Java Source Files Annotation-based programming and application artifacts n name"Hello"type"stately ejbinterface method view ty pemboth Code Hello Bean SSB
3 IBM Software Group | WebSphere software WebSphere Application Server v6 5 WRD: What is it and Where does it run? WRD is a collection of Eclipse plug-ins: Annotation-based programming – used within IBM Rational Web/Application Developer and Application Server Toolkit (AST) applications Deployment Automation: Deployment Automation: Uses a headless (non-GUI) mode on a user defined file GUI) system directory, defined as a WRD workspace Uses headless (nonGUI) for Free-form and Auto-app Install deployment automation Uses IDE for Annotation-based Programming IBM Software Group | WebSphere software WebSphere Application Server v6 6 WRD: Annotation-based Programming Developer adds metadata tags into application source code Uses XDoclet tag syntax, where defined WRD uses the metadata to generate additional artifacts needed to run the application on the Application Server Minimizes number of artifacts a developer needs to create and understand – user maintains the single artifact Single Java Source File with Annotation-based programming HelloHomeSSB HelloSSB HelloBeanSSB HelloLocalSSB HelloLocalHomeSSB Multiple Java Source Files and application artifacts Generates package com.ibm.wrd; /** * @ejb.session name="Hello" type="Stateless" * view-type=both jndi-name="HelloBean" */ public class Hello { /** * @ejb.interface-method view-type=both */ public String hello(String name) { return "Hello: " + name; } } EJB Deployment Code Hello.java
BM Software Group WebSphere software WRD: Deployment Automation Enable automatic installation of applications and modules onto a running Web Sphere Server-local or remote servers Free form application development(initially only available in Headless b Enables a" Hot Directory concept for"file copy and Notepad development and deployment Constructs a well-formed ear file from individual artifacts IBM Software Group I Web Sphere software WRD: Change Detection/Triggering Process Monitors the file system for changes in the WRD user workspace Drive processing operations based on the detection of change in artifacts of Generates new application artifacts from existing artifacts Drive deployment to the targeted WebSphere Application Server Make Update Artifacts if needed (Headless
4 IBM Software Group | WebSphere software WebSphere Application Server v6 7 WRD: Deployment Automation Enable automatic installation of applications and modules onto a running WebSphere Server - local or remote servers Free form application development (initially only available in Headless mode) Enables a “Hot Directory” concept for “file copy” and “Notepad” development and deployment Constructs a well-formed EAR file from individual artifacts Makes key decisions about default settings Support deployment of fine-grained application changes IBM Software Group | WebSphere software WebSphere Application Server v6 8 WRD: Change Detection/Triggering Process Monitors the file system for changes in the WRD user workspace Drive processing operations based on the detection of change in artifacts of the application Generates new application artifacts from existing artifacts Drive deployment to the targeted WebSphere Application Server J2EE Apps (EARs) Config Files Change Detection / Trigger Process Listen for changes Use fine-grained application update Updates Generate Artifacts if needed User-created folder on File System (Headless mode) Make Updates
WRD Styles: autoappinstall and freeform odule arch Applicati Server Java Source J2EE artifacts (Java J2EE artfa IBM Software Group I Web Sphere software Setting up Deployment Automation
5 IBM Software Group | WebSphere software WebSphere Application Server v6 9 WRD Styles: autoappinstall and freeform Add J2EE Applications or Module archives to WRD workspace Change Detection / Trigger Process Application – Installed, Restarted, Reinstalled or Uninstalled autoappinstall Static File (Image, HTML) Servlet, JSP, etc. Java Source Change Detection / Trigger Process WRD generates J2EE artifacts and package Application – Installed, Restarted, Reinstalled or Uninstalled Add J2EE artifacts to WRD workspace – J2EE project structure not required J2EE Apps (EARs) and/or EJB Jars WAR Client Jars Module Archives User creates individual J2EE artifacts (Java Source, Web resources, etc) freeform IBM Software Group | WebSphere software WebSphere Application Server v6 10 Setting up Deployment Automation Setting up Deployment Automation Section
Setting up Deployment Automation Uses the Eclipse framework No User Interface(headless) Set of command line scripts ool included under the lbin directory WRD Configure the WRD Project (Name af project, stye of prajed) Enter in script commands to creates set up watched directory, style, and force automation O WRD Us IBM Software Group I Web Sphere software Configuring a Wrd project The WRD-config command configures a new WRD project. WRD Configuration Style of deployment to Scrip be used: freeform or autoappinsta Name of deployment project environment for WRD bat -project "My Project"-styl -runtime was60-runtimepat File system path for the runtime ID
6 IBM Software Group | WebSphere software WebSphere Application Server v6 11 App Artifacts Setting up Deployment Automation Uses the Eclipse framework No User Interface (headless) Set of command line scripts Tool included under the \bin directory Actual implementation is stored under \deploytool directory Two steps to using WRD Configure the WRD Project (Name of project, style of project) Enable WRD (Start monitoring designated project) Enter in script commands to set up watched directory, style, and force automation App Modules creates 1 2 Users add EAR files, application modules, or application artifacts depending on style chosen J2EE Apps (EARs) IBM Software Group | WebSphere software WebSphere Application Server v6 12 Configuring a WRD Project The WRD-config command configures a new WRD project. WRD-config.bat –project “MyProject” –style “freeform” –runtime “was60” –runtimepath “” WRD Configuration Script Name of deployment project being created Style of deployment to be used: freeform or autoappinstall Target runtime ID indicates runtime environment for WRD File system path for the runtime ID
WRD Configuration Parameters Required Parameters Project: Holds the name of the deployment project Optional Parameters IBM Software Group I Web Sphere software Running WRD After WRD is configured, invoke the WRD command to monitor the specified directory \bin> WRD. bat Additional parameters when running b-monitor: Run WRD with console output ).batch: Runs a build of Wrd workspace and then shuts down
7 IBM Software Group | WebSphere software WebSphere Application Server v6 13 WRD Configuration Parameters usage Displays the program usage monitor Displays log output to the console buildMode Disables console output earExportPath EAR export path properties Displays workspace properties listServers Displays available runtime server target listStyles Displays available deployment styles configPath Configuration file location configData External configuration file deconfigure Prompts deconfiguration runtimePath Target runtime location runtime Target runtime ID configure Prompts configuration rebuild Issues a clean and a rebuild Required Parameters Project: Holds the name of the deployment project Style: Style of deployment to be used autoappinstall freeform Optional Parameters IBM Software Group | WebSphere software WebSphere Application Server v6 14 Running WRD After WRD is configured, invoke the WRD command to monitor the specified directory \bin> WRD.bat Additional parameters when running -monitor: Run WRD with console output -batch: Runs a build of WRD workspace and then shuts down
BM Software Group WebSphere software Section Annotation-based Programming Details IBM Software Group I Web Sphere software Annotation-based Components Annotation Tags Artifacts the tags produce Provides mechanics for processing tags Support annotations using Javadoc-style comments Java Source file
8 IBM Software Group | WebSphere software WebSphere Application Server v6 15 Annotation Annotation-based Programming Details based Programming Details Section IBM Software Group | WebSphere software WebSphere Application Server v6 16 Annotation-based Components Annotation Tags Scope of tags Artifacts the tags produce Processing builder Provides mechanics for processing tags Support annotations using Javadoc-style comments in Java Source file
Annotation-based Programming deta Entered using an @-tag in comment block Code-assists features will be part of IBM Rational Application Developer Provides another option for development publ.c class He114 色少,⊥ntzf v⊥ aw-typearenote E Purete s hegy ioe . t mameg IBM Software Group I Web Sphere software Scope Level Tags can be placed at different scope levels Class- provides information that is application to the Java type or interface as a whole 是 Field-provides information that is specific to the referenced field within the class Method- provides information that is specific to the referenced method
9 IBM Software Group | WebSphere software WebSphere Application Server v6 17 Annotation-based Programming Details Entered using an @-tag in comment block Code-assists features will be part of IBM Rational Application Developer Provides another option for development package com.example.wrd; /** * @ejb.session name="Hello" type="Stateless" view-type=remote jndiname="HelloBean" */ public class Hello { /** * @ejb.interface-method view-type=remote */ public String hello(String name) { return "Hello: " + name; } } Example IBM Software Group | WebSphere software WebSphere Application Server v6 18 Scope Level Tags can be placed at different scope levels Class - provides information that is application to the Java type or interface as a whole. Field - provides information that is specific to the referenced field within the class. Method - provides information that is specific to the referenced method within the class. Java Source File
Tag Definitions T EJB and Web(Supported in the development tooling) b Web Services( Supported only in headless mode) Tag syntax based on XDoclet IBM Software Group I Web Sphere software Relationship to XDoclet: What's the difference? XDoclet is a popular open-source project Supports annotation-based programming Processes annotations as part of build process, when all annotations are read and all artifacts generated Functional overlap, however different processing model WRD supports incremental, on-demand processing Will not directly leverage code from XDoclet project WRD is XDoclet based with Web Sphere extensions
10 IBM Software Group | WebSphere software WebSphere Application Server v6 19 Tag Definitions Tags EJB and Web (Supported in the development tooling) Web Services (Supported only in headless mode) Tag syntax based on XDoclet IBM Software Group | WebSphere software WebSphere Application Server v6 20 Relationship to XDoclet: What’s the difference? XDoclet is a popular open-source project Supports annotation-based programming Processes annotations as part of build process, when all annotations are read and all artifacts generated Functional overlap, however different processing model WRD supports incremental, on-demand processing Will not directly leverage code from XDoclet project WRD is XDoclet based with WebSphere extensions