weblogic training | oracle weblogic online training | weblogic server course
Weblogic
-
Upload
sudeeporcl -
Category
Documents
-
view
1.015 -
download
3
Transcript of Weblogic
Oracle WebLogic: The next “Big Thing” for Apps DBA’s
Sudeep Raj, Team LeadMarch, 2013
About Me
• Oracle Apps DBA/Team Lead at Pythian Group Inc.
• 10 Years of IT experience• OCP Certified• @sudeeporcl• http://www.linkedin.com/in/sudeepraj1
Agenda
• Overview of WebLogic• OC4J v/s WebLogic• Understanding the WebLogic Terminologies and
architecture• Exploring Administration Tools• WLST Scripting Tool• JVM Tuning • Tips and How-To’s• Hands on Session with WebLogic 12c
Evolution of WebLogic
WebLogic Inc started in 1995 credited with creating the first J2EE application server, the WebLogic Application Server.
BEA Systems Acquired WebLogic Inc in 1998
Oracle Acquired BEA Systems in 2008
What is WebLogic?
OC4J v/s WeLogic
Oracle Containers for Java WebLogic
Multiple JVMs One JVM
Runs on wide range of ports Runs on a single port
No HTTP listener Configured with HTTP listener
Web Server is mandatory Not Mandatory
Application Server cluster topology
WebLogic Server domain
OC4J groups WebLogic Server clusters
Managed by OPMN Not managed by OPMN
Oracle Enterprise Manager Application Server Control
Oracle WebLogic Server Administration Console
OC4J v/s WeLogic
OC4J v/s WeLogic
• WebLogic Server Instance
• WebLogic Server Domain
• Administration Server
• Managed Server
• WebLogic Server Cluster
• Machine
• Node Manager
Understanding the Terminologies
WebLogic Server Instance
• WebLogic Server Instance is a Java Virtual Machine process runs Java code.
• Each domain must have one server instance
• One instance serves as Admin Server and rest as Managed Servers.
• Typical development environment is of one WebLogic instance
WebLogic Server Domain
• A Domain is a logically related group of WebLogic Server resources that you manage as a unit.
• A domain provides one point of administration and each domain must create its own set of resources.
• A domain consists of one of more WebLogic server instances
• A domain lets you easily deploy applications across multiple WebLogic Server instances
• WebLogic Server stores the configuration information of a domain in config.xml file
Administration Server
• Designed for managing the domain rather than running applications.
• One-to-one relationship between domains and Admin Server
• Manages the domain configuration
• Admin Server hosts the Administration Console used for configuring, monitoring and managing a domain
• In Production environment best practice is to separate the application work with administrative work. You can firewall the Admin Server separately to avoid external client access
Managed Server
• Any additional servers you create after the creation of default Admin Server are called Managed Servers
• Contacts Admin Server only during the startup to get configuration and deployment settings
• Managed servers operates independent of the Admin Server after the startup
• Recommended to deploy applications to Managed Servers
WebLogic Server Cluster
• Consists of multiple managed servers that runs simultaneously
• WebLogic Cluster provide increase reliability, scalability through load distribution and high availability
• Version of WebLogic server for all Managed Server instance in a cluster should be same
• A Cluster always belongs to a single WebLogic Server Domain.
• Each machine must have a static IP address and must not assign IP addresses dynamically to a cluster member though DHCP
Node Manager
• Purely optional, lets you remotely manage both Admin and Managed Servers within that domain.
• Oracle recommends to install Node Manager on each of the machines that hosts Managed Server
• Each installation of WebLogic Server comes with Node Manager
• When you start or stop a Managed Server through Admin console, the admin server first access Node Manager, which in turn performs the actual task.
• Is available as either a Java-based or a script-based process
Machine
• In WebLogic context, Machine is a logical representation of computer that hosts one or more WebLogic server instances.
• Runs a supported operating system platform
• A Machine could be a physical or virtual server that hosts Admin or Managed Server
Administration Tools
• Admin console
• WebLogic Scripting Tool
• Configuration Wizard
• Configuration Template Builder
• Node Manager
How does WebLogic Startup script works?
• Startup sequence
• Start $DOMAIN_HOME/startWebLogic.sh• Calls $DOMAIN_HOME/bin/startWebLogic.sh
• Calls $DOMAIN_HOME/bin/bin/setDomainEnv.sh• Calls $WL_HOME/common/bin/commEnv.sh
• setDomainEnv.sh will set other memory parameters• Returns to $DOMAIN_HOME/bin/startWebLogic.sh
• $DOMAIN_HOME/bin/startWebLogic.sh organizes the parameters and calls java to startup the JVM and start Weblogic Server
• Boot Identity File• Lock file
$DOMAIN_HOME/servers/<ServerName>/tmp/<ServerName>.lok
Invoking WLST
• Java weblogic.WLST
• Source the environment . ./setWLSEnv.sh which is under $MW_HOME/wlserver_10.3/server/bin
• [oracle@srfm bin]$ java weblogic.WLST Initializing WebLogic Scripting Tool (WLST) ... Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline>
Starting NodeManager via WLST
wls:/offline> startNodeManager(verbose='true',NodeManagerHome='/u01/app/middleware/wlserver_12.1/common/nodemanager', ListenPort=‘5555', ListenAddress=‘vmlinux3.lab.com')
wls:/offline> nmConnect('weblogic','welcome1','vmlinux3',5555,'pythian_domain','/u01/app/middleware/user_projects/domains/pythian_domain','ssl')Connecting to Node Manager ...Successfully Connected to Node Manager.wls:/nm/pythian_domain>
wls:/nm/pythian_domain> nmServerStatus('ManagedServer_1');RUNNINGwls:/nm/pythian_domain> nmServerLog()wls:/nm/pythian_domain> stopNodeManager()
Sample WLST script to monitor Server state.
Sample WLST script to monitor Server state.
How to change port in WebLogic?
• Option1: Change the port information via WebLogic console.
• Option 2: Update config.xml, modify listen-port
• Update ADMIN_URL on startManagedWebLogic.sh, stopWebLogic.sh and stopManagedWebLogic.sh scripts
JVM Tuning
• Oracle recommends– Sun JDK with the HotSpot Client JVM for Development– Oracle JRockit JDK for Production due to superior performance
• JAVA_HOME and JAVA_VENDOR• Tuning Java heap size
java.lang.OutOfMemoryError <<no stack trace available>> java.lang.OutOfMemoryError <<no stack trace available>>
• Garbage Collection• setDomainEnv.sh >>>
JVM Tuning
• wls:/pythian_domain/domainRuntime> domainRuntime()• wls:/pythian_domain/domainRuntime> cd('ServerRuntimes/AdminServer')• wls:/pythian_domain/domainRuntime/ServerRuntimes/AdminServer>
cd('JVMRuntime/AdminServer')• wls:/pythian_domain/domainRuntime/ServerRuntimes/AdminServer/JVMRuntime/AdminServer>
ls()
-r-- HeapFreeCurrent 190211496-r-- HeapFreePercent 72-r-- HeapSizeCurrent 324927488-r-- HeapSizeMax 477233152-r-- JavaVMVendor Sun Microsystems Inc.-r-- JavaVendor Sun Microsystems Inc.-r-- JavaVersion 1.6.0_29-r-- Name AdminServer-r-- OSName Linux-r-- OSVersion 2.6.18-194.el5-r-- Type JVMRuntime-r-- Uptime 5341693
-r-x preDeregister Void :
• wls:/pythian_domain/domainRuntime/ServerRuntimes/AdminServer/JVMRuntime/AdminServer>
How to remove a domain?
• Remove entry from nodemanager.domains
• Delete a domain folder
• Make sure services are down• Remove domain entry from $MW_HOME/domain-registry.xml
Hands on Session
• Install WebLogic 12c on Linux• Configure WebLogic Domain• Configuring Servers, Machines • Cluster Configuration• Using Admin console• Starting Servers using Node Manager• Configuring Data Sources• Deploying/Undeploying simple Web Application• Exploring important files and folders
Thank you - Q&A