{"id":3589,"date":"2011-10-17T09:05:00","date_gmt":"2011-10-17T14:05:00","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=3589"},"modified":"2011-10-17T09:05:00","modified_gmt":"2011-10-17T14:05:00","slug":"weblogic-11g-deployment-configuring-applications-for-production-deployment","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=3589","title":{"rendered":"WebLogic 11g Deployment: Configuring Applications for Production 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=\"#Overview\">Overview<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Deployment_Configuration_Life_Cycle\">Deployment Configuration Life Cycle<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Dev_Config\">Dev Config<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Export_Config\">Export Config<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Deployment-time_Config\">Deployment-time Config<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Post-deployment_Config\">Post-deployment Config<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Deployment_Plans\">Deployment Plans<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Single_Master_Deployment_Plan\">Single Master Deployment Plan<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Multiple_Deployment_Plans\">Multiple Deployment Plans<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_a_New_Deployment_Plan\">Create a New Deployment Plan<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#AppFileOverrides\">AppFileOverrides<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Load_Application_Properties\">Load Application Properties<\/a>\n\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Overview\"><h2>Overview<\/h2><\/span>\n<p>* Deployer should configure deployment plans <strong>not <\/strong>deployment descriptors.<\/p>\n<span id=\"Deployment_Configuration_Life_Cycle\"><h2>Deployment Configuration Life Cycle<\/h2><\/span>\n<span id=\"Dev_Config\"><h3>Dev Config<\/h3><\/span>\n<p>* Programmer creates:<br \/>\n&#8211; JEE deployment descriptors<br \/>\n&#8211; WebLogic deployment descriptors<\/p>\n<span id=\"Export_Config\"><h3>Export Config<\/h3><\/span>\n<p>* Programmer creates:<br \/>\n&#8211; Deployment plan<\/p>\n<span id=\"Deployment-time_Config\"><h3>Deployment-time Config<\/h3><\/span>\n<p>* Admin or Deployer:<br \/>\n&#8211; Config application to be deployed<\/p>\n<span id=\"Post-deployment_Config\"><h3>Post-deployment Config<\/h3><\/span>\n<p>* Admin or Deployer:<br \/>\n&#8211; Reconfig application by redeploy with new deployment plan.<br \/>\n&#8211; Using Admin Console to update and redeploy an existing deployment plan.<\/p>\n<span id=\"Deployment_Plans\"><h2>Deployment Plans<\/h2><\/span>\n<span id=\"Single_Master_Deployment_Plan\"><h3>Single Master Deployment Plan<\/h3><\/span>\n<p>* Owned by Dev team.<br \/>\n* One master plan for <strong>all<\/strong> environments.<br \/>\n* Generated by programmers.<br \/>\n* Deployers make changes for specific environment.<\/p>\n<span id=\"Multiple_Deployment_Plans\"><h3>Multiple Deployment Plans<\/h3><\/span>\n<p>* Owned by Deployer team.<br \/>\n* One plan for each environment.<br \/>\n* Generated by Deployers for a specific environment.<br \/>\n* Recommended.<\/p>\n<span id=\"Create_a_New_Deployment_Plan\"><h3>Create a New Deployment Plan<\/h3><\/span>\n<p>* Use Admin Console.<br \/>\n* Use weblogic.PlanGenerator.<br \/>\n* Steps:<br \/>\n&#8211; Prepare Deployment Files<\/p>\n<pre lang=\"bash\">\r\nmkdir c:\\sample_root\r\nmkdir c:\\sample_root\\app\r\nmkdir c:\\sample_root\\plan\r\ncp jspExpressionEar.ear c:\\sample_root\\app\r\n<\/pre>\n<p>&#8211; Install application archive (e.g. jspExpressionEar.ear) using Admin Console.<br \/>\n&#8211; Save config changes to a deployment plan (default to Plan.xml in the plan directory).<br \/>\n* See <a href=\"http:\/\/xmlns.oracle.com\/weblogic\/deployment-plan\/1.0\/deployment-plan.xsd\">deployment-plan.xsd<\/a><\/p>\n<span id=\"AppFileOverrides\"><h3>AppFileOverrides<\/h3><\/span>\n<p>* Allows application file overrides.<br \/>\n* Place application-specific files to be overridden in this directory.<br \/>\n* Overrides only classloader.getResourceAsStream() resources not ServletContext.getResourceAsStream() resources.<br \/>\n* To use:<br \/>\n&#8211; Specify a deployment plan.<br \/>\n&#8211; Specify the config-root within in the plan.<br \/>\n&#8211; Provide a config-root\/AppFileOverrides subdirectory.<\/p>\n<pre lang=\"bash\">\r\ninstall-root\/plan\/AppFileOverrides\r\ninstall-root\/plan\/AppFileOverrides\/WebApp1.war\/...\r\ninstall-root\/plan\/AppFileOverrides\/WebApp2.war\/...\r\n<\/pre>\n<span id=\"Load_Application_Properties\"><h3>Load Application Properties<\/h3><\/span>\n<pre lang=\"java\">\r\nProperties myAppProps = new Properties();\r\nInputStream iostream =\r\nThread.currentThread().getContextClassLoader().getResourceAsStream(\"myCfg\/myApp.properties\");\r\nmyAppProps.load(iostream);\r\n<\/pre>\n<p>[mv_include id=&#8221;3569&#8243;]<br \/>\n* <a href=\"http:\/\/download.oracle.com\/docs\/cd\/E17904_01\/web.1111\/e13702\/config.htm\">Configuring Applications for Production Deployment<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview * Deployer should configure deployment plans not deployment descriptors. Deployment Configuration Life Cycle Dev Config * Programmer creates: &#8211; JEE deployment descriptors &#8211; WebLogic deployment descriptors Export Config * Programmer creates: &#8211; Deployment plan Deployment-time Config * Admin or &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=3589\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/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":[104],"tags":[],"class_list":["post-3589","post","type-post","status-publish","format-standard","hentry","category-weblogic11g"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-VT","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3589","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=3589"}],"version-history":[{"count":4,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3589\/revisions"}],"predecessor-version":[{"id":3655,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3589\/revisions\/3655"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}