{"id":5269,"date":"2012-07-18T15:17:32","date_gmt":"2012-07-18T20:17:32","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=5269"},"modified":"2012-08-25T22:41:00","modified_gmt":"2012-08-26T03:41:00","slug":"1z0-102-advanced-deployment","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=5269","title":{"rendered":"WebLogic 11g Advanced Deployment"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Describe_what_a_deployment_plan_does\">Describe what a deployment plan does<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#J2EE_Deployment_Plan\">J2EE Deployment Plan<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Tools_to_Create_a_Deployment_Plan\">Tools to Create a Deployment Plan<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Recommended_Directory_Structure_for_Production_Deployment\">Recommended Directory Structure for Production Deployment<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Create_a_deployment_plan_with_weblogic.PlanGenerator\">Create a deployment plan with weblogic.PlanGenerator<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Create_a_deployment_plan_via_the_admin_console\">Create a deployment plan via the admin console<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Use_a_deployment_plan_with_an_application\">Use a deployment plan with an application<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#For_Example:_update_context-param\">For Example: update context-param<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Deploy_with_production_redeployment_versioned_applications\">Deploy with production redeployment (versioned applications)<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Overview\">Overview<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Configure\">Configure<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Distributing_vs_Redeploying\">Distributing vs Redeploying<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Distribute_an_App\">Distribute an App<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Define_the_staging_modes_stage_nostage_external_stage\">Define the staging modes (stage, nostage, external stage)<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<p><< <a href=\"?p=5253\">Previous<\/a><\/p>\n<span id=\"Describe_what_a_deployment_plan_does\"><h2>Describe what a deployment plan does<\/h2><\/span>\n<span id=\"J2EE_Deployment_Plan\"><h3>J2EE Deployment Plan<\/h3><\/span>\n<p>* An XML file associated with an application<br \/>\n* Resides outside an an application archive<br \/>\n* Finds and replaces values in the J2EE deployment descriptors<br \/>\n* Sets additional configurable properties such as tuning parameters<br \/>\n* Allow deploying same archive to different environments<\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan-300x84.jpg\" alt=\"\" title=\"wls11gadmin_deploy_plan\" width=\"300\" height=\"84\" class=\"aligncenter size-medium wp-image-5272\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan-300x84.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan.jpg 646w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan2-300x185.jpg\" alt=\"\" title=\"wls11gadmin_deploy_plan2\" width=\"300\" height=\"185\" class=\"aligncenter size-medium wp-image-5273\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan2-300x185.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan2.jpg 707w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Tools_to_Create_a_Deployment_Plan\"><h3>Tools to Create a Deployment Plan<\/h3><\/span>\n<p>* Development tools<br \/>\n&#8211; JDev<br \/>\n&#8211; Eclipse<br \/>\n* weblogic.PlanGenerator<br \/>\n* Admin console<\/p>\n<span id=\"Recommended_Directory_Structure_for_Production_Deployment\"><h3>Recommended Directory Structure for Production Deployment<\/h3><\/span>\n<p>* Recommended directory structure:<br \/>\nappReleases<br \/>\n|-appA<br \/>\n|-|-app<br \/>\n|-|-plan<br \/>\n|-|-AppFileOverrides<\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_dir_structure.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_dir_structure-300x109.jpg\" alt=\"\" title=\"wls11gadmin_deploy_dir_structure\" width=\"300\" height=\"109\" class=\"aligncenter size-medium wp-image-5279\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_dir_structure-300x109.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_dir_structure.jpg 346w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Need to specify <em>config-root<\/em> within the plan<\/p>\n<span id=\"Create_a_deployment_plan_with_weblogic.PlanGenerator\"><h2>Create a deployment plan with weblogic.PlanGenerator<\/h2><\/span>\n<p>* Syntax:<\/p>\n<pre lang=\"bash\">\r\njava weblogic.PlanGenerator [options] [application]\r\n<\/pre>\n<p>* Options<br \/>\n-debug<br \/>\n-plan plan_file<br \/>\n-useplan plan_file<br \/>\n-root root_directory<br \/>\n-all<br \/>\n-configurables<br \/>\n-dependencies<br \/>\n-declarations<br \/>\n-dynamics<br \/>\n-none<br \/>\n* Example<\/p>\n<pre lang=\"bash\">\r\njava weblogic.PlanGenerator -all .\/appA.war\r\n<\/pre>\n<span id=\"_3\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_weblogic_plan_gen.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_weblogic_plan_gen-300x119.jpg\" alt=\"\" title=\"wls11gadmin_deploy_plan_gen_weblogic_plan_gen\" width=\"300\" height=\"119\" class=\"aligncenter size-medium wp-image-5277\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_weblogic_plan_gen-300x119.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_weblogic_plan_gen.jpg 643w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* See <a href=\"?p=3602\">this post<\/a> for more examples<\/p>\n<span id=\"Create_a_deployment_plan_via_the_admin_console\"><h2>Create a deployment plan via the admin console<\/h2><\/span>\n<p>* If following recommended directory structure for deployment, <em>plan.xml<\/em> is generated in the <em>plan<\/em> directory once application is deployed.<br \/>\n* Otherwise, make a configuration change to the deployed application and save it when prompted:<\/p>\n<span id=\"_4\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console-300x153.jpg\" alt=\"\" title=\"wls11gadmin_deploy_plan_gen_admin_console\" width=\"300\" height=\"153\" class=\"aligncenter size-medium wp-image-5274\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console-300x153.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console.jpg 688w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_5\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console_2-300x144.jpg\" alt=\"\" title=\"wls11gadmin_deploy_plan_gen_admin_console_2\" width=\"300\" height=\"144\" class=\"aligncenter size-medium wp-image-5275\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console_2-300x144.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console_2.jpg 898w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_6\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_plan_gen_admin_console_3.jpg\" alt=\"\" title=\"wls11gadmin_deploy_plan_gen_admin_console_3\" width=\"215\" height=\"38\" class=\"aligncenter size-full wp-image-5276\" \/><\/a><\/h6><\/span>\n<span id=\"Use_a_deployment_plan_with_an_application\"><h2>Use a deployment plan with an application<\/h2><\/span>\n<span id=\"For_Example:_update_context-param\"><h3>For Example: update context-param<\/h3><\/span>\n<p>* See <a href=\"http:\/\/biemond.blogspot.com\/2009\/04\/using-weblogic-deployment-plan-to.html\">this post<\/a>. Briefly:<br \/>\n&#8211; Define a variable (e.g. <em>wsdlUrl<\/em>) with the <em>new<\/em> value<\/p>\n<pre lang=\"xml\">\r\n  <application-name>helloworld.ear<\/application-name>  \r\n  <variable-definition>  \r\n  <!--  add the wsdl var   -->  \r\n     <variable>   \r\n        <name>wsdlUrl<\/name>  \r\n        <value>http:\/\/prod_svr:7101\/ws_helloworld\/HelloWorldServicePort?WSDL<\/value>  \r\n     <\/variable>  \r\n  <\/variable-definition>  \r\n<\/pre>\n<p>&#8211; Replace web.xml with the new value<\/p>\n<pre lang=\"xml\">\r\n    <module-descriptor external=\"false\">  \r\n      <root-element>web-app<\/root-element>  \r\n      <uri>WEB-INF\/web.xml<\/uri>  \r\n  \r\n      <!-- replace the wsdl url with the deployment url -->  \r\n      <variable-assignment>   \r\n         <name>wsdlUrl<\/name>   \r\n         <xpath>\/web-app\/context-param\/[param-name=\"wsdlUrl\"]\/param-value<\/xpath>   \r\n         <operation>replace<\/operation>   \r\n       <\/variable-assignment>  \r\n    <\/module-descriptor>  \r\n  <\/module-override>  \r\n<\/pre>\n<p>* Deploy with the new plan:<\/p>\n<span id=\"_7\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan-300x142.jpg\" alt=\"\" title=\"wls11gadmin_deploy_use_plan\" width=\"300\" height=\"142\" class=\"aligncenter size-medium wp-image-5280\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan-300x142.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan.jpg 560w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_8\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan2-300x149.jpg\" alt=\"\" title=\"wls11gadmin_deploy_use_plan2\" width=\"300\" height=\"149\" class=\"aligncenter size-medium wp-image-5281\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan2-300x149.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_use_plan2.jpg 716w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Deploy_with_production_redeployment_versioned_applications\"><h2>Deploy with production redeployment (versioned applications)<\/h2><\/span>\n<span id=\"Overview\"><h3>Overview<\/h3><\/span>\n<p>* Supports only HTTP clients and RMI clients<br \/>\n* Existing clients continue to use <em>older version<\/em> of app<br \/>\n* New clients are directed to <em>new version<\/em> of app<br \/>\n* Older version is retired when all existing clients complete their work<\/p>\n<span id=\"Configure\"><h3>Configure<\/h3><\/span>\n<p>* Specify a unique version in<br \/>\n&#8211; <em>META-INF\/MANIFEST.MF<\/em> (preferred)<\/p>\n<pre lang=\"bash\">\r\nManifest-Version: 1.0\r\nCreated-By: 1.5.0_04-b01 (Sun Microsystems Inc.)\r\nWeblogic-Application-Version: v1\r\n<\/pre>\n<p>&#8211; or Admin Console<\/p>\n<span id=\"Distributing_vs_Redeploying\"><h3>Distributing vs Redeploying<\/h3><\/span>\n<p>* Distributing: makes a new version of app available for testing before being released for general consumption<br \/>\n* Redeploying: places the new version immediately into use<\/p>\n<span id=\"Distribute_an_App\"><h3>Distribute an App<\/h3><\/span>\n<p>* Use <em>weblogic.Deployer<\/em> -distribute command to distribute an app<\/p>\n<pre lang=\"bash\">\r\njava weblogic.Deployer -adminurl http:\/\/localhost:7011 -user system\r\n-password weblogic -distribute -name retirement\r\n-source \/myDeployments\/myApplication\/retirement\r\n-appversion 2.0\r\n<\/pre>\n<p>* Start app in Administration mode<\/p>\n<pre lang=\"bash\">\r\n<\/pre>\n<p>* Test the app using admin channel<br \/>\n* When ready, start the app<\/p>\n<pre lang=\"bash\">\r\njava weblogic.Deployer -adminurl http:\/\/localhost:7011 -user system\r\n-password weblogic -start -adminmode -name retirement\r\n-source \/myDeployments\/myApplication\/retirement\r\n-appversion 2.0\r\n<\/pre>\n<p>* Set the retirement timeout for the older version<\/p>\n<pre lang=\"bash\">\r\njava weblogic.Deployer -adminurl http:\/\/localhost:7011 -user system\r\n-password weblogic -start -name retirement\r\n-appversion 2.0 -retiretimeout 300\r\n<\/pre>\n<span id=\"Define_the_staging_modes_stage_nostage_external_stage\"><h2>Define the staging modes (stage, nostage, external stage)<\/h2><\/span>\n<p>* stage: files are copies to the pre-configured stating staging directory for preparation and activation<br \/>\n* nostage: files are deployed from a static location<br \/>\n* external stage: files are copied by a user or a third party tool (e.g. JDev) before deployment<\/p>\n<span id=\"_9\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_staging_mode.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_staging_mode-300x145.jpg\" alt=\"\" title=\"wls11gadmin_deploy_staging_mode\" width=\"300\" height=\"145\" class=\"aligncenter size-medium wp-image-5282\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_staging_mode-300x145.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2012\/07\/wls11gadmin_deploy_staging_mode.jpg 562w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p><a href=\"?p=5286\">Next<\/a> >><\/p>\n<p>[mv_include id=&#8217;3268&#8242;]<\/p>\n<p>* <a href=\"?p=3589\">WebLogic 11g Deployment: Configuring Applications for Production Deployment<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>> [mv_include id=&#8217;3268&#8242;] * WebLogic 11g Deployment: Configuring Applications for Production Deployment<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[107,104],"tags":[180,182,167],"class_list":["post-5269","post","type-post","status-publish","format-standard","hentry","category-certification","category-weblogic11g","tag-1z0-102","tag-deployment","tag-wls"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-1mZ","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5269"}],"version-history":[{"count":10,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5269\/revisions"}],"predecessor-version":[{"id":5705,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/5269\/revisions\/5705"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}