SlideShare a Scribd company logo
4
Most read
10
Most read
11
Most read
 
Oracle WebLogic Server JDBC Resource Ref Deployment Plan Mapping
Java EE Resource References Java EE provides an abstraction mechanism to externalize resource dependencies JDBC, JMS, etc. Do the Logical: Developer declares a resource-ref entry in application descriptor file Uses resource-ref entry in code Do the Physical Using vendor deployment descriptor, map the resource-ref to a JNDI-NAME of resource on server
Java EE Resource References web.xml <resource-ref> <description>A logical reference to a DataSource <res-ref-name> jdbc/LogicalDS </res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> weblogic.xml <weblogic-web-app> <resource-description> <res-ref-name> jdbc/LogicalDS </res-ref-name> <jndi-name>MAP_THIS_DS</jndi-name> </resource-description> </weblogic-web-app>
Java EE Resource References Web application Looks up logical DataSource from Java EE ENC Or is injected as a named resource No direct reference to physical database location DataSource logicalds = null; String DS_NAME = &quot; java:comp/env/jdbc/LogicalDS &quot;; Connection c = null; try  { Context ic = new InitialContext(); logicalds = (DataSource)ic.lookup(DS_NAME); ... } catch(Exception e) { ... }
Hey … That’s Still Tightly Coupled If weblogic.xml contains JNDI-NAME reference then EAR file needs to be edited to change the value Defeats the purpose a little … weblogic.xml <weblogic-web-app> <resource-description> <res-ref-name> jdbc/LogicalDS </res-ref-name> <jndi-name>DS_NEEDS_MAPPING</jndi-name> </resource-description> </weblogic-web-app>
The Deployment Plan Deployment plan fully externalizes the settings for an application Override/change settings for the application Separate to the application  1   1, 1   M relationship to an application Domain specific or agnostic Fed into the deployment process Command line option, specified in console Changed deployment plan is read on update operation
WLS Deployment Plan Tooling Tooling provided to “generate” a default deployment plan Usage: java weblogic.PlanGenerator [options] [Path to application] where options include: -plan <myplan.xml> Name of plan to create. If not specified a default   will be used.   -dependencies  (default) create plan that exports all dependency   properties -declarations  create plan that exports all declaration properties -configurables  create plan that exports all configurable properties   except for dependencies and declarations -all  create plan that exports all changeable properties
WLS Deployment Plan Tooling Example: $java weblogic.PlanGenerator -dependencies  -plan raw-plan.xml jdbc-resource-ref.ear Generating plan for application jdbc-resource-ref.ear Export option is: dependencies Exporting properties... Saving plan to raw-plan.xml... <18/12/2008 04:46:25 PM CST> <Info> <J2EE Deployment SPI>  <BEA-260072> <Saved configuration for application, jdbc-resource-ref.ear>
WLS Deployment Plan Tooling Resulting deployment plan: Variable created for declared resource-ref entry <deployment-plan> <application-name>jdbc-resource-ref.ear</application-name> <variable-definition> <variable> <name>   ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680   </name> <value xsi:nil=&quot;true&quot;></value> </variable> </variable-definition>
WLS Deployment Plan Tooling Resulting deployment plan: Mapping generated for resource-ref element <module-override> <module-name>jdbc-resource-ref-web.war</module-name> <module-descriptor> <root-element>weblogic-web-app</root-element> <variable-assignment> <name>   ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680   </name> <xpath> /weblogic-web-app/resource-description/[res-ref-name=&quot;jdbc/LogicalDS&quot;]/jndi-name   </xpath> </variable-assignment> </module-descriptor> </module-override>
Using a Deployment Plan Modify variable values to reflect physical resources  of target server Update value with JNDI name Modify module-descriptor to specify required behavior with variable value add, remove, replace
Example  Deployment Plan <deployment-plan> <application-name>jdbc-resource-ref.ear</application-name> <variable-definition> <variable> <name> ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680 </name>   <value> jdbc/XEDS </value> </variable> </variable-definition> <module-override> <module-name>jdbc-resource-ref-web.war</module-name> <module-descriptor> <root-element>weblogic-web-app</root-element> <variable-assignment> <name> ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680 </name> <xpath> /weblogic-web-app/resource-description/[res-ref-name=&quot;jdbc/LogicalDS&quot;]/jndi-name </xpath> <operation> replace </operation> </variable-assignment> </module-descriptor> </module-override>
Deployment Process Deployment  without  deployment plan Setting in weblogic.xml is used $java weblogic.Deployer -username weblogic -password weblogic -url t3://localhost:7001 -deploy -name jdbc-resource-ref jdbc-resource-ref.ear
Deployment Process Deployment  with  deployment plan Setting in deployment plan is used $java weblogic.Deployer -username weblogic -password weblogic -url t3://localhost:7001 -deploy -name jdbc-resource-ref  –plan raw-plan.xml  jdbc-resource-ref.ear
Same App, Multi WLS Instances PAUL GEORGE YOKO jdbc/Primary jdbc/Failover jdbc/Primary jdbc/Failover Primary DP Failover DP Primary DB Failover DB MILLS JOHN jdbc/Primary jdbc/Failover RINGO jdbc/Primary jdbc/Failover jdbc/LogicalDS  jdbc/Primary jdbc/LogicalDS  jdbc/Failover EAR jdbc/LogicalDS
Summary  Allow externalization of resource declarations Use variable substitution, append operations Supplied during deployment process for all deployment tools/utilities (ant, weblogic.Deployer, console) Powerful capability!
 

More Related Content

PPT
Oracle WebLogic Server Basic Concepts
PPT
WebLogic Scripting Tool Overview
PPTX
Weblogic application server
PDF
Learn Oracle WebLogic Server 12c Administration
PDF
Oracle Web Logic server
PDF
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
PDF
Maven 3 Overview
PPTX
Weblogic12 c installation guide
Oracle WebLogic Server Basic Concepts
WebLogic Scripting Tool Overview
Weblogic application server
Learn Oracle WebLogic Server 12c Administration
Oracle Web Logic server
Disaster Recovery with MySQL InnoDB ClusterSet - What is it and how do I use it?
Maven 3 Overview
Weblogic12 c installation guide

What's hot (20)

PPTX
Introduction to Maven
PPTX
AlwaysON Basics
PDF
The Oracle RAC Family of Solutions - Presentation
PDF
Analyzing and Interpreting AWR
PPTX
Weblogic
PDF
Presentation database security audit vault & database firewall
PDF
WebLogic FAQs
PPTX
Oracle Enterprise manager SNMP and Exadata
PDF
Oracle RAC 19c with Standard Edition (SE) 2 - Support Update
PDF
MAA Best Practices for Oracle Database 19c
PPT
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
PDF
Migration to Oracle Multitenant
PPTX
02-Active Directory Domain Services.pptx
PDF
Configuration Management in Ansible
PDF
Oracle RAC 19c and Later - Best Practices #OOWLON
PDF
IBM Datapower Security Scenario with JWS & JWE
PDF
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
PDF
Binary Authorization in Kubernetes
PPTX
Hit Refresh with Oracle GoldenGate Microservices
PPT
2.1 users & groups
Introduction to Maven
AlwaysON Basics
The Oracle RAC Family of Solutions - Presentation
Analyzing and Interpreting AWR
Weblogic
Presentation database security audit vault & database firewall
WebLogic FAQs
Oracle Enterprise manager SNMP and Exadata
Oracle RAC 19c with Standard Edition (SE) 2 - Support Update
MAA Best Practices for Oracle Database 19c
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Migration to Oracle Multitenant
02-Active Directory Domain Services.pptx
Configuration Management in Ansible
Oracle RAC 19c and Later - Best Practices #OOWLON
IBM Datapower Security Scenario with JWS & JWE
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Binary Authorization in Kubernetes
Hit Refresh with Oracle GoldenGate Microservices
2.1 users & groups
Ad

Similar to WebLogic Deployment Plan Example (11)

PPT
JEE5 New Features
PPT
7) packaging and deployment
DOCX
Web Sphere Application Server Features
PPT
SHOW104: Practical Java
DOC
Weblogic.deployer usage
PPT
5) running applications
PPT
Juggling Java EE with Enterprise Apache Maven
PDF
Philly Spring UG Roo Overview
PDF
Connect2014 Show104: Practical Java
PDF
IBM Solutions '99 XML and Java: Lessons Learned
PPTX
JEE5 New Features
7) packaging and deployment
Web Sphere Application Server Features
SHOW104: Practical Java
Weblogic.deployer usage
5) running applications
Juggling Java EE with Enterprise Apache Maven
Philly Spring UG Roo Overview
Connect2014 Show104: Practical Java
IBM Solutions '99 XML and Java: Lessons Learned
Ad

More from James Bayer (8)

PPTX
Cf summit2014 roadmap
PPTX
Cf application manifest
PPTX
WebLogic Server Work Managers and Overload Protection
PPT
JPA and Coherence with TopLink Grid
PDF
64 bit arch
PPT
Application Grid Dev with Coherence
PPT
App Grid Dev With Coherence
PPT
App Grid Dev With Coherence
Cf summit2014 roadmap
Cf application manifest
WebLogic Server Work Managers and Overload Protection
JPA and Coherence with TopLink Grid
64 bit arch
Application Grid Dev with Coherence
App Grid Dev With Coherence
App Grid Dev With Coherence

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Tartificialntelligence_presentation.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Encapsulation theory and applications.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
August Patch Tuesday
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Approach and Philosophy of On baking technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
A Presentation on Artificial Intelligence
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
SOPHOS-XG Firewall Administrator PPT.pptx
Tartificialntelligence_presentation.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Programs and apps: productivity, graphics, security and other tools
cloud_computing_Infrastucture_as_cloud_p
Encapsulation theory and applications.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
August Patch Tuesday
Advanced methodologies resolving dimensionality complications for autism neur...
OMC Textile Division Presentation 2021.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Approach and Philosophy of On baking technology
Building Integrated photovoltaic BIPV_UPV.pdf
1. Introduction to Computer Programming.pptx
A comparative analysis of optical character recognition models for extracting...

WebLogic Deployment Plan Example

  • 1.  
  • 2. Oracle WebLogic Server JDBC Resource Ref Deployment Plan Mapping
  • 3. Java EE Resource References Java EE provides an abstraction mechanism to externalize resource dependencies JDBC, JMS, etc. Do the Logical: Developer declares a resource-ref entry in application descriptor file Uses resource-ref entry in code Do the Physical Using vendor deployment descriptor, map the resource-ref to a JNDI-NAME of resource on server
  • 4. Java EE Resource References web.xml <resource-ref> <description>A logical reference to a DataSource <res-ref-name> jdbc/LogicalDS </res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> weblogic.xml <weblogic-web-app> <resource-description> <res-ref-name> jdbc/LogicalDS </res-ref-name> <jndi-name>MAP_THIS_DS</jndi-name> </resource-description> </weblogic-web-app>
  • 5. Java EE Resource References Web application Looks up logical DataSource from Java EE ENC Or is injected as a named resource No direct reference to physical database location DataSource logicalds = null; String DS_NAME = &quot; java:comp/env/jdbc/LogicalDS &quot;; Connection c = null; try { Context ic = new InitialContext(); logicalds = (DataSource)ic.lookup(DS_NAME); ... } catch(Exception e) { ... }
  • 6. Hey … That’s Still Tightly Coupled If weblogic.xml contains JNDI-NAME reference then EAR file needs to be edited to change the value Defeats the purpose a little … weblogic.xml <weblogic-web-app> <resource-description> <res-ref-name> jdbc/LogicalDS </res-ref-name> <jndi-name>DS_NEEDS_MAPPING</jndi-name> </resource-description> </weblogic-web-app>
  • 7. The Deployment Plan Deployment plan fully externalizes the settings for an application Override/change settings for the application Separate to the application 1  1, 1  M relationship to an application Domain specific or agnostic Fed into the deployment process Command line option, specified in console Changed deployment plan is read on update operation
  • 8. WLS Deployment Plan Tooling Tooling provided to “generate” a default deployment plan Usage: java weblogic.PlanGenerator [options] [Path to application] where options include: -plan <myplan.xml> Name of plan to create. If not specified a default will be used. -dependencies (default) create plan that exports all dependency properties -declarations create plan that exports all declaration properties -configurables create plan that exports all configurable properties except for dependencies and declarations -all create plan that exports all changeable properties
  • 9. WLS Deployment Plan Tooling Example: $java weblogic.PlanGenerator -dependencies -plan raw-plan.xml jdbc-resource-ref.ear Generating plan for application jdbc-resource-ref.ear Export option is: dependencies Exporting properties... Saving plan to raw-plan.xml... <18/12/2008 04:46:25 PM CST> <Info> <J2EE Deployment SPI> <BEA-260072> <Saved configuration for application, jdbc-resource-ref.ear>
  • 10. WLS Deployment Plan Tooling Resulting deployment plan: Variable created for declared resource-ref entry <deployment-plan> <application-name>jdbc-resource-ref.ear</application-name> <variable-definition> <variable> <name> ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680 </name> <value xsi:nil=&quot;true&quot;></value> </variable> </variable-definition>
  • 11. WLS Deployment Plan Tooling Resulting deployment plan: Mapping generated for resource-ref element <module-override> <module-name>jdbc-resource-ref-web.war</module-name> <module-descriptor> <root-element>weblogic-web-app</root-element> <variable-assignment> <name> ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680 </name> <xpath> /weblogic-web-app/resource-description/[res-ref-name=&quot;jdbc/LogicalDS&quot;]/jndi-name </xpath> </variable-assignment> </module-descriptor> </module-override>
  • 12. Using a Deployment Plan Modify variable values to reflect physical resources of target server Update value with JNDI name Modify module-descriptor to specify required behavior with variable value add, remove, replace
  • 13. Example Deployment Plan <deployment-plan> <application-name>jdbc-resource-ref.ear</application-name> <variable-definition> <variable> <name> ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680 </name> <value> jdbc/XEDS </value> </variable> </variable-definition> <module-override> <module-name>jdbc-resource-ref-web.war</module-name> <module-descriptor> <root-element>weblogic-web-app</root-element> <variable-assignment> <name> ResourceDescription_jdbc/LogicalDS_JNDIName_12295809854680 </name> <xpath> /weblogic-web-app/resource-description/[res-ref-name=&quot;jdbc/LogicalDS&quot;]/jndi-name </xpath> <operation> replace </operation> </variable-assignment> </module-descriptor> </module-override>
  • 14. Deployment Process Deployment without deployment plan Setting in weblogic.xml is used $java weblogic.Deployer -username weblogic -password weblogic -url t3://localhost:7001 -deploy -name jdbc-resource-ref jdbc-resource-ref.ear
  • 15. Deployment Process Deployment with deployment plan Setting in deployment plan is used $java weblogic.Deployer -username weblogic -password weblogic -url t3://localhost:7001 -deploy -name jdbc-resource-ref –plan raw-plan.xml jdbc-resource-ref.ear
  • 16. Same App, Multi WLS Instances PAUL GEORGE YOKO jdbc/Primary jdbc/Failover jdbc/Primary jdbc/Failover Primary DP Failover DP Primary DB Failover DB MILLS JOHN jdbc/Primary jdbc/Failover RINGO jdbc/Primary jdbc/Failover jdbc/LogicalDS  jdbc/Primary jdbc/LogicalDS  jdbc/Failover EAR jdbc/LogicalDS
  • 17. Summary Allow externalization of resource declarations Use variable substitution, append operations Supplied during deployment process for all deployment tools/utilities (ant, weblogic.Deployer, console) Powerful capability!
  • 18.