An Introduction to WebLogic
Administration
WEBLOGIC 11G : WHAT IS IT?
Weblogic 10.3.3-10.3.6 = 11g
Java EE 5 compliant Application Server
Deployment of compliant App Archives (.ear,.war,.jar) Services / Resources
JDBC Data Sources – Database connectivity JMS topics and queues - Messaging
JNDI resources Web Services Security Providers
WEBLOGIC : HIGH LEVEL ARCHITECTURE
Domain - logical grouping of WebLogic services
Administration Server – maintains domain configuration Managed Servers – host applications
Node Manager – host service management
WEBLOGIC : ADMIN SERVER
“Special “ server process Runs as a java process
Hosts Weblogic Console application
http://<mywlhost>:7001/console
Hosts Fusion Middleware Control for FMW apps
http://<mywlhost>:7001/em
Maintains domain configuration in config.xml Central configuration point
WEBLOGIC : NODE MANAGER
Remote control of WebLogic server processes
Used by Admin Server to start Managed Servers
Machines in Weblogic configuration
Independent of domain (with 11g)
Automated server management
Restart
WEBLOGIC : NODE MANAGER VERSIONS
Java Based Node Manager
Optional one-way SSL between client and server (default on) Runs as Java process listening on port 5556 by default
nm_password.properties verification for nmConnect()
Script Based Node Manager
WEBLOGIC : NODE MANAGER PROPERTIES
Configured in nodemanager.properties file
StartScriptEnabled (set to true, false by default) StartScriptName (custom start script name)
NativeVersionEnabled (use shared OS libraries) SecureListener (Enables SSL, true by default)
WEBLOGIC / FMW: KEY DIRECTORY VARIABLES
MW_HOME (Middleware Home)
Parent directory for Oracle Software, Java and Weblogic
WL_HOME (Weblogic Home) JAVA_HOME (Java JDK Home) ORACLE_HOME
Oracle Software binaries
DOMAIN_HOME
WebLogic Domain Configuration
ORACLE_INSTANCE
WEBLOGIC : EXERCISE 1 - INSTALLATION
Obtain VirtualBox VM
Prepare for install (run as root)
Install JDK (run as oracle)
WEBLOGIC : EXERCISE 1 - INSTALLATION
Weblogic Silent install (run as oracle)
Manual install (run as oracle)
cd /u01/app/oracle/product/Middleware java -Xmx1024m \
-jar /software/wls1036_generic.jar -mode=silent \ -silent_xml=/software/silent_linux_1036.xml
cd /u01/app/oracle/product/Middleware
WEBLOGIC : MODES
Production Mode
Lock and Edit required for domain changes No auto-deploy
Password required to start by default
Development Mode
No lock required for domain changes Application auto-deploy
WEBLOGIC: EXERCISE 2 - DOMAIN CONFIGURATION
Run the Domain creation tool
Select options
cd /u01/app/oracle/product/Middleware/wlserver_10.3/common/bin ./config.sh
Domain Source
-> 2|Choose custom template
Domain Template Location
WEBLOGIC: EXERCISE 2 - DOMAIN CONFIGURATION
Check contents of Domain
Start Node Manager
Start Admin Server
cat $MW_HOME/domain-registry.xml cd $MW_HOME/user_projects/domains ls base_domain
which startNodeManager.sh
nohup startNodeManager.sh > /dev/null 2&1 &
cd $MW_HOME/user_projects/domains/base_domain/bin ./startWebLogic.sh
WEBLOGIC : CONFIGURE AUTO START
Configure boot.properties
Start Admin Server without prompt
Verify startup is OK
cd $DOMAIN_HOME
nohup ./startWebLogic.sh > AdminServer.out 2>&1 &
WEBLOGIC: EXERCISE 3 - CREATE A MANAGED SERVER
Login to Admin console http://<your-ip>:7001/console Navigate to
Create New Server
Start Managed Server
Base_domain
> Environment
> Servers
Server Name: mserver01
Server Listen Address: 192.168.56.50 Server Listen Port: 8001
Standalone Server: Checked
cd $MW_HOME/user_projects/domains/base_domain/bin
WEBLOGIC : APPLICATION ARCHIVES
Web Archive (WAR file)
web.xml Web app descriptor
weblogic.xml WebLogic specific web descriptor
Enterprise Archive (EAR file)
application.xml JEE descriptor
WEBLOGIC : SCRIPTING TOOL - WLST
Scripts to automate administrative functions Python syntax
Jython – Java implementation of Python Command query shell
Weblogic and FMW extensions JMX communication
WLST : BASIC COMMANDS
Navigation Commands
Status commands
Easy Syntax
Use for interactive CLI
Brackets and quotes not required
easeSyntax()
cd(), ls(), pwd()
WLST : OFFLINE MODE
Template management
Domain creation
Domain configuration changes
Connect to Node Manager, Admin Server
nmConnect(), connect(), disconnect()
readDomain(), updateDomain(), writeDomain(), closeDomain() createDomain()
WLST : ONLINE MODE
Application Deployments
Control
Recording features
Advanced features
Data Source configuration Mbean configuration
Fusion Middleware Specifc commands
deploy(), redeploy(), undeploy()
startRecording(), stopRecording()
DIAGNOSTICS : LOG LOCATIONS
Node Manager Logs
${WL_HOME}/nodemanager/log
Admin Server Logs
${DOMAIN_HOME}/servers/AdminServer/logs
Managed Server Logs
${DOMAIN_HOME}/servers/<MSERVER_NAME>/logs
OPMN Managed
DIAGNOSTICS : JDK TOOLS
jps – show processes jstack – thread dumps jmap – show heap usage jinfo – environment settings jstat – statistics
DIAGNOSTICS : ADMIN CONSOLES
Weblogic Admin Console
Stuck and hogging threads Heap size
Thread dumps
JDBC connection pool health
JMS Queues
Logging Control
Fusion Middleware Control
FMW specific monitoring
Cloud Control
JVM MEMORY TUNING PARAMETERS
Debugging