Professional Documents
Culture Documents
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
3
.......................................................................................................................
.......................................................................................................................3
WebLogic .......................................................................................................................
WebLogic .......................................................................................................... 3
WebLogic ....................................................................................................... 3
Weblogic .........................................................................................3
Weblogic10g/11g ........................................................................................................4
WebLogic ........................................................................................................... 4
Weblogic .................................................................................................5
WebLogic ............................................................................5
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
ie
s
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
1 WebLogic
WebLogic bea
Web JavaEE WebLogic Server
Web
WebLogic
ie
s
1.1
hn
ol
og
Te
c
Enterprise application
WebLogic
ijin
gL
an
di
ng
1.2
Be
bea
2008 7
4000 68 Oracle
bea Oracle 8
2
,Oracle BEA
Weblogic Oracle WebLogic Server 11g Rel1
1.3
Weblogic
Weblogic
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
Java
IBM DB2
MySQL
Sybase
Linux
AIX
HP-UX
Solaris
Windows
Java 6
Java 5
ie
s
hn
ol
og
Te
c
1-1
1.4
Weblogic10g/11g
ijin
gL
an
di
ng
HTTP - Web2.0
WebLogic
Be
1.5
WebLogic Platform
OracleWebLogic IntegrationWeblogic
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
Oracle
Welbogic
Integration
hn
ol
og
JV M
Oracle Weblogic JRockit
ie
s
Oracle Weblogic Workshiop
Oracle
Weblogic
Portal
1-1Weblogic
Weblogic
Weblogic
Te
c
1.6
ijin
gL
an
di
ng
1)
WebLogic Server
2) Server
3)
4) Weblogic
1.7
WebLogic
Be
TomcatJBossIBM WebSphere
Weblogic J2EE ,
,
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.................................................................................
2 Windows WebLogic .................................................................................
.................................................................................33
2.1
................................................................................................................. 3
2.2
WebLogic ...................................................................................................... 3
2.2.1
........................................................................................................................ 3
2.2.2
................................................................................................................ 4
2.2.3
............................................................................................................ 4
2.2.4
................................................................................................................ 5
2.2.5
................................................................................................................ 5
2.2.6
........................................................................................................ 6
2.2.7
................................................................................................................ 6
2.2.8
................................................................................................................ 7
2.2.9
........................................................................................................................ 7
2.2.10
........................................................................................................................ 8
2.3
WebLogic .......................................................................................................... 8
2.3.1 QUICK START ..................................................................................................8
2.3.2
................................................................................................................ 9
2.3.3
...................................................................................................................... 10
2.3.4
.......................................................................................................... 10
2.3.5
.......................................................................................... 11
2.3.6
JDK...................................................................................... 12
2.3.7
.............................................................................................................. 12
2.3.8
.......................................................................................................... 13
2.3.9
.............................................................................................................. 13
2.3.10
.................................................................................................................. 14
2.4
WebLogic Server..........................................................................................................14
2.5
............................................................................................................................... 15
2.6
Linux JDK................................................................................................................ 16
2.6.1
.............................................................................................................. 16
2.6.2 JDK ...................................................................................................................... 16
2.6.2.1
weblogic ................................................................................................. 16
2.6.2.2
.................................................................................................. 16
2.6.2.3
Weblogic .................................................................16
2.6.2.4
.......................................................... 17
2.6.2.5
.......................................................................................................... 18
2.6.2.6
..........................................................................................................................21
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
Logic
WebL
2 Windows Web
WebLogic 11g Windows WebLogic
1.
WebLogic, JDKWebLogic
JDK
ie
s
2.1
WebLogic9.2 JDK1.5.0
WebLogic8.1 JDK1.4.2
2.2
512M 1G
WebLogic
Te
c
2.
hn
ol
og
WebLogic10 JDK1.6.0
WebLogic10.3.3(11g)
2.2.1
Be
ijin
gL
an
di
ng
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
2-1
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
2.2.2
2-2
2.2.3
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
Te
c
hn
ol
og
ie
s
IT WebLogic
2-3
ijin
gL
an
di
ng
2.2.4
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
Te
c
hn
ol
og
ie
s
IT WebLogic
2-4
Be
ijin
gL
an
di
ng
2.2.5
2-5
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
2.2.6
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
Be
2-6
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
Te
c
hn
ol
og
ie
s
2.2.7
ijin
gL
an
di
ng
2-7
Be
2.2.8
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
2-8
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
2.2.9
Be
2-9
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
2.2.10
2-10
WebLogic Server
WebLogic
2.3
WebLogic
WebLogic 3
WebLogic (
Quick Start )
Be
WebLogic
WebLogic
WebLogic WebLogic
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
Te
c
hn
ol
og
ie
s
IT WebLogic
2-11
2.3.2
Be
ijin
gL
an
di
ng
> Oracle WebLogic > WebLogic Server 11gR1 > Tools >Configuration
Wizard WebLogic
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
2-12
2.3.3
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
WebLogic
2-13
2.3.4
Be
base_domain,
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
Te
c
hn
ol
og
ie
s
IT WebLogic
2-14
Be
ijin
gL
an
di
ng
2.3.5
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
IT WebLogic
2-15
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
2.3.6 JDK
2-16
2.3.7
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
Te
c
hn
ol
og
ie
s
IT WebLogic
2-17
Be
ijin
gL
an
di
ng
2.3.8
2-18
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
IT WebLogic
Te
c
hn
ol
og
ie
s
2.3.9
ijin
gL
an
di
ng
2-19
Be
2.3.10
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 16 -
IT WebLogic
2-20
2.4
WebLogic Server
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
2-21
7001 IP 192.168.0.125 IP
127.0.0.1, hostname localhost RUNNING
2.5
Be
http://192.168.0.125:7001/console
AdminServer http://localhost:7001/console
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 17 -
Te
c
2-22
hn
ol
og
ie
s
IT WebLogic
Be
ijin
gL
an
di
ng
2-23
Windows UNIX
UNIX JDK
Liniux JDK
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 18 -
IT WebLogic
2.6
Linux JDK
2.6.1
1.
Linux
ie
s
uname a Linux
2-24
JRockit jrmc-4.0.0-1.6.0-linux-ia32.binsize120M
Oracle
3.
hn
ol
og
2.
2.6.2 JDK
weblogic
adduser weblogic
Te
c
2.6.2.1
ijin
gL
an
di
ng
home weblogic
2-25
2.6.2.2
chmod u+x
Be
2-26
2.6.2.3
Weblogic
2-27
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 19 -
IT WebLogic
2-28
2.6.2.4
Te
c
hn
ol
og
ie
s
1.
2-29
ijin
gL
an
di
ng
2.
Be
2-30
3.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 20 -
ie
s
IT WebLogic
Source code
ijin
gL
an
di
ng
Te
c
4.
hn
ol
og
2-31
2-32
Be
5.
2-33
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 21 -
IT WebLogic
ie
s
6.
2-34
hn
ol
og
2.6.2.5
/etc/profile
Te
c
shell
(1).(vi )/etc/profile
(2). profile
ijin
gL
an
di
ng
JAVA_HOME=JDK
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
2-1
(3).
Linux
1. Linux :
Be
3. CLASSPATH .,
4. export
5.
2.
.bashrc
.bashrc
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 22 -
IT WebLogic
(1)vi .bashrc
(2).bashrc
JAVA_HOME=JDK
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CLASSPATH
ie
s
2-2
(3)
shell
hn
ol
og
3.
shell
shell
Te
c
export JAVA_HOME=JDK
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
2-3
ijin
gL
an
di
ng
()
Weblogic ls a
2-35
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 23 -
wq Esc :wq
Be
ijin
gL
an
di
ng
Te
c
2-36
hn
ol
og
ie
s
IT WebLogic
2-37
Weblogic
2-38
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 24 -
IT WebLogic
java version
2-39
2.6.2.6
ie
s
2-40
hn
ol
og
vi Test.java Test
Be
ijin
gL
an
di
ng
Te
c
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 25 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
...........................................................................................................
3
3 WebLogic ...........................................................................................................
...........................................................................................................3
3.1
Domain............................................................................................................................... 3
3.1.1
................................................................................................ 3
3.1.2
............................................................................................................ 4
3.2
..................................................................................................................................... 5
3.2.1
.................................................................................................................... 5
3.2.2
.................................................................................................................... 6
3.3
Machine...................................................................................................................... 6
3.3.1 Machine ..................................................................................................................6
3.3.2
Machine................................................................................................. 7
3.4
.........................................................................................................................................7
3.4.1
.................................................................................................................... 7
3.4.2
........................................................................................................................ 8
3.4.3
................................................................................................................ 8
3.4.4
................................................................................................ 8
3.4.5
................................................................................................................ 8
3.4.6
................................................................................................ 9
3.4.7
................................................................................................ 9
3.4.8
.................................................................................................................. 10
3.4.9
...................................................................................................... 10
3.4.10
...................................................................................................... 10
3.4.11
.................................................................................................. 11
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
Logic
WebL
3 Web
WebLogic
3.1
Domain
ie
s
3.1.1
ijin
gL
an
di
ng
Te
c
hn
ol
og
3-1
Be
1.
2.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
WebLogic Server examples
ie
s
hn
ol
og
Managed Servers
Managed Servers Oracle WebLogic Server
Te
c
3.1.2
ijin
gL
an
di
ng
WebLogic Server
Be
()
()
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
WebLogic Server
3.2
ie
s
hn
ol
og
3.2.1
Be
ijin
gL
an
di
ng
Te
c
WebLogic
3-2
WebLogic Server
(GUI)
WebLogic Server (API) WebLogic Server
API Java
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
WebLogic Server (weblogic.Admin)
3.2.2
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
3-3
Be
WebLogic Server
WebLogic Server
WebLogic Server
3.3
Machine
Machine Server
Machine
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
3.3.1 Machine
Te
c
hn
ol
og
ie
s
ijin
gL
an
di
ng
3-4
WebLogic Server
WebLogic Server
3.3.2 Machine
WebLogic Machine
Be
fail over
3.4
Cluster
3.4.1
WebLogic WebLogic Server WebLogic Server
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
()
3.4.2
WebLogic
ie
s
hn
ol
og
3.4.3
ijin
gL
an
di
ng
Te
c
HTTP
3-5
Be
3.4.4
EJB
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
3.4.5
Te
c
3-6
hn
ol
og
ie
s
Web
ijin
gL
an
di
ng
3.4.6
Web
EJB
HTTP
3.4.7
Be
DMZ
Servlet/JSP
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
3.4.8
ie
s
hn
ol
og
Te
c
3.4.9
Be
ijin
gL
an
di
ng
HTTP
3-7
web
web web
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
WebLogic Server Microsoft IIS Microsoft Internet Information
Server
3.4.10
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
HTTP
3-8
Web
HTTP web
Web WebLogic Server HTTP
Be
Web Web
DMZ
WebLogic Server DMZ Web 3-8
3.4.11
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
WebLogic Server
WebLogic Server
WebLogic Server
ie
s
\autodeploy autodeploy
applications
hn
ol
og
REDEPLOY WEBINF
REDPLOY
Be
ijin
gL
an
di
ng
Te
c
applications
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
...................................................................................................
3
WebLogic ...................................................................................................
...................................................................................................3
................................................................................................................. 3
user_projects ................................................................................................................... 4
utils ................................................................................................................................. 5
WebLogic home ............................................................................................................. 5
................................................................................................................................. 6
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
4
4.1
4.2
4.3
4.4
4.5
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
Logic
4 Web
WebL
WebLogic
4.1
|-bea
bea
Sun JDK
JDK Java
JRE Java
xxx
|-/jrockit_xxx
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
|-/ jdk_xxx
Java
xxx
|-/logs
BEA
|-/user_projects
domains
|-/util
BEA
BEA
Utils.jar UpdateLicense
|-/ wlserver_10.3
|-/ workshop_10.3
:http://www.landingbj.com
: 400-810-2327
weblogic weblogic
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
|
eclipse IDE
|-/modules
jar
|-/registry.xml
BEA
Service
Pack
BEA
BEA
user_projects
hn
ol
og
ie
s
|-/tools
ijin
gL
an
di
ng
Te
c
4.2
Be
user_projects domains
domains\base_domain
|-/autodeploy
WebLogic
ear,war
|-/bin
cmd window
sh Linux
setDomainEnv.sh
startManagedWebLogic.sh
startPointBaseConsole.sh
startWebLogic.sh
stopManagedWebLogic.sh
stopWebLogic.sh
startWebLogic.sh
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
JMS
JDBC
|-/console-ext
admin
server
|-/init-info
|-/lib
|-/security
|-/servers
|-/user_staged_config
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
|-/config
|-/fileRealm.properties
bin\startWebLogic.cmd
|-/startWebLogic.sh
bin\startWebLogic.sh
utils
|-/bsu
bus.jar jar
|-/quickstart
|-/uninstall
weblogic
|-/utils.jar
jar
Be
4.3
|-/startWebLogic.cmd
4.4
WebLogic home
|-/common
WebLogic
JAR
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
|-/samples
server
MedRec
WebLogic Server
|-/uninstall
4.5
hn
ol
og
|-/server
ie
s
IT WebLogic
BEA Products
ijin
gL
an
di
ng
Te
c
|samples
|domains
| medrec
medrec
| wl_server
wl_server
|server
| examples
weblogic
|medrec
medrec
Be
| docs
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.......................................................................................................
4
5 WebLogic .......................................................................................................
.......................................................................................................4
5.1
..................................................................................................... 4
5.1.1 startWebLogic.cmd/startWebLogic.sh................................................................................4
5.1.2 startManagedWebLogic.cmd/startManagedWebLogic.sh.................................................. 4
5.1.3 setDomainEnv.cmd/setDomainEnv.sh................................................................................4
5.1.4 stopWebLogic.cmd/stopWebLogic.sh................................................................................ 4
5.1.5 stopManagedWebLogic.cmd/stopManagedWebLogic.sh...................................................5
5.2
config.xml.......................................................................................................5
5.2.1
WebLogic config.xml ...............................................................5
5.2.2
config.xml.................................................................................................. 5
5.2.3 config.xml ...................................................................................................6
5.3
weblogic.xml.......................................................................................................... 6
5.3.1
................................................................................................................................ 6
5.3.2
........................................................................................................ 6
description....................................................................................................................................6
weblogic-version..........................................................................................................................6
security-role-assignment.............................................................................................................. 6
run-as-role-assignment.................................................................................................................7
resource-description.....................................................................................................................8
resource-env-description..............................................................................................................8
ejb-reference-description............................................................................................................. 8
service-reference-description....................................................................................................... 9
session-descriptor........................................................................................................................ 9
jsp-descriptor............................................................................................................................. 14
auth-filter................................................................................................................................... 16
charset-params........................................................................................................................... 16
input-charset.............................................................................................................................. 17
charset-mapping.........................................................................................................................17
virtual-directory-mapping.......................................................................................................... 17
url-match-map............................................................................................................................18
security-permission.................................................................................................................... 19
context-root................................................................................................................................19
wl-dispatch-policy..................................................................................................................... 19
servlet-descriptor....................................................................................................................... 20
work-manager............................................................................................................................ 20
logging....................................................................................................................................... 22
library-ref................................................................................................................................... 24
5.3.2.1
Backwards Compatibility Flags............................................................................... 25
5.3.2.2
Web Container Global Configuration.......................................................................25
5.4
web.xml................................................................................................................ 25
5.4.1
.............................................................................................................................. 25
5.4.2
...................................................................................................... 25
icon............................................................................................................................................ 25
display-name..............................................................................................................................26
description..................................................................................................................................26
context-param............................................................................................................................ 26
filter........................................................................................................................................... 26
filter-mapping............................................................................................................................ 27
listener....................................................................................................................................... 27
servlet.........................................................................................................................................27
servlet-mapping......................................................................................................................... 28
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
session-config............................................................................................................................ 28
mime-mapping........................................................................................................................... 29
welcome-file-list........................................................................................................................ 29
error-page...................................................................................................................................29
taglib.......................................................................................................................................... 30
resource-env-ref......................................................................................................................... 30
resource-ref................................................................................................................................ 30
security-constraint......................................................................................................................31
web-resource-collection.............................................................................................................31
auth-constraint........................................................................................................................... 32
user-data-constraint....................................................................................................................32
login-config................................................................................................................................32
form-login-config.......................................................................................................................33
security-role............................................................................................................................... 33
env-entry.................................................................................................................................... 33
ejb-ref.........................................................................................................................................34
ejb-local-ref................................................................................................................................34
5.5
............................................................................................................................... 35
5.5.1
(domain.log)......................................................................................................35
5.5.2 server.log...........................................................................................................................35
5.5.3 access.log.......................................................................................................................... 35
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
Logic
5 Web
WebL
WebLogic
5.1
1.
startWebLogic.cmd/startWebLogic.sh
hn
ol
og
5.1.1
ie
s
WebLoigc (startWebLogic)
(startManagedWebLogic)(setDomainEnv)
(stopWebLogic)(stopManagedWebLogic)
startWebLogic.cmd(Windows )
startWebLogic.sh(Linux/Unix )
2.
Te
c
/WLS_HOME/user_projects/domains/base_domain()
/WLS_HOME/user_projects/domains/base_domain/bin()
startWebLogic.cmd/startWebLogic.sh
ijin
gL
an
di
ng
5.1.2 startManagedWebLogic.cmd/startManagedWebLogic.sh
1.
startManagedWeblogic.cmd(Windows )
startManagedWebLogic.sh(Linux/Unix )
2.
/WLS_HOME/user_projects/domains/base_domain/bin
5.1.3
1.
setDomainEnv.cmd/setDomainEnv.sh
Be
setDomainEnv.cmd(Windows )
setDomainEnv.sh(Linux/Unix )
/WLS_HOME/user_projects/domains/base_domain/bin
5.1.4 stopWebLogic.cmd/stopWebLogic.sh
1.
stopWebLogic.cmd(windows )
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
stopWebLogic.sh(Linux/Unix )
2.
/WLS_HOME/user_projects/domains/base_domain/bin
5.1.5 stopManagedWebLogic.cmd/stopManagedWebLogic.sh
1.
stopManagedWebLogic.cmd(windows )
stopManagedWebLogic.sh(Linux/Unix )
/WLS_HOME/user_projects/domains/base_domain/bin
config.xml
hn
ol
og
5.2
ie
s
2.
config.xml
/WLS_HOME/user_projects/domains/base_domain/config/config.xml(
)
Te
c
ijin
gL
an
di
ng
config.xml XML
XML
XML WebLogic Server
5.2.2 config.xml
Be
config.xml
WebLogic
WebLogic config.xml WebLogic
config.xml WebLogic
config.xml
config.xml
WebLogic Server config.xml
config.xml xml config.xml
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
WebLogic config.xml
IT WebLogic
config.xml
5.2.3 config.xml
config.xml xml
Web SSL
EJB Web
hn
ol
og
ie
s
API
ListenPort
weblogic.management.configuration.ServerMBean ListenPort
ServerMBean getListenPort() setListenPort()
Boolean truefalse
5.3
weblogic.xml
Te
c
5.3.1
ijin
gL
an
di
ng
5.3.2
description
description Web
weblogic-version
security-role-assignment
Be
<security-role-assignment>
<role-name>PayrollAdmin</role-name>
<principal-name>Tanya</principal-name>
<principal-name>Fred</principal-name>
<principal-name>system</principal-name>
</security-role-assignment>
5-1
<security-role-assignment>
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
<role-name>roleadmin</role-name>
<externally-defined/>
</security-role-assignment>
5-2
<security-role-assignment> <principal-name>
<externally-defined>
security-role-assignment
ie
s
<principal-name>
<externallydefined>
<externally-defined>
<principalname>
<principal-name>
WebLogic
Server
ijin
gL
an
di
ng
Te
c
<role-name>
hn
ol
og
5-1
security-role-assignment Web
Be
run-as-role-assignment
run-as-role-assignment web.xml run-as servlet
servlet servlet-descriptor
run-as-principal-name run-as-roleassignment Web security-role-assignment
principal-name
run-as-role-assignment
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
<run-as-role-assignment>
<role-name>RunAsRoleName</role-name>
<run-as-principal-name>joe</run-as-principal-name>
</run-as-role-assignment>
5-3
run-as-role-assignment
<run-as-principalname>
hn
ol
og
ie
s
<role-name>
5-2
resource-description
Te
c
ijin
gL
an
di
ng
<res-ref-name>
<jndi-name>
JNDI
5-3
resource-env-description
Be
resource-env-description
<res-env-ref-name>
<jndi-name>
JNDI
5-4
ejb-reference-description
ejb-reference-description
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
<ejb-ref-name>
Web
EJB
<jndi-name>
JNDI
5-5
ie
s
service-reference-description
hn
ol
og
service-reference-description
<service-ref-name>
<wsdl-url>
<call-property>
<name>
<value>
ijin
gL
an
di
ng
Te
c
<call-property>
<port-info>
<port-info>
<port-name>
<stub-property>
<call-property>
5-6
session-descriptor
Be
session-descriptor servlet
timeout-secs
3600
WebLogic Server
3600
Session
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
web.xml
session-timeout
60
WebLogic Server
WebLogic Server
ie
s
invalidation-interval-secs
sharing-enabled
false
hn
ol
og
60
true Web
HTTP
debug-enabled
Te
c
Web
false
HTTP
ijin
gL
an
di
ng
false
Be
id-length
52
ID
8
Integer.MAX_VALUE
WAP
URL WAP
cookie WAP
URL
128
URL
WebLogic
Server ID
WAPEnabled
52
http://edocs.weblogicfans.net/w
ls/docs92/webapp/sessions.html
- wap
http://edocs.weblogicfans.net/w
ls/docs92/webapp/sessions.html
- wap
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
tracking-enabled
true
HTTP
cache-size
1028
JDBC
max-in-memory-sessions
-1
hn
ol
og
ie
s
servlet
WebLogic Server
weblogic.servlet.SessionCreatio
nException
Te
c
servlet
max-in-memorysessions
ijin
gL
an
di
ng
true
cookie
false
cookie-name
JSESSIONID
cookie
JSESSIONID
cookie-path
null
cookie
Be
cookies-enabled
cookie-domain
:http://www.landingbj.com
: 400-810-2327
null
/
WebLogic Server URL
cookie
cookie
URL
cookie
cookie-domain
.mydomain.com
*.mydomain.com
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
cookie
*.com *.net
cookie
null
cookie-secure
false
cookie
cookie
hn
ol
og
cookie-comment
ie
s
Sun
Microsystems Servlet
Cookie.setDomain()
HTTPS
cookie cookie ID
HTTPS
HTTP
Cookie
-1
ijin
gL
an
di
ng
cookie-max-age-secs
Te
c
url-rewriting-enabled
Be
persistent-store-type
memory
cookie
cookie
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
memory -
replicated - memory
replicated_if_clustered
Web
persistent-store-type
memory
sync-replication-acrosscluster
async-replication-across-
- 12 -
IT WebLogic
cluster
persistent-store-dir
session_db
cookie
cookie WLCOOKIE
cookie
Web
hn
ol
og
WLCOOKIE
cookie
cookie
persistentstore-dir
Be
ijin
gL
an
di
ng
Te
c
persistent-store-cookie-name
jdbc -
ie
s
file -
<servername>\data\store\default
persistent-store-pool
None
JDBC
persistent-store-table
wl_servlet
_sessions
JDBC
persistent-store-type
jdbc
persistent-store-
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
IT WebLogic
table
jdbc-column-name-maxinactive-interval
wl_max_inactive_interval
jdbc-columnname-max-inactive-interval
JDBC
120
ie
s
jdbc-connection-timeout-secs
true
http-proxy-caching-ofcookies
true
URL ID
URL
cookie
ijin
gL
an
di
ng
Te
c
url-rewriting-enabled
hn
ol
og
encode-session-id-in-queryparams
false
Be
runtime-main-attribute
false WebLogic
Server
"Cache-control: no-cache=setcookie"
cookie
servlet
ID Web
encodesession-id-in-query-params
true
false
ServletSessionRuntimeMBean
ServletSessionRuntimeMBean
getMainAttribute()
user-name
5-7
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
hn
ol
og
ie
s
IT
ijin
gL
an
di
ng
Te
c
WebLogic
Be
jsp-descriptor
jsp-descriptor JSP
jsp-descriptor
JSP
hn
ol
og
ie
s
page-check-seconds
-1
ijin
gL
an
di
ng
Te
c
JSP
pageCheckSeconds
60
false
true
Web
WebLogic Server WebLogic
Server
JSP
precompile-continue
false
true
JSP WebLogic
Server
JSP precompile
true
keepgenerated
false
JSP
Java
true
Java
Be
precompile
true
true
WebLogic Server
working-dir
WebLogic Server
JSP Java
print-nulls
null
false
null
backward-compatible
true
encoding
hn
ol
og
ie
s
verbose
true
Te
c
JSP
ijin
gL
an
di
ng
JSP JSP
<%@
page
contentType="text/html;
charset=custom-encoding"%>
jsp_servlet
JSP
exact-mapping
true
true
JSP JspStub
exactMapping false
Web JSP
url
exactMapping JSP
true
WebLogic Server
JSP Java
Be
package-prefix
default-file-name
rtexprvalue-jsp-param-name
false
jsp:param name
false
5-8
auth-filter HttpServlet
ie
s
auth-filter
hn
ol
og
servlet
charset-params
<charset-params> unicode
Te
c
<charset-params>
<input-charset>
<resource-path>/*</resource-path>
<java-charset-name>UTF-8</java-charset-name>
</input-charset>
ijin
gL
an
di
ng
5-4
input-charset
<input-charset>
<resource-path>/foo</resource-path>
<java-charset-name>SJIS</java-charset-name>
</input-charset>
Be
5-5
<input-charset>
<resource-path>
URL
WebLogic Server
<java-charset-name> Java
<java-charset-name>
Java
5-9
charset-mapping
<charset-mapping> IANA Java
5-6
hn
ol
og
<charset-mapping>
<iana-charset-name>Shift-JIS</iana-charset-name>
<java-charset-name>SJIS</java-charset-name>
</charset-mapping>
ie
s
<charset-mapping>
<java-charset-name>
IANA
<java-charset-name>
Java
ijin
gL
an
di
ng
<iana-charset-name>
Te
c
Java
5-10
virtual-directory-mapping
virtual-directory-mapping
Web
Be
Web
Web servlet
Web
<virtual-directory-mapping>
<local-path>c:/usr/gifs</local-path>
<url-pattern>/images/*</url-pattern>
<url-pattern>*.jpg</url-pattern>
</virtual-directory-mapping>
<virtual-directory-mapping>
<local-path>c:/usr/common_jsps.jar</local-path>
<url-pattern>*.jsp</url-pattern>
</virtual-directory-mapping>
5-7
virtual-directory-mapping
<url-pattern>
URL
Servlet API 11.2
5-11
hn
ol
og
ie
s
<local-path>
Te
c
url-match-map
ijin
gL
an
di
ng
SimpleApacheURLMatchMap
*.jws JWSServlet
Be
<url-match-map>
weblogic.servlet.utils.SimpleApacheURLMatchMap
</url-match-map>
5-8
security-permission
security-permission
codebase signedBy
<security-permission-spec>
grant { permission java.net.SocketPermission "*", "resolve" };
</security-permission-spec>
5-9
permission java.net.SocketPermission
"*"
resolve
ie
s
context-root
hn
ol
og
ijin
gL
an
di
ng
2.
Te
c
1.
weblogic.xml context-root
Web Web application.xml
weblogic.xml context-root
URI
3.
Be
wl-dispatch-policy
wl-dispatch-policy Web
per-servlet-dispatch-policy servlet
jsp Web
servlet-descriptor
servlet-descriptor servlet
servlet-descriptor
servlet web.xml
servlet
servlet
<run-as-principal-name>
web.xml
run-as-role-name
<init-as-principal-name>
servlet init
run-as-principal-name
init-as-principal-name
run-as-principal-name
<destroy-as-principal-name
>
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
<servlet-name>
Be
<dispatch-policy>
servlet destroy
run-as-principal-name
destroy-as-principal-name
run-as-principal-name
servlet
wl-dispatch-policy
Web
5-12
work-manager
work-manager <weblogic-web-app>
work-manager
name
response-time-request-clas
s
/
fair-share-request-class /
context-request-class
/
request-class-name
ie
s
response-time-request-class
goal-ms
(( - T) Cr)/R T
R
Cr
ijin
gL
an
di
ng
Te
c
hn
ol
og
fair-share-request-class
100 Cf/(P R T) P
R T
Cf
Be
min-threads-constraint
/
min-threads-constraint-nam
e
context-request-class
cookie
request-class-name
min-threads-constraint -
min-threads-constraint-name -
min-threads-constraint
max-threads-constraint
/
max-threads-constraint-nam
e
max-threads-constraint -
10
3
10
capacity / capacity-name
ie
s
max-threads-constraint-name -
max-threads-constraint
ijin
gL
an
di
ng
Te
c
hn
ol
og
capacity -
JMS
capacity-name capacity
5-13
logging
logging <weblogic-web-app>
logging
Be
log-filename
logging-enabled
ManagedConnectionFactory
ManagedConnection
true
ManagedConnectionFactory
ManagedConnection
log-filename
WebLogic
Server
true | false
false
ie
s
rotation-type
bySizebyName none
hn
ol
og
bySize -
file-size-limit
FileName.n
ijin
gL
an
di
ng
Te
c
byName
Be
number-of-files-limited
file-time-span
FileName.n
log-filename
none -
bySize
bySize
number-of-files-limited
true
rotationType
number-of-files-limited
false
true | false
false
number-of-files-limited
hn
ol
og
ie
s
file-count
bySize
FileName.n
ijin
gL
an
di
ng
Te
c
file-size-limit
rotate-log-on-startup
Be
log-file-rotation-dir
rotation-time
500
true | false
true
k:mm k
1-24 byTime
file-time-span
file-time-span
byTime
24
ie
s
5-14
hn
ol
og
library-ref
ijin
gL
an
di
ng
Te
c
<library-ref>
<library-name>WebAppLibraryFoo</library-name>
<specification-version>2.0</specification-version>
<implementation-version>8.1beta</implementation-version>
<exact-match>false</exact-match>
</library-ref>
5-10
Web library-namespecification-version
implementation-version exact-match
library-ref
null
specification-version
implementation-version
null
exact-match
false
Be
library-name
5-15
5.3.2.1
5.3.2.2
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
Web WebAppContainerMBean
Te
c
hn
ol
og
ie
s
IT
ijin
gL
an
di
ng
WebLogic
Be
IT WebLogic
5.4
web.xml
5.4.1
Web web.xml servletfilter Web web.xml
JavaEE web.xml <web-app>
ie
s
web.xml
hn
ol
og
Xmlns=http://jaava.sun.com/xml/ns/javaee
Xmlns:xsl=http://www.w3.org/2001/XMLSchema-instance
Xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
Te
c
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>
</web-app>
ijin
gL
an
di
ng
5-11
web.xml
web.xml
5.4.2
icon
Be
<small-icon>
16x16
gif jpg
<large-icon>
32x32
gif jpg
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
5-16
display-name
Web
<display-name>
ie
s
description
Web
<description>
Te
c
hn
ol
og
5-17
ijin
gL
an
di
ng
5-18
context-param
Web servlet
WebLogic Server
weblogic.xml
Be
weblogic.httpd.clientCertProxy
WebLogic
HttpClusterServlet
HTTPS
WL-Proxy-Client-Cert
HTTP
5-19
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
filter
Servlet Filter
filter
<filter-name>
ie
s
<icon>
hn
ol
og
<description>
<filter-class>
Te
c
ijin
gL
an
di
ng
<display-name>
<init-param>
5-20
filter-mapping
URL
Be
<filter-name>
<filter>
<filter-name>
<url-pattern>
URL
5-21
listener
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
<listener-class>
Web
5-22
ie
s
servlet
<icon>
<servlet-name>
Te
c
hn
ol
og
HTTP Servlet
servlet
ijin
gL
an
di
ng
Servlet
<description>
Servlet
<servlet-class>
Servlet servlet
<servlet-class>
Be
<display-name>
<jsp-file>
<jsp-
file>)
<jsp-file>
Jsp Web
<servletclass>)
<init-param>
/ Servlet
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
<load-on-startup>
WebLogic Server
Servlet
Servlet
<run-as> <run-as>
Servlet
hn
ol
og
<security-role-ref>
ie
s
<security-role>
Te
c
5-23
servlet-mapping
ijin
gL
an
di
ng
Servlet URL
<servlet-name>
<url-pattern>
Servlet <servlet>
<servlet-name>
Servlet URL
Be
5-24
session-config
Web HTTP Session
<session-timeout>
:http://www.landingbj.com
: 400-810-2327
Web HTTP
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
weblogic.xml
<session-descriptor> TimeoutSecs
-2
Integer.MAX_VALUE/60
-2
ie
s
weblogic.xml
hn
ol
og
<session-descriptor> TimeoutSecs
-1 =
Te
c
5-25
mime-mapping
ijin
gL
an
di
ng
mime type
<extension>
txt
<mime-type>
MIME text/plain
5-26
Be
welcome-file-list
URL WebLogic
<welcome-file>
index.html
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
5-27
error-page
HTTP
ie
s
<error-code><exception-type>
HTTP 404
<exception-type>
Java
hn
ol
og
<error-code>
java.lang.Exception
Te
c
<location>
/myErrorPg.html
ijin
gL
an
di
ng
5-28
taglib
JSP
Be
<taglib-location>
<taglib-uri>
Web
WEB-INF
JSP uri
5-29
resource-env-ref
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
<resource-env-ref>
<resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
5-12
ie
s
<resource-env-ref-name
hn
ol
og
<description>
>
java:comp/env
JNDI
<resource-env-ref-type
Te
c
>
<resource-env-ref-type
ijin
gL
an
di
ng
>
5-30
resource-ref
Web
JNDI weblogic.xml
Be
<description>
<res-ref-name>
Web JNDI
<res-type>
Java
Java
<res-auth>
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
<res-sharing-scope>
Specifies
whether
connections
obtained
through
the
resource
manager
given
connection
Shareable
ie
s
5-31
security-constraint
hn
ol
og
Unshareable
ijin
gL
an
di
ng
Te
c
<web-resource-collection> Web
<web-resource-collecti
on>
<auth-constraint>
<user-data-
HTTP
// Web
Be
constraint>
5-32
web-resource-collection
Web
<web-resource-name>
:http://www.landingbj.com
: 400-810-2327
Web
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
<description>
<url-pattern>
<http-method>
GET/POST
5-33
ie
s
auth-constraint
<description>
Te
c
hn
ol
og
Web
5-34
ijin
gL
an
di
ng
user-data-constraint
<transport- guarantee>
Be
<description>
INTEGRAL
CONFIDENTIAL WebLogic
SSL/HTTPS
NONE
INTEGRAL
CONFIDENTIAL
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
5-35
login-config
<security-constraint>
<auth-method>
ie
s
hn
ol
og
BASIC
HTTP Basic
FORM HTML
Te
c
CLIENT-CERT HTTPS
ijin
gL
an
di
ng
<realm-name>
<form-login- config>
<auth-method> FORM
5-36
form-login-config
Be
FORM
<form-login-page>
URI
HTML JSP HTTP Servlet
HTML
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
IT WebLogic
<form-error-page>
URI
5-37
security-role
<description>
<role-name>
hn
ol
og
ie
s
weblogic.xml
Te
c
5-38
ijin
gL
an
di
ng
env-entry
<env-entry-name>
<env-entry-value>
Java
Be
<description>
<env-entry-type>
java.lang.Boolean
java.lang.String
java.lang.Integer
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
IT WebLogic
java.lang.Double
java.lang.Float
5-39
ejb-ref
<description>
<ejb-ref-name>
hn
ol
og
ie
s
EJB
Web EJB
<home>
EJB
EJB home
ijin
gL
an
di
ng
<ejb-ref-type>
Te
c
JNDI
<remote>
EJB
<ejb-link>
J2EE (ear)
<run-as> <run-as>
EJB
<security-role>
Be
5-40
ejb-local-ref
EJB Local Home
<description>
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
IT WebLogic
<ejb-ref-name>
<ejb-ref-type>
EJB
<ejb-ref-type>Entity</ejb-ref
-type>
<local>
<ejb-link>
EJB Home
EJB
J2EE (ear)
Te
c
<local-home>
hn
ol
og
f-type>
ie
s
<ejb-ref-type>Session</ejb-re
EJB
ijin
gL
an
di
ng
5-41
5.5
5.5.1 (domain.log)
/WLS_HOME/userprojects/domains/base_domain/servers/AdminServer/logs()
Be
5.5.2 server.log
/WLS_HOME/user_projects/domains/base_domain/servers/AdminServer/logs
/WLS_HOME/user_projects/domains/base_domain/servers/servername/logs()
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
IT WebLogic
WebLogic Server WebLogic Server
LOG
AdminServer.log WebLogic Gernal
server
servername.log server
5.5.3 access.log
ie
s
/WLS_HOME/user_projects/domains/base_domain/servers/servername/logs()
hn
ol
og
200 176
Te
c
5-13
Be
ijin
gL
an
di
ng
HTTP HTTP
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 16 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
............................................................................................................ 3
6 Java ............................................................................................................
6.1
JVM ................................................................................................................................ 3
6.2
JDK ............................................................................................................ 3
6.3
GC ...................................................................................................................................4
6.4
JVM ClassLoader........................................................................................................... 4
6.4.1 ClassLoader ................................................................................................................4
6.4.2 Java ........................................................................................................................ 5
6.4.2.1
Java ............................................................................................5
6.4.2.2
........................................................................................................................5
6.4.2.3
prefer-web-inf-classes ....................................................................................... 6
6.4.2.4
.................................................................................... 6
6.4.3 WebLogic ClassLoader.......................................................................................................6
6.4.4
WebLogic Server ......................................................8
6.4.4.1
WebLogic Server ........................................................... 8
6.4.4.2
.................................................................................... 9
6.4.4.3
.............................................................................. 10
6.4.4.4
.......................................................................................... 10
6.4.4.5
...................................................................................... 12
6.4.4.6
EJB ................................................................................. 12
6.4.4.7
.......................................................... 13
6.4.4.8
.................................................................................................. 14
6.4.5
...........................................................................15
6.4.5.1
.................................................................................................. 15
6.4.5.2
.......................................................................................... 16
6.4.5.3
.............................................................................................................. 16
6.4.5.4
JAR...................................................................................... 16
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
6 Java
6.1
JVM
ie
s
6.2
JDK
hn
ol
og
Java ,
ijin
gL
an
di
ng
Te
c
Java
Be
6-1
Java
1.
Young new
Tenured old
Tenure
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
3.
Perm
ie
s
-Xms-Xms-Xmx
Virtual
Eden Tenured Perm Virtual
GC
hn
ol
og
6.3
GC Java
6.4
JVM ClassLoader
ClassLoader
ijin
gL
an
di
ng
6.4.1
Te
c
GC GC
Be
BootStrap ClassLoader
|------ Extension ClassLoader
|------- App ClassLoader
6-1
ClassLoader BootStrap
ExtClassLoader AppClassLoader
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
6.4.2 Java
Java Java (JVM)
Java
Java
6.4.2.1
Java
JVM
ie
s
hn
ol
og
Te
c
ijin
gL
an
di
ng
getParent()
Java Java
Java
6.4.2.2
Be
defineClass()
loadClass() defining loader
initiating loader
Java
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
loadClass()
6.4.2.3
prefer-web-inf-classes
hn
ol
og
ie
s
Te
c
delegation
Web prefer-web-inf-classes true Web
WebLogic Server
Web WEB-INF
ijin
gL
an
di
ng
prefer-web-inf-classes
ClassCastException
6.4.2.4
WebLogic Server
EJB
Java
Be
WebLogic Server
WebLogic Server
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
|---WEB-INF
|---lib
|---classes // class
|---web.xml
|---ejb.jar
//ejb jar
6-2
6-3
hn
ol
og
BootStrap ClassLoader
|--- Extension ClassLoader
|---WebLogic Service System ClassLoader
|---Filtering ClassLoader
|---Application ClassLoader
|---Web Application ClassLoader
|---Jsp ClassLoader
ie
s
ClassLoader
Te
c
ijin
gL
an
di
ng
<container-descriptor>
<prefer-web-inf-classess>true</ prefer-web-inf-classess>
</container-descriptor>
6-4
ClassLoaderWeblogic
ClassLoader Weblogic-application.xml
Be
<classloader-struts>
<module-ref>
<module-uri>ejba.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>webc.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>weba.war</module-uri>
</module-ref>
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
hn
ol
og
Te
c
6-5
ie
s
IT WebLogic
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejbc.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>webb.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>webd.war</module-uri>
</module-ref>
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejbb.jar</module-uri>
</module-ref>
</classloader-structure>
</classloader-structure>
</classloader-structure>
ijin
gL
an
di
ng
ClassLoader
Be
6-2
6.4.4.1
WebLogic Server
WebLogic Server
(EAR) EAR
EAR
Enterprise JavaBean (EJB) JAR
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
Web WAR
IT WebLogic
RAR
EJB Web
EAR EAR
ie
s
A B
6.4.4.2
hn
ol
og
WebLogic Server
EJB JAR Web WAR
Te
c
Be
ijin
gL
an
di
ng
WebLogic Server
6-3
EJB Servlet JSP
Servlet JSP WAR
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
EAR
IT WebLogic
hn
ol
og
6.4.4.3
ie
s
weblogic-application.xml
classloader-structure
ijin
gL
an
di
ng
Te
c
WebLogic
EJB Web
JSP )
6-4
Be
EJB
call-by-reference Web
Web EJB Web
EJB
J2EE
EJB
Web EJB
EJB
6.4.4.4
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
WebLogic weblogic-application.xml
DTD )
<!ELEMENT classloader-structure (module-ref*, classloader-structure*)>
<!ELEMENT module-ref (module-uri)>
<!ELEMENT module-uri (#PCDATA)>
6-6
ie
s
weblogic-application.xml classloader-structure
EJB
Web
hn
ol
og
classloader-structure classloader-structure
Te
c
weblogic-application.xml classloaderstructure
Be
ijin
gL
an
di
ng
<classloader-structure>
<module-ref>
<module-uri>ejb1.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>web3.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>web1.war</module-uri>
</module-ref>
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejb3.jar</module-uri>
</module-ref>
<module-ref>
<module-uri>web2.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>web4.war</module-uri>
</module-ref>
</classloader-structure>
<classloader-structure>
<module-ref>
<module-uri>ejb2.jar</module-uri>
</module-ref>
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
</classloader-structure>
</classloader-structure>
</classloader-structure>
6-7
Te
c
hn
ol
og
ie
s
6-5
6.4.4.5
ijin
gL
an
di
ng
J2EE
EJB
Be
6.4.4.6
EJB
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
hn
ol
og
6-6 EJB
ie
s
IT WebLogic
Te
c
-redeploy
ijin
gL
an
di
ng
6.4.4.7
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
IT WebLogic
6.4.4.8
jar
FilteringClassLoader
Te
c
6.4.4.8.1
hn
ol
og
ie
s
ijin
gL
an
di
ng
FilteringClassLoader
Xerces Ant
FilteringClassLoader
FilteringClassLoader
loadClass(String className) className weblogic-application.xml
className FilteringClassLoader
ClassNotFoundException
6.4.4.8.2 FilteringClassLoader
FilteringClassLoader
weblogic-application.xml prefer-application-packages
Be
org.apache.log4j.* antlr.*
<prefer-application-packages>
<package-name>org.apache.log4j.*</package-name>
<package-name>antlr.*</package-name>
</prefer-application-packages>
6-9
6.4.4.8.3
java.lang.ClassLoader getResource() getResources()
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
IT WebLogic
FilteringClassLoader
Web(1)(3)(2)
Web(1)
6-10
hn
ol
og
ie
s
/META-INF/foo.xml
URL
FilteringClassLoader
(D)(B)(A) Web
Te
c
ijin
gL
an
di
ng
FilteringClassLoader J2EE
FilteringClassLoader
Be
getResource() getResourceAsStream()
InputStream
6.4.5
Java EJBServletJSP
WebLogic Server
WebLogic Server
6.4.5.1
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
IT WebLogic
Web
Web EJB EAR
APPINF/classes JAR
APP-INF/lib
WebLogic Server Web
EJB Web
EJB JAR Web WAR
ie
s
6.4.5.2
hn
ol
og
EJB JAR
WebLogic Server
Te
c
6.4.5.3
ijin
gL
an
di
ng
J2EE JAR
EJB JAR WAR JAR
JAR WAR JAR
Class-Path
utility.jar
Manifest-Version: 1.0 [CRLF]
Class-Path: utility.jar [CRLF]
6-13
Manifest-Version (CR | LF
|CRLF) Class-Path
Be
Class-Path
WAR EJB JAR JAR WAR
y.jar WAR
/<directory>/x.war
/<directory>/y.jars
6-14
META-INF/MANIFEST.MF
6.4.5.4
JAR
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 16 -
IT WebLogic
lib
WebLogic Server
lib
JAR JAR lib JAR
JAR J2EE
J2EE J2EE
lib JAR
1
6-15
hn
ol
og
mkdir c:\bea\weblogic90\samples\domains\wl_server\lib
cp c:\3rdpartyjars\utility.jar
c:\bea\weblogic90\samples\domains\wl_server\lib
ie
s
2 JAR lib
Te
c
lib
JAR
domain_name/lib
Be
ijin
gL
an
di
ng
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 17 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.................................................................................................................
3
7 .................................................................................................................
.................................................................................................................3
7.1
................................................................................................................................. 3
7.1.1
........................................................................................................................ 3
7.1.2
............................................................................................................ 3
7.2
..................................................................................................................... 3
7.3
Proxy.................................................................................................................. 5
7.3.1
................................................................................................ 5
7.3.2
........................................................................................................ 6
7.3.3 F5 ................................................................................................6
7.3.4
........................................................................................................ 6
7.3.4.1
.................................................................................................... 6
7.3.4.2
.................................................................................................... 8
7.4
......................................................................................................................... 8
7.4.1
................................................................................................................ 8
7.4.2
................................................................................................................ 8
7.5
Cluster .......................................................................................................................18
7.5.1 Admin server ............................................................................................................ 18
7.5.2
...................................................................................................... 20
7.5.3
.............................................................................................. 21
7.6
............................................................................................................... 22
7.7
............................................................................................................................... 25
7.8
Session .......................................................................................................................... 27
7.8.1 Session ..........................................................................................................27
7.8.1.1
HTTP ............................................................................................... 27
7.8.1.2
HTTP ............................................................................................... 28
7.8.2 Session ..........................................................................................................28
7.8.2.1
.............................................................................................................. 28
7.8.2.2
JDBC ...................................................................................................... 29
7.8.2.3
...................................................................................................... 30
7.9
....................................................................................................................... 30
7.9.1
.......................................................................................................... 30
7.9.2
.................................................................................................. 31
7.9.3
.......................................................................................................... 31
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
7
Cluster
WebLogic
7.1
ie
s
7.1.1
hn
ol
og
WebLogic Server
WebLogic
Server
7.1.2
Te
c
ijin
gL
an
di
ng
WebLogic Server
Firewall
Be
Untrusted
Load
Balancer
HTTP
JSP ---EJB
Servlet
|
|
|
JDBC
HTTP
JSP ---EJB
Servlet
|
|
|
JDBC
Database
HTTP
JSP ---EJB
Servlet
|
|
|
JDBC
7-1
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
7.2
1.
WebLogic Server
WebLogic UpdateLicense
UpdateLicense.cmd
UpdateLicense <new_license_file>
ie
s
7-1
ijin
gL
an
di
ng
Te
c
<license
component="Cluster"
cpus="unvalued"
expiration="never"
ip="any"
licensee="XXX"
serial="616351266349-1844896394531"
type="SDK"
units="5"
signature="MC0CFQCQrk+Kbddfz3RHVH6uGfj"
/>
hn
ol
og
license "Cluster"
(
)
7-2
2.
LAN WAN
3.
Be
WebLogic Server
HTTP
4.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
IP
License
CPU WebLogic
Server
5.
IP DNS
ie
s
IP IP
IP
hn
ol
og
listenaddr1:listenport1,listenaddr2:listenport2,listenaddr3:listenport3
7.3
Te
c
7-3
Proxy
ijin
gL
an
di
ng
Proxy
7.3.1
Be
failover /
/
WebLogic Server MulticastIP
Sockets JNDIJava Naming and Directory Interface
WebLogic Server
WebLogic Server
"""replica-aware "
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
WebLogic Server
7.3.2
ie
s
WebLogic Servlet
7.3.3 F5
hn
ol
og
F5 BIG-IP LTM
12
BIG-IP LTM
Virtual Server BIG-IP
BIG-IP LTM
Te
c
RoundRobin
Ratio
Priority
ijin
gL
an
di
ng
LeastConnection
Fastest
Observed
Predictive
DynamicRatio-APM
DynamicServerAct
QoS
ToS
Be
F5 BIG-IP
7.3.4
7.3.4.1
1.
WebLogic Wizard
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
HTTP proxy for <cluster><cluster> HTTP
2.
WebLogic
Web web.xml
HttpClusterServlet
HttpClusterServlet
hn
ol
og
4.
ie
s
A.
Te
c
Be
ijin
gL
an
di
ng
<servlet>
<servlet-name>HttpClusterServlet</servlet-name>
<servlet-class>
weblogic.servlet.proxy.HttpClusterServlet
</servlet-class>
<init-param>
<param-name>WebLogicCluster</param-name>
<param-value>
serverA:7001:7002|serverB:7001:7002|serverC:7001:7002
</param-value>
</init-param>
<init-param>
<param-name>DebugConfigInfo</param-name>
<param-value>ON</param-value>
</init-param>
</servlet>
7-4
</servlet>
<servlet-mapping>
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>HttpClusterServlet</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
7-5
7.3.4.2
hn
ol
og
ie
s
servlet <url-pattern>
*.jsp<url-pattern> /
*.jsp
Web
Te
c
Be
ijin
gL
an
di
ng
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
hn
ol
og
ie
s
IT
ijin
gL
an
di
ng
Te
c
WebLogic
Be
7.4
7.4.1
Ip
Port
Ms1
192.168.0.139
7001
As1
192.168.0.139
7002
As2
192.168.0.140
7003
Cs
239.192.0.0
hn
ol
og
7777
7-1
Te
c
7.4.2
ie
s
Server name
Linux
1.
WebLogic config
Be
ijin
gL
an
di
ng
%weblogic_home%/wlserver_10.3/common/bin config.sh
console
7-2
2.
3.
Te
c
7-3
hn
ol
og
ie
s
1
Next n
ijin
gL
an
di
ng
WebLogic
Be
WebLogic
7-4
4.
ie
s
doman next
ijin
gL
an
di
ng
Te
c
5.
hn
ol
og
7-5
7-6
Be
6.
7-7
manager 8
7-8
Te
c
8.
hn
ol
og
ie
s
7.
ijin
gL
an
di
ng
SSL
Be
WebLogic
Server
SSL
WebLogic Server
domain_name/autodeploy
domain_name
WebLogic
Server
weblogic.Deployer
WebLogic
(WLST)
7-2
ie
s
9.
JDK
hn
ol
og
7-9
Be
ijin
gL
an
di
ng
JDK
Te
c
JDK
WebLogic JDK
JDK WebLogic WebLogic10.3
JDK 1.6
7-10
10.
1]2]
ie
s
11.
hn
ol
og
7-11
Be
ijin
gL
an
di
ng
Te
c
Next
12.
7-12
ie
s
5
Be
ijin
gL
an
di
ng
Te
c
13.
hn
ol
og
7-13
7-14
14. ms2
15.
cluster server
cluster messaging mode multicast
ie
s
Be
ijin
gL
an
di
ng
Te
c
16.
hn
ol
og
7-15
7-16
ie
s
hn
ol
og
7-17
ms2
17. WebLogic
Te
c
19. ms2
ijin
gL
an
di
ng
20.
Be
7-23
7.5
Cluster
Te
c
hn
ol
og
ie
s
ijin
gL
an
di
ng
7-18
Be
7-19
7.5.2
Be
ijin
gL
an
di
ng
Te
c
7-20
7-21
7.5.3
hn
ol
og
ie
s
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
7-22
hn
ol
og
ie
s
IT
ijin
gL
an
di
ng
Te
c
WebLogic
Be
7.6
7-24
ijin
gL
an
di
ng
Te
c
2.
hn
ol
og
ie
s
1.
7-25
Be
3.
7-26
4.
Te
c
hn
ol
og
ie
s
EJB
7-27
5.
Be
ijin
gL
an
di
ng
cluster
7-28
6.
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
7-29
7.7
1.
ijin
gL
an
di
ng
ie
s
Te
c
hn
ol
og
7-30
7-31
2.
Be
7-32
ie
s
node server
7.8
Session
ijin
gL
an
di
ng
7.8.1.1 HTTP
Te
c
7.8.1 Session
hn
ol
og
7-33
WebLogic Server
WebLogic Server
Session
Be
7.8.1.2 HTTP
Servlet Servlet
WebLogic Server
B
Servlet HttpClusterServlet
Servlet Cookie
CookieWebLogic Server URL
URL
hn
ol
og
ie
s
Te
c
HttpClusterServlet Cookie
WebLogic Server HttpClusterServlet
HTTP
ijin
gL
an
di
ng
WebLogic Server
7.8.2 Session
Be
7.8.2.1
1.
2.
3. weblogic.xml
<session-descriptor>
<persistent-store-type>replicated</persistent-store-type>
</session-descriptor>
7-6
replicated memory
replicated_if_clustered Web
persistentstore-type memory
sync-replication-across-cluster
ie
s
memory
async-replication-across-cluster
7.8.2.2 JDBC
JDBC
1.
Te
c
2. /
hn
ol
og
3. weblogic.xml
ijin
gL
an
di
ng
<session-descriptor>
<persistent-store-type>jdbc</persistent-store-type>
<persistent-store-pool>SessionDS</persistent-store-pool>
<persistent-store-table>WL_SERVLET_SESSIONS</persistentstore-table>
</session-descriptor>
7-7
JDBC
WL_SERVLET_SESSIONS /
WL_ID
100
Be
WL_CONTEXT_PATH
WL_IS_NEW
numeric20
WL_ACCESS_TIME
numeric20
WL_SESSION_VALUES
BLOB
WL_IS_VALID
char1
WL_CREATE_TIME
numeric20
7-3
WL_SERVLET_SESSIONS
//
/ 8
ie
s
WL_ID ID WL_CONTEXT_PATH
100
hn
ol
og
WL_CONTEXT_PATH WL_ID
100
WL_IS_NEW Servlet True
WL_CREATE_TIME Numeric 20
Te
c
ijin
gL
an
di
ng
WL_SESSION_VALUES BLOB
WL_ACCESS_TIME Numeric 20
WL_MAX_INACTIVE_INTERVAL
Integer
SQL Oracle
Be
7.8.2.3
Web
1.
2. weblogic.xml file
<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>shared folder location</persistentstore-dir>
</session-descriptor>
7-9
7.9
7.9.1
startAs.sh:
hn
ol
og
ie
s
domain domain
cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startWebLogic.sh &
* domainname
ijin
gL
an
di
ng
7.9.2
Te
c
7-10
startMs1.sh:
cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startManagedWebLogic.sh ms1 http://192.168.0.139:7001 &
startMs2.sh:
cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startManagedWebLogic.sh ms2 http://192.168.0.139:7001 &
7-11
Be
7.9.3
startPs.sh:
cd %weblogic_home%/user_projects/domains/domainname/bin
nohup ./startManagedWebLogic.sh ps http://192.168.0.139:7001 &
7-12
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
ie
s
.................................................................................................................................
3
.................................................................................................................................
.................................................................................................................................3
..................................................................................................................... 3
......................................................................................................................... 3
......................................................................................................... 5
......................................................................................................................... 8
HTTP ............................................................................... 10
HTTP........................................................................................................ 14
................................................................................................... 16
web .......................................................................................19
....................................................................................................................... 21
Be
ijin
gL
an
di
ng
Te
c
8
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
hn
ol
og
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
8-1
hn
ol
og
ie
s
8.1
ijin
gL
an
di
ng
8.2
Te
c
Internet
Be
1.
2.
8-2
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
8-3
ijin
gL
an
di
ng
Te
c
3.
hn
ol
og
ie
s
IT WebLogic
8-4
4.
Be
8-5
5.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
8-6
ie
s
6.
8-7
hn
ol
og
Te
c
ijin
gL
an
di
ng
8-8
8.3
Be
1.
2.
8-9
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
8-10
Te
c
3.
hn
ol
og
ie
s
IT WebLogic
8-11
->
ijin
gL
an
di
ng
4.
Be
8-12
HTTP
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
8-13
ijin
gL
an
di
ng
Te
c
5.
hn
ol
og
ie
s
IT WebLogic
8-14
Be
6.
8-15
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
8-16
ie
s
8.4
Te
c
hn
ol
og
1.
8-17
Be
ijin
gL
an
di
ng
2.
8-18
3.
8-19
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
4.
8-20
ijin
gL
an
di
ng
6.
Te
c
8-21
hn
ol
og
ie
s
5.
8-22
Be
7.
8-23
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
8-24
HTTP
ie
s
8.5
Te
c
hn
ol
og
1.
8-25
Be
ijin
gL
an
di
ng
2.
8-26
3.
8-27
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
4.
HTTP
ie
s
HTTP HTTP
( HTTP )
hn
ol
og
8-28
HTTP
ijin
gL
an
di
ng
Te
c
5.
8-29
java.text.SimpleDateFormat (%)
access_%yyyy%_%MM%_%dd%_%hh%_%mm%.log
8-1
HTTP access_yyyy_MM_dd_hh_mm.log
Be
HTTP
2010 11 24 10:05
access_2010_11_24_10_05.log
HTTP HTTP
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
8-30
hn
ol
og
ie
s
IT WebLogic
7.
Te
c
(1 - 65535 KB)
Be
ijin
gL
an
di
ng
HTTP
8-31
java.text.SimpleDateFormat MM-DD-yyyyk:mm:ss
8.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
IT WebLogic
8-32
ijin
gL
an
di
ng
Te
c
9.
hn
ol
og
ie
s
8-33
Be
10. HTTP
8-34
11. HTTP
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
IT WebLogic
8-35
8-36
hn
ol
og
ie
s
12. HTTP
ijin
gL
an
di
ng
Te
c
13. (GMT)
8-37
Be
14.
8-38
15.
8-39
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
IT WebLogic
HTTP
8.6
HTTP
8-40
ijin
gL
an
di
ng
Te
c
2.
hn
ol
og
ie
s
1.
8-41
Be
3.
8-42
4.
> HTTP
Post - HTTP POST
Post - Servlet HTTP Post
Post - Servlet HTTP Post Post
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
IT WebLogic
-
- HTTP
HTTPS - HTTPS
-
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
5.
8-43
Be
6.
8-44
HTTP
8.7
1.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 16 -
IT WebLogic
8-45
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
2.
8-46
3.
8-47
4.
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 17 -
8-48
hn
ol
og
ie
s
IT WebLogic
Be
ijin
gL
an
di
ng
Te
c
5.
8-49
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 18 -
8-50
ijin
gL
an
di
ng
Te
c
6.
hn
ol
og
ie
s
IT WebLogic
8-51
8.8
web
Be
1.
8-52
2.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 19 -
8-53
Web web
ijin
gL
an
di
ng
Te
c
3.
hn
ol
og
ie
s
IT WebLogic
8-54
4.
8-55
Be
5.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 20 -
Be
ijin
gL
an
di
ng
6.
Te
c
8-56
hn
ol
og
ie
s
IT WebLogic
8-57
7.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 21 -
IT WebLogic
8-58
8.9
hn
ol
og
web
ijin
gL
an
di
ng
Te
c
1.
ie
s
8-59
Be
2.
8-60
3.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 22 -
IT WebLogic
8-61
8-62
ijin
gL
an
di
ng
Te
c
5.
hn
ol
og
ie
s
4.
8-63
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 23 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
...................................................................................................
3
9 WebLogic ...................................................................................................
...................................................................................................3
9.1
......................................................................................................................... 3
9.1.1
........................................................................................................................ 3
9.1.2 JDBC...................................................................................................................................3
9.1.3
.................................................................................................................... 3
9.1.4
........................................................................................................................ 3
9.1.5
JNDI ......................................................................................................3
9.1.6
.................................................................................................................... 3
9.1.7 XML .......................................................................................................................4
9.1.8 XML ...........................................................................................................4
9.1.9 jCOM.................................................................................................................................. 4
9.1.10
........................................................................................................................ 4
9.1.11
File T3............................................................................................................................ 4
9.1.12
JTA................................................................................................................................. 4
9.2
Machine................................................................................................................................... 4
9.3
JDBC .............................................................................................................................. 5
9.4
Node Manager .......................................................................................................... 11
9.5
JMS ...............................................................................................................................12
9.6
WTC ............................................................................................................................. 14
9.7
................................................................................................................... 16
9.8
JDK...............................................................................................................................16
9.9
WebLogic ......................................................................................................... 17
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
Logic
9 Web
WebL
WebLogic Server
windows XP
9.1
hn
ol
og
ie
s
Web JSP
URL
http://hostname:port/console,
jdbc
Te
c
9.1.1
ijin
gL
an
di
ng
9.1.2 JDBC
9.1.3
( JMS )
JDBC
Be
9.1.4
(
)
9.1.5 JNDI
JNDI WebLogic Server JNDI
Java JNDI JNDI
WebLogic Server
9.1.6
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
9.1.7 XML
XML WebLogic Server XML WebLogic
Server XML XML
XML
9.1.8 XML
XML URL EAR
XML
jCOM
ie
s
9.1.9
hn
ol
og
9.1.10
9.1.11 File T3
Te
c
ijin
gL
an
di
ng
9.1.12 JTA
WebLogic Server
, ACID (
(Atomicity), (Consistency), (Isolation), (Durability))
9.2
Machine
Be
WebLogic Server ()
WebLogic Server ( HTTP )
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
ie
s
9-1
9.3
JDBC
ijin
gL
an
di
ng
Te
c
JDBC
hn
ol
og
Be
9-2
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
Te
c
hn
ol
og
ie
s
IT WebLogic
ijin
gL
an
di
ng
9-3
Be
next
9-4
oracle show parameter name
db_name CHENG
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
ie
s
IT WebLogic
9-5
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
9-6
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
Te
c
hn
ol
og
ie
s
IT WebLogic
ijin
gL
an
di
ng
9-7
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
9-8
test configuration connection
test succeed
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
jdbc
9-9
Be
Targets
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
Te
c
hn
ol
og
ie
s
IT WebLogic
9-10
ijin
gL
an
di
ng
9-11
Be
jdbc
9-12
jdbc jdbc
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
Te
c
hn
ol
og
ie
s
IT WebLogic
ijin
gL
an
di
ng
9-13
9.4
Node Manager
WebLogic Server
WebLogic Server
WebLogic Server
WebLogic
WebLogic Server
WebLogic
Server
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
9-14
hn
ol
og
ie
s
IT WebLogic
Be
ijin
gL
an
di
ng
Te
c
9-15
9-16
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
IT WebLogic
9.5
JMS
JMS JMS
JMS
JMS
JMS
JMS
JMS
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
1.
9-17
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
IT WebLogic
9-18
9.6
WTC
2.
WTC
Be
1.
3.
WTC WTC
4.
5.
WTC
WTC
6.
WTC
7.
8.
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
9-19
hn
ol
og
ie
s
IT WebLogic
ijin
gL
an
di
ng
Te
c
9-19
9.
Local APs
Be
10.
Access Point:myLocalAp
Access Point ID:TDOM2
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
IT WebLogic
Access point:myRemoteAP
AccessPoint ID:TDOM1
Local Access Point:myLocalAp
Network address ://123.123.123.123.1234( ip )
14. OK
/:
15. Exported tab
ie
s
Resource name:TOLOWER
Local Access Point myLocalApp
hn
ol
og
EJB name:tuxedo.services.TOLOWERHome
Remote name:TOLOWER
16. OK
17. WTC
ijin
gL
an
di
ng
Te
c
18. myrealm
9-20
TDOM1
9.7
Be
weblogic
startManagedWebLogic.cmd call
"%DOMAIN_HOME%\bin\setDomainEnv.cmd" %*
setDomainEnv.cmd set MEM_ARGS=Xms256m -Xmx512m
9-21
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 16 -
IT WebLogic
Xms Java Xmx
9.8
JDK
hn
ol
og
ie
s
SDK c:\bea\jrockit90
set JAVA_VENDOR=Sun
Te
c
set JAVA_HOME=C:\myJDKs\jdk1.6.0_18
WebLogic
ijin
gL
an
di
ng
9.9
WebLogic
Bug WebLogic Server
1 Oracle Oracle
2 Oracle
3
4 readme
Be
5 readme
6
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 17 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
................................................................................................... 3
10
SSH ...................................................................................................
10.1
MVC ............................................................................................................................... 3
10.1.1
MVC ...................................................................................................................... 3
10.1.2
MVC .............................................................................................................. 3
10.1.3
MVC...................................................................................................... 4
10.1.4
MVC .................................................................................................................. 4
10.2
......................................................................................................................... 4
10.2.1
struts .......................................................................................................................4
10.2.2
Spring .....................................................................................................................5
10.2.3
Hibernate ............................................................................................................... 6
10.3
WebLogic Spring ............................................................................................... 7
10.3.1
............................................................................................................ 7
10.3.2
Spring .............................................................................................................8
10.3.3
Spring ............................................................................................ 8
10.3.4
Spring ........................................................................................ 8
10.3.5
Web ................................................................................................................ 9
10.3.6
............................................................................................................................ 9
.................................................................................................................... 9
10.3.7
10.3.8
Java Management Extension........................................................................................ 10
10.3.9
WebLogic Server Spring Framework ..................................................10
10.3.9.1 WLS9.x.................................................................................................................... 10
10.3.9.2 WLS10.x.................................................................................................................. 13
10.3.10 Spring ...................................................................................................13
10.3.10.1 ............................................................................................... 13
10.3.10.2 nullbean .................................................................... 14
10.4
WebLogic Struts .............................................................................................. 14
10.4.1
Struts ............................................................................... 14
10.4.2
WebLogic ............................................................................................15
10.5
WebLogic Hibernate ........................................................................................ 17
10.5.1
Hibernate ...................................................................................... 17
10.5.2
.............................................................................................................. 19
10.5.3
...................................................................................................................... 19
10.6
Tomcat WebLogic ....................................................................20
10.6.1
JDK Servlet ............................................................................................. 20
10.6.2
Include ................................................................................................................. 20
10.6.3
Log4j ............................................................................................... 20
10.6.4
Hibernate3Axis ........................................................................................ 21
10.6.5
Axis .net Web Service ...................................................... 22
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
10 SSH
SSH
WebLogic SSH
10.1 MVC
ie
s
SSH
10.1.1 MVC
hn
ol
og
10.1.2 MVC
Te
c
ijin
gL
an
di
ng
MVC MVC
1.
Web HTML
Web HTML
Macromedia Flash XHTMLXML/XSLWML
Web servicesMVC
2.
Be
MVC
EJB ColdFusion Component
3.
Web
HTML
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
MVC
10.1.3 MVC
Web ASPPHPJSP CFML
HTML
MVC
Te
c
hn
ol
og
ie
s
MV
MVC Flash
WAP
HTML
Macromedia Flash WAP
Flash
ijin
gL
an
di
ng
MVC
10.1.4 MVC
MVC
Be
MVC
MVC
MVC
MVC
MVC
MVC
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
10.2
10.2.1 struts
Model
hn
ol
og
1.
ie
s
JavaBean
2.
View
Te
c
JSP
Struts
Model
Controller
ijin
gL
an
di
ng
3.
Controller
Model
Action
10.2.2 Spring
Be
JavaBean EJB
Java
Spring (IoC)(AOP)
1.
Spring Spring
1MB JAR Spring Spring
Spring Spring
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
2.
IoC JNDI --
3.
4.
ie
s
Spring
auditingtransaction
----
5.
hn
ol
og
Spring
bean prototype bean
Spring EJB
Te
c
Spring Spring
XML Spring
ijin
gL
an
di
ng
Spring
Spring Spring
framework
AOP
Be
Spring
Spring
Spring Spring
Spring Struts,HibernateHessionQuartz
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
J2EE API
IT WebLogic
10.2.3 Hibernate
ie
s
Hibernate JDBC
Java Hibernate
JDBC Java
Servlet/JSP Web Hibernate EJB J2EE
CMP
1.
hn
ol
og
Hibernate 5 :SessionSessionFactory
TransactionQuery Configuration 5
Session
2.
SessionFactory
Te
c
ijin
gL
an
di
ng
SessionFactory Hibernate
Session SessionFactory
SessionFactory
SessionFactory
3.
Configuration
Transaction
Transaction
Query Criteria
Be
5.
Spring
WebLogic Server Spring
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
10.3.1
WebLogic Server WebLogic Server
WebLogic Server
ie
s
hn
ol
og
10.3.2 Spring
Te
c
10.3.3 Spring
ijin
gL
an
di
ng
Spring
POJO Spring bean RMI
Vanilla Spring POJO JRMPSun RMI
JndiRmiProxyFactoryBean
Spring on WebLogic Server JndiRmiProxyFactoryBean
J2EE RMI POJO RMIIIOP t3
WebLogic RMI RMI
POJO WebLogic Server
Spring
10.3.4 Spring
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
10-1
c.
10-2
e.
10.3.5 Web
hn
ol
og
10-3
ie
s
d. Springconsole
ijin
gL
an
di
ng
Te
c
1)
2)
3)
Be
10.3.6
WebLogic Server J2EE
J2EE
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
WebLogic Server LDAP
Active Directory
10.3.7
hn
ol
og
ie
s
Spring Spring
J2EE JTA
WebLogicJtaTransactionManager Spring JTA WebLogic Server
JTA
WebLogicJtaTransactionManager WebLogic Server Java
Transaction APIWebLogic Server JTA TransactionManager JNDI
bean Spring
Te
c
WebLogicJtaTransactionManager
WebLogicJtaTransactionManager
WebLogic Administration Console WebLogicJtaTransactionManager
(per-database)
ijin
gL
an
di
ng
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
10.3.9.1 WLS9.x
RMI NullPointerException
CR242675
CR236708
hn
ol
og
ie
s
9.09.2
BEA WebLogic
Server/Spring
8.1SP05
9.09.2
CR242923
Te
c
T3
9.09.2
ijin
gL
an
di
ng
IIOP
CR242883
9.09.2
CR237532
8.1SP05
9.09.2
Be
CR241195
weblogic.servlet.jsp.PageContextImpl.getAttribute(
PageContextImpl.java:273)
at
javax.servlet.jsp.jstl.core.Config.get(Config.java
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
:145) at
javax.servlet.jsp.jstl.core.Config.find(Config.jav
a:393) at
org.apache.taglibs.standard.tag.common.fmt.TimeZon
eSupport.getTimeZone(TimeZoneSupport.java:140)
includes.jsp
ie
s
CR244683
hn
ol
og
medrec-spring jdk150_01
jdk150_03
MedRec-Spring MedRecSpring
CR244693
9.09.2
ijin
gL
an
di
ng
CR244691
Te
c
MedRec-Spring
localhost
9.09.2
CR243957
9.09.2
-Dweblogic.slc=true
domainRuntimeServerService
Be
countries_mbeans.war
WebLogic Server autodeploy
countries_mbeans.war Web
Spring
9.2
CR280985
WebLogic Server
countries_mbeans.war Web
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
IT WebLogic
Spring Pet Clinic
weblogic.xml.jaxp.RegistrySAXTransformerFactory
$java.home/lib/jaxp.properties XML
javax.xml.transform.TransformerFactory=org.
apache.xalan.processor.TransformerFactoryImpl
hn
ol
og
javax.xml.xpath.XPathFactory=org.apache.xpa
th.jaxp.XPathFactoryImpl
9.2
ie
s
CR301115
javax.xml.parsers.SAXParserFactory=org.apac
he.xerces.jaxp.SAXParserFactoryImpl
CR300748
Te
c
javax.xml.parsers.DocumentBuilderFactory=or
g.apache.xerces.jaxp.DocumentBuilderFactoryImpl
9.2
ijin
gL
an
di
ng
10-1
10.3.9.2 WLS10.x
CR319968
10.0
Be
enhence LoadTimeWeaver
enhence.
CR320649
10.0
:
JRockit R26.4 R27.2.
10-2
10.3.10
Spring
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
IT WebLogic
jdk1.6 Spring2.0.5Spring2.5weblogic10.3.1
weblogic8.1
Spring2.0.5 weblogic8.1
Spring2.5 weblogic8.1
Spring2.5 Weblogic10.3.1
Spring2.0.5 weblogic10.3.1
orcale
wls 10.0
wls 9.2
Spring 2.5.x
Spring 2.0.x
Spring 1.2.82.0.x2.5.x
hn
ol
og
10.3.10.1
ie
s
wls 10.3
Spring 2.5.6
Te
c
ijin
gL
an
di
ng
10-1
10.3.10.2 nullbean
Spring web.xml
web.xml Spring
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
IT WebLogic
<param-value>/WEB-INF/classes/applicationContext-*.xml</param-value>
</context-param>
10-2
<param-value> </param-value> xml xml
, applicationContext-*.xml
applicationContext-ibatis-base.xmlapplicationContextaction.xmlapplicationContext-ibatis-dao.xml
hn
ol
og
10.4.1 Struts
ie
s
WebLogic WebLogic
WebLogic Log4jStruts
WebLogic Struts
Logging MessageINFO INFO
Te
c
system.out.println() WebLogic
stdout WebLogic Server
JAVA_OPTIONS
ijin
gL
an
di
ng
-Dweblogic.Stdout="stdout-filename"
-Dweblogic.Stderr="stderr-filename"
10-3
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
IT WebLogic
127.0.0.1 - - [14/Aug/2004:22:36:58 -0615] "POST /strutssample/getIndiData.do;jsessionid=Be2WKm1nP7DGdX1uIY8PraQdx51wBZTjVSswGHdcbL4njc
jXOdJh!1670519755 HTTP/1.1" 200 4684
127.0.0.1 - - [14/Aug/2004:22:36:59 -0615] "GET /strutssample/pages/STFull.jpg HTTP/1.1" 304 0
10-4
10.4.2 WebLogic
hn
ol
og
ie
s
Struts
NoClassDefFoundError ClassNotFoundException
ClassNotFoundException
NoClassDefFoundError
NoClassDefFoundError
WebLogic WebLogic
StartWeblogic WebLogic
Dweblogic.Debug=debug.lineNumbers,debug.methodNames,weblogic.ClassLoade
rVerbose,weblogic.ClassLoader
Te
c
LoggingDebug to Stdout
enabled
ijin
gL
an
di
ng
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 16 -
IT WebLogic
[ChangeAwareClassLoader] :
weblogic.utils.classloaders.ChangeAwareClassLoader@18a6890 finder:
weblogic.utils.classloaders.MultiClassFinder@ad8bb4 annotation: strutsexample@struts-example about to loadClass(org.apache.struts.taglib.html.ImgTag)
[GenericClassLoader] : Looking for class:
org.apache.struts.taglib.html.ImgTag...
10-5
ie
s
Struts org.apache.struts.taglib.html.ImgTag
war
:
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 17 -
IT WebLogic
Te
c
10-6
hn
ol
og
ie
s
ijin
gL
an
di
ng
10.5.1 Hibernate
WebLogic
Be
org.hibernate.hql.ast.HqlToken org.hibernate.QueryException:
ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from
com.dhcc.mm5.QbMm5List]
at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)
at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)
at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)
at antlr.CharScanner.<init>(CharScanner.java:51)
at antlr.CharScanner.<init>(CharScanner.java:60)
at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:56)
at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:53)
at org.hibernate.hql.antlr.HqlBaseLexer.<init>(HqlBaseLexer.java:50)
at org.hibernate.hql.ast.HqlLexer.<init>(HqlLexer.java:26)
at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse
(QueryTranslatorImpl.java:232)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile
(QueryTranslatorImpl.java:155)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile
(QueryTranslatorImpl.java:109)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:75)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:54)
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 18 -
IT WebLogic
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan
(QueryPlanCache.java:71)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan
(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery
(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583)
at com.dhcc.mm5.QbMm5ListDAO.findAll(QbMm5ListDAO.java:141)
at jsp_servlet.__left._jspService(__left.java:114)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet
(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException
(ServletStubImpl.java:391)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:309)
at weblogic.servlet.internal.ServletStubImpl.execute
(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext
$ServletInvocationAction.run(WebAppServletContext.java:3370)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute
(WebAppServletContext.java:2117)
at weblogic.servlet.internal.WebAppServletContext.execute
(WebAppServletContext.java:2023)
at weblogic.servlet.internal.ServletRequestImpl.run
(ServletRequestImpl.java:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
10-7
Be
10.5.2
1 Hibernate3.0
hibernate.query.factory_class=
org.hibernate.hql.ast.ASTQueryTranslatorFactory
2 Hibernate2.1
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 19 -
IT WebLogic
hibernate.query.factory_class=
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
3.0 1
2
10.5.3
10-8
hn
ol
og
<property name="query.factory_class">
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
</property>
ie
s
hibernate.properties
hibernate.query.factory_class
org.hibernate.hql.classic.ClassicQueryTranslatorFactory. cfg.xml ,
hibernate.cfg.xml <session-factory>:
WebLogic antlr-2.7.5H3.jar
Te
c
ijin
gL
an
di
ng
10.6.2 Include
Be
10.6.3 Log4j
.war WebLogic
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 20 -
IT WebLogic
Error: weblogic.management.DeploymentException: Cannot set web app root
system property when WAR file is not expanded - with nested exception:
[java.lang.IllegalStateException: Cannot set web app root system property
when WAR file is not expanded]
10-9
hn
ol
og
ie
s
ijin
gL
an
di
ng
Te
c
Be
webAppRootKey WebLogic
web.xml
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>webapp.root</param-value>
</context-param>
10-11
WebLogic Log4j .war Spring
org.springframework.web.util.Log4jConfigListener , Servlet
web.xml
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 21 -
IT WebLogic
<listener id="log4jConfigListener">
<listener-class>org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>
10-12
Listener Servlet web.xml
10-13
10.6.4 Hibernate3Axis
hn
ol
og
ie
s
<servlet>
<servlet-name>log4jConfigListener</servlet-name>
<servlet-class>org.springframework.web.util.Log4jConfigServlet
</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
Te
c
Hibernate3 hibernate.query.factory_class
org.hibernate.hql.ast.ASTQueryTranslatorFactory WebLogic
org.hibernate.QueryException: ClassNotFoundException:
org.hibernate.hql.ast.HqlToken
ijin
gL
an
di
ng
WebLogic
EJB-QL parser ClassNotFoundException
() startWebLogic antlr-2.7.5H3.jar
WEB-INF weblogic.xml
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
10-14
Be
Axis
1 startWebLogic web
prefer-web-inf-classes=trueBEA WebLogic JSP
true
2 Axis prefer-web-inf-classes=true
saaj.jar webservices.jar saaj.jar
axis
webservices.jar
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 22 -
IT WebLogic
java.lang.NoSuchMethodError:
javax.xml.namespace.QName.getPrefix()Ljava/lang/String
10-15
.net Web Service Tomcat Windows
BEA WebLogic 8.1 SP5 HPUX
javax.xml.namespace.QName.getPrefix()
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
jaxrpc.jar webservices.jar
javax.xml.namespace.QName startWebLogic.sh jaxpc.jar
webservices.jar
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 23 -
ec
hn
o
lo
gie
IT
Be
ijin
gL
an
di
ng
T
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
T
ec
hn
o
lo
gie
.....................................................................................................................
11
.....................................................................................................................
.....................................................................................................................33
11.1
WebLogic ....................................................................................................................... 3
11.1.1
........................................................................................................................ 3
11.1.2
................................................................................................................................ 3
11.1.3
WebLogic....................................................................................................................... 3
11.2
..................................................................................................................... 6
11.2.1
server_name.log..............................................................................................................6
11.2.2
access.log........................................................................................................................6
11.2.3
log.................................................................................................................. 6
11.2.4
domain_name.log............................................................................................................6
11.2.5
jms.messages.log............................................................................................................ 7
11.3
......................................................................................... 7
11.4
Thread dump ................................................................................................... 7
11.4.1
Thread dump ...................................................................................................... 7
11.4.2
thread dump................................................................................................... 7
11.4.3
Thread dump .................................................................................................. 8
11.4.3.1 ....................................................................................................... 8
11.4.4
thread dump ...............................................................................9
11.5
Heap dump ........................................................................................................10
11.5.1
heap dump........................................................................................................10
11.5.2
heap dump....................................................................................................11
11.5.3
Jps Jmap......................................................................................................11
11.5.4
Jmap .....................................................................................................................11
11.5.5
Jmap ......................................................................................................... 13
11.6
Java dump ........................................................................................ 14
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
11
DOMAIN_NAME ADMIN_SERVER_NAME
SERVER_NAME
11.1 WebLogic
WebLogic
gie
11.1.1
lo
ec
hn
o
11.1.2
domain
2.
WebLogic
3.
Multicast
11.1.3 WebLogic
ng
T
1.
WebLogic
JVM
an
di
1.
GC
2.
GC
gL
WebLogic JVM GC
ijin
GC GC GC
3.
Be
WebLogic WebLogic 9
100
4.
stuck
stuck
stuck 0 stuck 0
JVM thread dump java
core stuck
thread dump kill -3 <wls_pid>
5.
JDBC
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
WebLogic
6.
WebLogic
ec
hn
o
11-1
lo
gie
response
outputstream
filter
ng
T
stuck
an
di
<[STUCK] ExecuteThread: '32' for queue: 'weblogic.kernel.Default (selftuning)' has been busy for "632" seconds working on the request "Http Request:
/stat/test/TestCtrl.statOracleTest.do", which is more than the configured time
(StuckThreadMaxTime) of "600" seconds.
11-2
gL
32 600
cpu
32 unstuck
Be
ijin
<[STUCK] ExecuteThread: '32' for queue: 'weblogic.kernel.Default (selftuning)' has become "unstuck".>
11-3
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
URL
####<Feb 28, 2010 4:26:20 PM GMT+08:00> <Error> <HTTP> <yanzheng2> <wls6>
<ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'> <<WLS Kernel>> <> <>
<1267345580932> <BEA-101215> <Malformed Request "/service/js/landingbj/mareal
</option><option value=". Request parsing failed, Code: -1>
11-5
1 /service/js/mareal/mareal </option><option
value=WebLogic . URL
gie
class
ec
hn
o
lo
java.lang.ClassNotFoundException:
com.qtong.hebmc.controller.js.landingbj.mareal.jobile.com.service.LoginCtrl
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:130)
at com.landingbj.sterna.Controller.parseController(Controller.java:67)
... 20 more
11-6
java
ng
T
gL
an
di
IP
ijin
bug OOM
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
at javax.imageio.ImageIO.write(ImageIO.java:1554)
at com.landingbj.hebmc.controller.LoginCtrl.smsRandomPic
(LoginCtrl.java:267)
... 21 more
11-8
com.sun.imageio.plugins.jpeg.JPEGImageWriter bug
OOM
gie
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at com.landingbj.hebmc.controller.nethall.ChongZhiKaChaXunCtrl.transact
(ChongZhiKaChaXunCtrl.java:25)
11.2
WebLogic
11.2.1 server_name.log
ec
hn
o
lo
11-9
ng
T
Server_name.log
DOMAIN_NAME/servers/SERVER_NAME/logs/server_name.log
an
di
11-10
11.2.2 access.log
IP
gL
access.log
DOMAIN_NAME/servers/SERVER_NAME/logs/access.log
ijin
11-11
11.2.3 log
Be
11.2.4 domain_name.log
DOMIAN DOMAIN WebLogic SERVER
DOMAIN ADMINISTRATOR SERVER
ADMINISTRATOR SERVER DOMAIN
DOMAIN_NAME/servers/ADMIN_SERVER_NAME/logs/DOMAIN_NAME.log.
11-12
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
11.2.5 jms.messages.log
JMS
JMS
JMS
logs
DOMAIN_NAME/servers/SERVER_NAME/logs/jmsServers/SERVER_NAMEJMSServer/jms.me
ssages.log
11-12
gie
11.3
lo
ec
hn
o
WebLogic DOMAIN_NAME/bin/
setDomainEnv.sh WLS_HOME/common/bin/ commEnv.sh
commEnv.sh weblogic setDomainEnv.sh
domain setDomainEnv.sh
ng
T
WebLogic
WebLogic
an
di
managed server
ijin
gL
#!/bin/sh
USER_MEM_ARGS="-Xms4096m -Xmx4096m"
export USER_MEM_ARGS
#=====================
nohup /home/weblogic/bea/user_projects/domains/landingbj_8001/bin
/startManagedWebLogic.sh App161_8001 http://127.0.0.1:7001 >>
/home/weblogic/bea/user_projects/domains/xxx2100_8001/bin/App161_8001.out &
11-13
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
UNIX Solaris kill quit wls
kill -3 wls thread dump
Thread dump WebLogic
nohup /home/weblogic/bea/user_projects/domains/landingbj_8001/bin/
startManagedWebLogic.sh App161_8001 http://127.0.0.1:7001 >>
/home/weblogic/log/App161_8001.out &
11-14
Thread dump /home/weblogic/log/App161_8001.out
gie
ec
hn
o
WebLogic
lo
Thread dumps
11.4.3.1
WebLogic
ng
T
11.4.3.1.1WebLogic wait
ijin
gL
an
di
"[ACTIVE] ExecuteThread: '30' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x0000000040ae9d50 nid=0x6ccf in Object.wait()
[0x00007f6e6d48f000..0x00007f6e6d48fd90]
at java.lang.Object.wait(Native Method)
- waiting on <0x00007f6eab8764d8> (a weblogic.work.ExecuteThread)
at java.lang.Object.wait(Object.java:474)
at weblogic.work.ExecuteThread.waitForRequest(ExecuteThread.java:165)
- locked <0x00007f6eab8764d8> (a weblogic.work.ExecuteThread)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:186)
11-15
Be
weblogic.work.ExecuteThread.waitForRequest
11.4.3.1.2
"[ACTIVE] ExecuteThread: '219' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00007f6e50345a50 nid=0x6e16 runnable
[0x00007f6e5d668000..0x00007f6e5d66bb10]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
- locked <0x00007f6f40cc0220> (a java.io.BufferedInputStream)
at weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:220)
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
11-16
runnable
at java.net.SocketInputStream.socketRead0 (Native Method)
11.4.3.1.3
ec
hn
o
lo
gie
"[ACTIVE] ExecuteThread: '215' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00007f6e50bd84d0 nid=0x6e12 waiting for monitor
entry [0x00007f6e5d72d000..0x00007f6e5d72fd10]
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:35)
- waiting to lock <0x00007f6eacbca018>
(a weblogic.utils.classloaders.ChangeAwareClassLoader)
at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:88)
at javax.xml.parsers.FactoryFinder.findJarServiceProvider
(FactoryFinder.java:278)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)
at javax.xml.parsers.DocumentBuilderFactory.newInstance
(DocumentBuilderFactory.java:98)
..
11-17
ng
T
an
di
gL
net/SocketNativeIOcom/informix/jdbc/IfxSqli.executeStatementQuery
Be
ijin
com/xxxxx/prpall/service/spring/PrpWorkbenchMainServiceSpringImpl.getPrpC
FlowInfos
[STUCK] ExecuteThread: '136' for queue: 'weblogic.kernel.Default (selftuning)'" id=150 idx=0x2b0 tid=2639 prio=1 alive, in native, daemon
at jrockit/net/SocketNativeIO.readBytesPinned
(Ljava/io/FileDescriptor;[BIII)I(Native Method)
at jrockit/net/SocketNativeIO.socketRead(SocketNativeIO.java:46)
at java/net/SocketInputStream.socketRead0
(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.java)
at java/net/SocketInputStream.read(SocketInputStream.java:129)
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)
at java/io/BufferedInputStream.read(BufferedInputStream.java:313)
^-- Holding lock: java/io/BufferedInputStream@0x7fe572257740[thin lock]
at com/informix/asf/IfxDataInputStream.readFully
(IfxDataInputStream.java:146)
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
Be
ijin
gL
an
di
ng
T
ec
hn
o
lo
gie
at com/informix/asf/IfxDataInputStream.readSmallInt
(IfxDataInputStream.java:453)
at com/informix/jdbc/IfxSqli.receiveMessage(IfxSqli.java:2495)
at com/informix/jdbc/IfxSqli.a(IfxSqli.java:1752)
at com/informix/jdbc/IfxSqli.executeStatementQuery(IfxSqli.java:1704)
at com/informix/jdbc/IfxSqli.executeStatementQuery(IfxSqli.java:1635)
at com/informix/jdbc/IfxResultSet.a(IfxResultSet.java:206)
at com/informix/jdbc/IfxStatement.executeQueryImpl
(IfxStatement.java:1229)
at com/informix/jdbc/IfxPreparedStatement.executeQuery
(IfxPreparedStatement.java:376)
at weblogic/jdbc/wrapper/PreparedStatement.executeQuery
(PreparedStatement.java:100)
at org/hibernate/jdbc/AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org/hibernate/loader/Loader.getResultSet(Loader.java:1812)
at org/hibernate/loader/Loader.doQuery(Loader.java:697)
at org/hibernate/loader/Loader.doQueryAndInitializeNonLazyCollections
(Loader.java:259)
at org/hibernate/loader/Loader.doList(Loader.java:2232)
at org/hibernate/loader/Loader.listIgnoreQueryCache(Loader.java:2129)
at org/hibernate/loader/Loader.list(Loader.java:2124)
at org/hibernate/loader/hql/QueryLoader.list(QueryLoader.java:401)
at org/hibernate/hql/ast/QueryTranslatorImpl.list
(QueryTranslatorImpl.java:363)
at org/hibernate/engine/query/HQLQueryPlan.performList
(HQLQueryPlan.java:196)
at org/hibernate/impl/SessionImpl.list(SessionImpl.java:1149)
at org/hibernate/impl/QueryImpl.list(QueryImpl.java:102)
at ins/framework/dao/EntityDaoHibernate$5.doInHibernate
(EntityDaoHibernate.java:506)
.
at weblogic/security/acl/internal/AuthenticatedSubject.doAs
(AuthenticatedSubject.java:321)
at weblogic/security/service/SecurityManager.runAs
(SecurityManager.java:121)
at weblogic/servlet/internal/WebAppServletContext.securedExecute
(WebAppServletContext.java:2010)
at weblogic/servlet/internal/WebAppServletContext.execute
(WebAppServletContext.java:1916)
at weblogic/servlet/internal/ServletRequestImpl.run
(ServletRequestImpl.java:1366)
at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
at weblogic/work/ExecuteThread.run(ExecuteThread.java:181)
at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
11-18
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
lo
gie
ec
hn
o
ng
T
11-19
an
di
jmap Java
pid
jmap pid
gL
11-20
ijin
Be
3024 heap f1
11.5.4 Jmap
1.
:http://www.landingbj.com
: 400-810-2327
//
// JVM (default 40)
// JVM (default 70)
// JVM
// JVM
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
MaxNewSize =4095MB
OldSize = 4.0MB
NewRatio = 8
SurvivorRatio = 8
PermSize= 16.0MB
MaxPermSize=64.0MB
// JVM
// JVM
//
// Eden Survivor
// JVM
// JVM
ijin
gL
an
di
ng
T
ec
hn
o
lo
gie
Heap Usage:
//
PS Young Generation
Eden Space:
//Eden
capacity = 20381696 (19.4375MB)
//Eden
used
= 20370032 (19.426376342773438MB) //Eden
free
= 11664 (0.0111236572265625MB)
//Eden
99.94277218147106% used
//Eden
From Space:
// Survivor
capacity = 8519680 (8.125MB)
used
= 32768 (0.03125MB)
free
= 8486912 (8.09375MB)
0.38461538461538464% used
To Space:
// Survivor
capacity = 9306112 (8.875MB)
used
= 0 (0.0MB)
free
= 9306112 (8.875MB)
0.0% used
PS Old Generation
// Old
capacity = 366280704 (349.3125MB)
used
= 322179848 (307.25464630126953MB)
free
= 44100856 (42.05785369873047MB)
87.95982001825573% used
PS Perm Generation
//
capacity = 32243712 (30.75MB)
used
= 28918584 (27.57891082763672MB)
free
= 3325128 (3.1710891723632812MB)
89.68751488662348% used
2.
11-22
Be
num
1:
2:
3:
4:
5:
6:
7:
8:
9:
#instances
#bytes
class name
---------------------------------------------3174877
107858256 [C
3171499
76115976 java.lang.String
1397884
38122240 [B
214690
37785440 com.tongli.book.form.Book
107345
18892720 com.tongli.book.form.Book
65645
13953440 [Ljava.lang.Object;
59627
7648416 <constMethodKlass>
291852
7004448 java.util.HashMap$Entry
107349
6871176 [[B
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
IT WebLogic
total
9150732
353969416
11-23
3.
jmap - dump
pid
11.5.5 Jmap
1
1.
gie
ec
hn
o
lo
=
=
=
=
=
=
=
=
=
=
40
70
1073741824 (1024.0MB)
1048576 (1.0MB)
4294901760 (4095.9375MB)
4194304 (4.0MB)
8
8
134217728 (128.0MB)
268435456 (256.0MB)
Be
ijin
gL
an
di
Heap Configuration:
MinHeapFreeRatio
MaxHeapFreeRatio
MaxHeapSize
NewSize
MaxNewSize
OldSize
NewRatio
SurvivorRatio
PermSize
MaxPermSize
ng
T
Heap Usage:
PS Young Generation
Eden Space:
capacity = 118358016 (112.875MB)
used
= 38070328 (36.30669403076172MB)
free
= 80287688 (76.56830596923828MB)
32.165398919833194% used
From Space:
capacity = 458752 (0.4375MB)
used
= 155664 (0.1484527587890625MB)
free
= 303088 (0.2890472412109375MB)
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
ec
hn
o
lo
gie
IT WebLogic
33.932059151785715% used
To Space:
capacity = 458752 (0.4375MB)
used
= 0 (0.0MB)
free
= 458752 (0.4375MB)
0.0% used
PS Old Generation
capacity = 954466304 (910.25MB)
used
= 72784624 (69.41282653808594MB)
free
= 881681680 (840.8371734619141MB)
7.625688166776813% used
PS Perm Generation
capacity = 134217728 (128.0MB)
used
= 38192248 (36.42296600341797MB)
free
= 96025480 (91.57703399658203MB)
28.455442190170288% used
[root@myjrjapp-100 ~]#
11-25
2.
2
jmap dump
ng
T
11-26
heap.bin M G
Windows
an
di
11-27
Eclipse MAT
ijin
1.
gL
Be
JVM
DISABLE_JAVADUMP=trueIBM_NOSIGHANDLER=true
JVM JVM Java dump
2.
CW - Condition Wait
I/O sleep()wait()join()
B Blocked
synchronized
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
IT WebLogic
3.
Be
ijin
gL
an
di
ng
T
ec
hn
o
lo
gie
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.........................................................................................................
4
12
.........................................................................................................
.........................................................................................................4
12.1
..................................................................................................................... 4
12.1.1
........................................................................................................ 4
12.1.2
............................................................................................................ 4
12.1.3
............................................................................................................ 4
12.2
............................................................................................................. 5
12.2.1
.................................................................................................... 5
12.2.2
.................................................................................................... 5
12.3
..................................................................................................................... 6
12.3.1
................................................................................................................ 6
12.3.2
................................................................................................ 6
12.3.3
Thread Dump......................................................................... 6
12.3.3.1 Thread Dump .....................................................................................................6
12.3.3.2 Thread Dump................................................................ 7
12.3.3.3 Thread Dump.................................................................... 7
12.3.4
........................................................................................................ 8
12.4
............................................................................................. 8
12.4.1
Socket Reader ........................................................................ 8
12.4.1.1 Socket Reader ............................................................................................8
12.4.1.2 Socket Reader Thread Dump .............................................................................9
12.4.1.3 ........................................................................................................... 9
12.4.2
...................................................................................... 10
12.4.2.1 ..................................................................................... 10
12.4.2.2 ......................................................................................................... 10
12.4.3
...................................................................................... 11
12.5
........................................................................................... 11
12.5.1.1 ..................................................................12
12.5.1.2 ..................................................................12
12.5.1.3 ......................................................................12
12.6
............................................................................................... 13
12.7
........................................................................................... 13
12.7.1
.......................................................................13
12.7.2
.................................................................................................. 13
12.7.3
.................................................................................. 13
12.7.4
...........................................................................14
12.8
JDBC .................................................................................................15
12.8.1
JDBC ........................................................................... 15
12.8.2
JDBC ............................................................................ 15
12.8.3
JDBC .................................................................... 19
12.9
EJB RMI ................................................................................................... 20
12.9.1
EJB RMI ..................................................................................... 20
12.9.2
.................................................................................................. 20
12.9.3
EJB RMI .......................................................................................... 20
12.9.4
EJB RMI ...................................................................... 22
12.10
JSP ........................................................................................23
12.10.1 JSP .......................................................................................23
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
12
WebLogic
12.1
12.1.1
12.1.2
1
ijin
gL
an
di
ng
Te
c
hn
ol
og
WLS
ie
s
3
4
5JDBC
6EJB RMI
7JSP
8JSP
12.1.3
Be
1
2
3
A
B
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
12.2
12.2.1
1
B
hn
ol
og
ie
s
2
A
12.2.2
1
Te
c
ijin
gL
an
di
ng
2GarbageCollectionGC
GC GC
3JVM
Be
A 1 2 B 2 1
5JDBC
JDBC
6 JVM RMI
JNDI EJB RMI
7JSP
JSP
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
8JSP servlet
PageCheckSeconds JSP
9SUN JVM
SUM JVM
12.3
ie
s
JVM
hn
ol
og
12.3.1
1 PING
Te
c
ijin
gL
an
di
ng
WebLogic PING
PING
WebLogic PING
2
-verbose:gc WebLogic
WebLogic
12.3.2
Be
default
WebLogic config.xml
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
Thread Dump
WebLogic
ie
s
Thread Dump
Thread Dump WebLogic
hn
ol
og
PING WebLogic
PING Thread Dump
Te
c
ijin
gL
an
di
ng
2 Windows
1)
2)
3) 2000
4)
6) Full
dump
thread
Be
1
Sun JVM
-xx:+ShowMessageBoxOnError
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
JRockit JVM -Djrockit.waitonerror
12-3
2
3 JVM
Do
you
want
to
dubug
the
problem
12-4
ie
s
hn
ol
og
12.3.4
Te
c
WebLogic
Thread Dump
ijin
gL
an
di
ng
WebLogic
Thread Dump
JSP JSP
JSP JSP
12.4
Be
Socket Reader
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
Socket Reader Socket Reader
3 socket
ThreadPoolPercentSocketReaders Socket Reader
Socket Reader
33 33% Socket Readerr
1-99 Socket Reader
Socket Reader
WebLogic
hn
ol
og
12.4.1.2
ie
s
Be
ijin
gL
an
di
ng
Te
c
12.4.1.3
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
socketAccept
Thread Dump
12-6
hn
ol
og
ie
s
WebLogic
Thread Dump
socketAccept
Te
c
12.4.2
ijin
gL
an
di
ng
12.4.2.1
1.
Thread Dump
2.
web
3.
WebLogic Server
CRITICAL
Thread Dump
Be
12.4.2.2
1.
ThreadCount config.xml
ThreadCount
Native OutOfMemory
ThreadPoolPercentSocketReaders SocketReader
%Socket Reader
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
StuckThreadMaxTime
StuckThreadTimerInterval
ie
s
StuckThreadMaxTime WebLogic
600
12.4.3
hn
ol
og
1.
Te
c
Thread Dump
OutOfMemory
ijin
gL
an
di
ng
2.
Thread Dump
3.
EJB RMI
JSP
4.
Be
SUN JVM
JSP
12.5
GC
1.
Scavenge GC
Eden Scavenge GC
Eden GC Survivor
Survivor From To
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
2.
Full GC
GC JVM GC Full GC
Old
Survivor Survivor
GC Heap
System.gc()
hn
ol
og
12.5.1.2
ie
s
Perm
Te
c
ijin
gL
an
di
ng
12.5.1.3
1.
JVM :
New Scavange GC GC
SurvivorRatio Overflow
Permanent
Heap Full GC
2.
Be
Full GC
WebLogic
CPU Java WebLogic Server JDK
GC GC Full GC
Full GC
12.5.1.4
1.
JVM
( IBM )
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
IT WebLogic
-Xms
-Xmx
-Xmn
-XX:MaxPermSize = -XX:PermSize
-XX:SurvivorRatio
Parallel GC
-Xoptgc
XX:+DisableExplicitGC system.gc()
ie
s
TenuringThreshold
2.
hn
ol
og
JDK
12.6
Te
c
ijin
gL
an
di
ng
12.7
12.7.1
Be
12.7.2
Thread Dump
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 13 -
IT WebLogic
12.7.3
Thread Dump
Thread Dump
12-7
hn
ol
og
ie
s
"[ACTIVE] ExecuteThread: '153' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00002aab370ea700 nid=0x3eec waiting for monitor
entry [0x0000000045378000..0x000000004537bea0]
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:35)
- waiting to lock <0x00002aaabc69ddb0> (a
weblogic.utils.classloaders.ChangeAwareClassLoader)
Be
ijin
gL
an
di
ng
Te
c
"[ACTIVE] ExecuteThread: '120' for queue: 'weblogic.kernel.Default (selftuning)'" daemon prio=1 tid=0x00002aab439c2f10 nid=0x2dee runnable
[0x00000000451f0000..0x00000000451f5e20]
at java.lang.Throwable.fillInStackTrace(Native Method)
- waiting to lock <0x00002aaab0873340> (a java.lang.ClassNotFoundException)
at java.lang.Throwable.<init>(Throwable.java:218)
at java.lang.Exception.<init>(Exception.java:59)
at java.lang.ClassNotFoundException.<init>
(ClassNotFoundException.java:65)
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
- locked <0x00002aaabadfc938> (a java.net.URLClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
- locked <0x00002aaabbf1cd20> (a
weblogic.utils.classloaders.GenericClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass
(GenericClassLoader.java:161)
at weblogic.utils.classloaders.FilteringClassLoader.findClass
(FilteringClassLoader.java:83)
at weblogic.utils.classloaders.FilteringClassLoader.loadClass
(FilteringClassLoader.java:68)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
- locked <0x00002aaabd5b2228> (a
weblogic.utils.classloaders.GenericClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
- locked <0x00002aaabc69ddb0> (a
weblogic.utils.classloaders.ChangeAwareClassLoader)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass
(GenericClassLoader.java:161)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass
(ChangeAwareClassLoader.java:35)
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 14 -
IT WebLogic
- locked <0x00002aaabc69ddb0> (a
weblogic.utils.classloaders.ChangeAwareClassLoader)
12-8
ExecuteThread: 153
12.7.4
ie
s
hn
ol
og
Java
C Java Java
Be
ijin
gL
an
di
ng
Te
c
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 15 -
hn
ol
og
ie
s
IT
ijin
gL
an
di
ng
Te
c
WebLogic
Be
12.8
JDBC
JDBC Thread
Dump JDBC JDBC
JDBC
12.8.1 JDBC
ie
s
hn
ol
og
ijin
gL
an
di
ng
Te
c
TimedOutException
RollbackException JDBC WebLogic Server
WebLogic Server
600
Be
12-9
WebLogic Server
12.8.2 JDBC
JDBC DriverManager.getConnection()
SQL
JDBC
JDBC
RefreshMinutes
WebLogic Server
2.
ie
s
TestFrequencySeconds
hn
ol
og
1.
JDBC
DriverManager.getConnection()
ijin
gL
an
di
ng
Te
c
JDBC DriverManager.getConnection()
DriverManager
DriverManager WebLogic Server
DriverManager
SQLException DriverManager
DriverManager.println()
DriverManager
DriverManager.getConnection()
WebLogic
Server
DriverManager.getConnection()
Be
DriverManager
DriverManager.getConnection()
"ExecuteThread-39" daemon prio=5 tid=0x401660 nid=0x33 waiting for monitor
entry [0xd247f000..0xd247fc68]
at java.sql.DriverManager.getConnection(DriverManager.java:188)
at com.bla.updateDataInDatabase(MyClass.java:296)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:120)
ie
s
at weblogic.servlet.internal.ServletContextImpl.invokeServlet
(ServletContextImpl.java:945)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet
(ServletContextImpl.java:909)
at weblogic.servlet.internal.ServletContextManager.invokeServlet
(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet
(MuxableSocketHTTP.java:392)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:130)
12-11
SQL
hn
ol
og
3.
Te
c
SQL
WebLogic Server
JDBC
JTS
ijin
gL
an
di
ng
4.
WebLogic Server
SQL
Be
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:375)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1250)
- locked <e8c68f00> (a oracle.jdbc.ttc7.TTC7Protocol)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery
(OracleStatement.java:2529)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
(OracleStatement.java:2857)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate
(OraclePreparedStatement.java:608)
- locked <e5cc44d0> (a oracle.jdbc.driver.OraclePreparedStatement)
- locked <e8c544c8> (a oracle.jdbc.driver.OracleConnection)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery
(OraclePreparedStatement.java:536)
- locked <e5cc44d0> (a oracle.jdbc.driver.OraclePreparedStatement)
- locked <e8c544c8> (a oracle.jdbc.driver.OracleConnection)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery
(PreparedStatement.java:80)
at myPackage.query.getAnalysis(MyClass.java:94)
at jsp_servlet._jsp._jspService(__jspService.java:242)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:305)
at weblogic.servlet.internal.RequestDispatcherImpl.includ
e(RequestDispatcherImpl.java:607)
at weblogic.servlet.internal.RequestDispatcherImpl.include
(RequestDispatcherImpl.java:400)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)
at jsp_servlet._jsp.__mf1924jq._jspService(__mf1924jq.java:563)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$
ServletInvocationAction.run
(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs
(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
ie
s
12-12
5.
hn
ol
og
Thread Dump
SQL Thread Dump
SQL
Te
c
WebLogic Server
SQL
ijin
gL
an
di
ng
6.
Thread Dump
WebLogic Server
SQL
SQL
Be
12-13
7.
RefreshMinutes TestFrequencySeconds
8.
ie
s
SQL
JDBC RefreshMinutes TestFrequencySeconds
JDBC WebLogic Server
(Shrink)
hn
ol
og
WebLogic Server
Te
c
JDBC JDBC
12.8.3 JDBC
ijin
gL
an
di
ng
Thread Dump
Thread
Dump JVM (<1.3.1_09) Thread
Dump WebLogic Server Thread Dump
Be
Thread Dump
DriverManager getConnection()
Driver.connect()
DriverManager.getConnection()
12.9
EJB RMI
RMI
RMI JNDI
WebLogic JNDI
wait()
Thread Dump :
Thread Dump
12-14
hn
ol
og
Thread Dump
ie
s
. . .
at weblogic.rjvm.ResponseImpl.waitForData(ResponseImpl.java:72)
. . .
12.9.2
EJB RMI
EJB RM
Te
c
Thread Dump
ijin
gL
an
di
ng
Thread Dump
Be
at weblogic.rjvm.ResponseImpl.waitForData(ResponseImpl.java:72)
. . .
weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:341
. . .
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive
(BasicOutboundRequest.java:80
12-15
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
at java.lang.Object.wait(Native Method)
at weblogic.rjvm.ResponseImpl.waitForData(ResponseImpl.java:72)
at weblogic.rjvm.ResponseImpl.getTxContext(ResponseImpl.java:97)
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive
(BasicOutboundRequest.java:80)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke
(ReplicaAwareRemoteRef.java:262)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke
(ReplicaAwareRemoteRef.java:229)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy6.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:341)
at weblogic.servlet.internal.HttpServer.lookupROIDS(HttpServer.java:789)
at weblogic.servlet.security.internal.SecurityModule.getCurrentUser
(SecurityModule. java:207)
at weblogic.servlet.security.internal.SecurityModule.checkAuthenticate
(SecurityModule. java:235)
at weblogic.servlet.security.ServletAuthentication.weak
(ServletAuthentication.java:271
at
weblogic.servlet.security.internal.ServletSecurityManager.checkAccess
(ServletSecurityManager.java:124)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext. java:2518)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
12-16
EJB RMI
JVM
JNDI RMI
JNDI JVM
Be
weblogic.rjvm.ResponseImpl.waitForData() JVM
JVM
waitForData
JNDI JNDI JVM JNDI
InitialContext InitialContext
JNDI InitialContext
URL InitialContext
getInitialContext()
WebLogic
provider URL rjvm sendReceive()
JVM
ie
s
hn
ol
og
BasicOutboundRequest.sendReceive() waitForData()
JNDI
ijin
gL
an
di
ng
Te
c
EJB RMI
PROVIDER_URL
JNDI
Be
1 JNDI
JNDI
2 getInitialContext()
PROVIDER_URL JNDI
3
JSP
ie
s
12.10
12.10.1
JSP
hn
ol
og
J2EE
JSP
JSP
Te
c
12.10.2
ijin
gL
an
di
ng
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
at weblogic.utils.classloaders.CodeGenClassFinder.getClassSource
(CodeGenClassFinder.java(Compiled Code))
at weblogic.utils.classloaders.ChangeAwareClassLoader.upToDate
(ChangeAwareClassLoader.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.needToReload
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.checkForReload
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.getServlet
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
tStubImpl.java(Compiled Code))
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java(Compiled Code))
at weblogic.servlet.internal.WebAppServletContext$ServletInvocation
Action.run(WebAppServletContext.java(Compiled Code))
at weblogic.security.acl.internal.AuthenticatedSubject.doAs
(AuthenticatedSubject.java(Compiled Code))
at weblogic.security.service.SecurityManager.runAs
(SecurityManager.java(Compiled Code))
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java(Compiled Code))
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java(Compiled Code))
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java(Compiled Code))
12-17
12.10.3
Be
1.
JSP
JSP
2.
weblogic.xml ,:
<weblogic-web-app>
<jsp-descriptor>
<jsp-param>
<param-name>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>
ie
s
<jsp-param>
<param-name>pageCheckSeconds</param-name>
<param-value>-1</param-value>
</jsp-param>
</jsp-descriptor>
<container-descriptor>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
</container-descriptor>
<context-root>webpay</context-root>
</weblogic-web-app>
12-18
hn
ol
og
pageCheckSecond 1 1 JSP
JSP -1
-1 WEB
pageCheckSecond 1 1 JSP JSP
12.11
ijin
gL
an
di
ng
Te
c
-1 -1
Web
Thread Dump
Be
Socket Reader
GC
Thread Dump
4
5
Thread Dump /
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
...................................................................................................
3
13
CPU ...................................................................................................
...................................................................................................3
13.1
CPU ........................................................................................................3
13.1.1
CPU ............................................................................... 3
13.1.2
CPU ...................................................................................3
13.2
CPU ........................................................................................................3
13.2.1
........................................................................................................................ 3
13.2.2
Solaris ........................................................................................................ 3
13.2.3
HP-UX ....................................................................................................... 6
13.2.4
Linux .......................................................................................................... 7
13.2.5
AIX ............................................................................................................ 8
13.2.6
Windows .................................................................................................. 10
13.3
CPU ..................................................................11
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
13 CPU
CPU CPU
13.1
CPU
13.1.1 CPU
ie
s
hn
ol
og
CPU
PID ID(light-weight process id,LWPID)
ID
Te
c
13.1.2 CPU
ijin
gL
an
di
ng
CPU
CPU
CPU
Weblogic
13.2
CPU
CPU
Be
13.2.1
WebLogic CPU
Thread Dump Thread Dump (
)
13.2.2 Solaris
CPU
1) (LWPID) CPU prstat -L -p <WLSpid>
11
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
2) LWPID PID pstack <WLSpid>
3) Thread Dumpkill -3 <WLSpid>
1) prstat LWPID
2) pstack LWPID
3)
4) Thread Dump nid=<hexNum>
ie
s
5) CPU
NICE TIME
0 0:00.22
0 0:00.10
0 0:00.11
0 0:00.03
0 0:01.01
0 0:00.00
0 0:00.00
0 0:00.00
0 0:00.00
0 0:00.07
0 0:00.00
0 0:00.00
0 0:00.11
0 0:00.00
CPU PROCESS/LWPID
0.6% java/8
0.2% java/10
0.1% java/9
0.0% java/5
0.0% java/1
0.0% java/12
0.0% java/11
0.0% java/14
0.0% java/13
0.0% java/7
0.0% java/6
0.0% java/4
0.0% java/3
0.0% java/2
ijin
gL
an
di
ng
Te
c
$ prstat -L -p 9499 1 1
PID USERNAME
SIZE RSS STATE PRI
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 59
9499 landingbj 153M 100M sleep 59
9499 landingbj 153M 100M sleep 59
9499 landingbj 153M 100M sleep 58
9499 landingbj 153M 100M sleep 58
hn
ol
og
Solaris prstat
13-1
LWPID 8 CPU
Solaris pstack
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
nMsymbolHandlee81c08, e2e81b54) + 150pnGThread__v_(f6cb64b8, e2e81b40,
e2e81b44, fe4c8000, e2d8) + 60e_5pnGThread__v_ (e2e81c08, e2e81c04,
e2e81c00,e2e81bf4, e2e81bec, 1e2f8000, e2e81d10, 1e, e) +
120FpnKJavaThread_pnGThread__v_ (f6817ff8, 1e2fd8, fe4c 7fd70) +
3d8cKJavaThreadDrun6M_v_ (e2e02000, fe4d3e34, fe4c8000, 7fd70,1e2fd8,
fe213ec8 _start (fe4c8000, fe625d10, 0, 5, 1, fe401000) + 20
ff36b728 _thread_start (1e2fd8, 0, 0, 0, 0, 0) + 40
13-2
ie
s
hn
ol
og
Te
c
$ kill -3 p 9499
. . .
"Thread-6" prio=5 tid=0x1e2fd8 nid=0x4c waiting on monitor
[0xe2e81000..0xe2e819d8]
at java.lang.Thread.sleep(Native Method)
at weblogic.management.deploy.GenericAppPoller.run
(GenericAppPoller.java:139)
. . .
ijin
gL
an
di
ng
13-3
lwp#8 thread#76 76 16
0x4c
kill -3 <WLSpid> Thread Dump Thread Dump
nid=0x4c
CPU sleeping Thread Dump
Be
for loopnum in 1 2 3
do
prstat -L -p $1 1 1 >> dump_high_cpu.txt
pstack $1 >> dump_high_cpu.txt
kill -3 $1
echo "prstat, pstack, and thread dump done. #" $loopnum
sleep 1
echo "Done sleeping."
done
13-4
Thread Dump
CPU
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
13.2.3 HP-UX
BEA hp_prstat
CPU
1) CPU (LWPID)hp_prstat <WLSpid>
2) Thread Dumpkill -3 <WLSpid>
ie
s
1) LWPID
2) Thread Dump lwp_id=<LWPID> LWPID
HP-UX hp_pstat
154 1
154 1
154 1
0
0
0
7
7
7
ijin
gL
an
di
ng
. . .
$ hp_prstat
lwpid pid
285365 4426
. . .
285415 4426
285416 4426
285417 4426
4426
pri status UsrTime SysTime
154 1
29
3
Te
c
$ hp_prstat
lwpid pid
285365 4426
. . .
285415 4426
285416 4426
285417 4426
hn
ol
og
3) CPU
4426
pri status UsrTime SysTime
154 1
29
3
154 1
154 1
154 1
0
13
0
7
7
7
13-5
UsrTime LWPID
Be
$ kill -3 4426
"Thread-6" prio=8 tid=0x0004f620 nid=75 lwp_id=285475 waiting on monitor
[0x66d5e000..0x66d5e500]
at java.lang.Thread.sleep(Native Method)
at weblogic.management.deploy.GenericAppPoller.run
(GenericAppPoller.java:139)
"ExecuteThread: '11' for queue: 'default'" daemon prio=10 tid=0x0004ad00
nid=23 lwp_id=285416 runnable [0x67874000..0x67874500]
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(Unknown Source)
. . .
at examples.servlets.HelloWorldServlet.service
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
(HelloWorldServlet.java:28)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
. . .
13-6
LWPID CPU
13.2.4 Linux
Linux
1) top CPU
hn
ol
og
ie
s
CPU
1) top userID
2) CPU PID
Te
c
3) PID
5) CPU
ijin
gL
an
di
ng
Linux top
PID USER
...
22962 landingbj
...
PRI NI SIZE
9
4.2
0:00 java
13-7
Linux Unix
top
Thread dump
Be
. . .
"ExecuteThread: '0' for queue: 'default'" daemon prio=1 tid=0x83da550
nid=0x59b2 waiting on monitor [0x56138000..0x56138870]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:415)
at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:146)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:172)
. . .
13-8
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
for loopnum in 1 2 3
do
top -b -n1 >> dump_high_cpu.txt
kill -3 $1
echo "cpu snapshot and thread dump done. #" $loopnum
sleep 1
echo "Done sleeping."
done
13-9
ie
s
hn
ol
og
13.2.5 AIX
CPU
Te
c
1) dbxdbx -a <WLSpid>
ijin
gL
an
di
ng
2) dbx thread
3) TID $t<num>
4) dbx th info <num>
5) general pthread_t
6) detach()
AIX ps
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
. . .
13-10
ps mp <WLSpid> -o THREAD TID667723
CP 37 0
AIX dbx thread
13-11
hn
ol
og
ie
s
$dbx -a 250076
(dbx) thread
thread state-k wchan state-u k-tid mode held scope function
. . .
$t15 wait 0xf10000879000a140 blocked 659527 k no sys _event_sleep
$t16 wait 0xf10000879000a240 blocked 663625 k no sys _event_sleep
$t17 run running 667723 k no sys JVM_Send
$t18 wait 0xf10000879000a440 blocked 671821 k no sys _event_sleep
$t19 wait running 675919 k no sys poll
$t20 wait 0xf10000879000a640 blocked 680017 k no sys _event_sleep
. . .
Te
c
Be
ijin
gL
an
di
ng
(dbx) th info 17
thread state-k wchan state-u k-tid mode held scope function
$t17 run running 667723 k no sys JVM_Send
general:
pthread addr = 0x3ea55c68 size = 0x244
vp addr = 0x3e69e5e0 size = 0x2a8
thread errno = 2
start pc = 0x300408b0
joinable = no
pthread_t = 1011
scheduler:
kernel =
user = 1 (other)
event :
event = 0x0 cancel = enabled, deferred, not pending
stack storage:
. . .
(dbx)detach
13-12
th info 17
AIX Thread Dump
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
hn
ol
og
13-13
ie
s
. . .
at java.io.PrintWriter.println(PrintWriter.java(Compiled Code))
at examples.servlets.HelloWorldServlet.service(HelloWorld
Servlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$Servlet
InvocationAction.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:306)
. . .
13.2.6 Windows
Te
c
CPU pslist
Process Explorer
CPU
ijin
gL
an
di
ng
2) Thread DumpCtrl+Break
1)
2) <hexNum>
3) Thread Dump nid=<hexNum>
4) CPU
Be
pslist :
$ pslist -d 1720
java 1720:
Tid Pri Cswtch State
1520 8
9705
Wait:UserReq
1968 8
6527
Wait:UserReq
1748 15 157
Wait:UserReq
. . .
588 10
59123 Wait:UserReq
1784 8
150
Wait:UserReq
1756 8
251
Wait:UserReq
1716 8
6
Wait:Queue
:http://www.landingbj.com
: 400-810-2327
User Time
0:00:23.734
0:00:06.309
0:00:00.010
Kernel Time
0:00:01.772
0:00:00.070
0:00:00.010
Elapsed Time
0:08:14.511
0:08:14.120
0:08:14.110
0:00:48.830
0:00:00.090
0:00:00.941
0:00:00.000
0:00:02.633
0:00:00.000
0:00:00.000
0:00:00.000
0:08:01.211
0:08:01.201
0:08:01.201
0:08:01.191
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
1800 8
. . .
1457
Wait:Queue
13-14
WebLogic pslist d 1720
User Time/Kernel Time ID
588 588 0X24C thread dump
nid=0x24c
Windows Thread Dump
Te
c
hn
ol
og
ie
s
ijin
gL
an
di
ng
13-15
13.3
CPU
CPU
Thread Dump
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
3
.............................................................................................................
.............................................................................................................3
.............................................................................................................
14
14.1
WebLogic ........................................................................................................... 3
14.2
......................................................................................................... 3
14.2.1 ................................................................................................................ 3
14.2.2
........................................................................................................ 4
14.3
..................................................................................... 4
14.3.1
........................................................................................................ 4
14.3.2
JVM ................................................................................4
14.3.3
.........................................................................5
14.4
................................................................................................................. 6
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
14
Thread
Dump
WebLogic
hn
ol
og
ie
s
14.1
Te
c
14-1 WebLogic
WebLogic
15
ijin
gL
an
di
ng
SocketReader socket
33%( NativeIO )
SocketReader
14.2
Be
14.2.1
1
2
3 Thread Dump
4
5
6
7
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
monitor
notify() notify()
14.2.2
Thread Dump 13
11 Thread Dump
hn
ol
og
ie
s
ijin
gL
an
di
ng
Te
c
Be
14.3
14.3.1
1
2
3
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
14.3.2 JVM
JVM
1 OutOfMemoryException
2
JVM
3 128MB
14-2
hn
ol
og
-XX:MaxPermSize=128m
ie
s
MaxPermSize
MaxPermSize OutOfMemoryException
JVM
Te
c
commEnv
ijin
gL
an
di
ng
..\bea\weblogic\common\bin commEnv.cmd
bea sun jdk jdk sun JDK
:sun
if "%PRODUCTION_MODE%" == "true" goto sun_prod_mode
set JAVA_VM=-client
set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none
goto continue
:sun_prod_mode
set JAVA_VM=-server
set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
goto continue
Be
setDomainEnv.cmd
14-3
..\bea\user_projects\domains\landingbj()\bin
setDomainEnv.cmd
if "%JAVA_VENDOR%"=="Sun" (
set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% -XX:MaxPermSize=128m
)
14-4
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
14.3.3
1
2
3
4
hn
ol
og
14.4
ie
s
1 Thread Dump
2 JVM
3/
Te
c
Be
ijin
gL
an
di
ng
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.................................................................................................... 3
15
core dump ....................................................................................................
15.1
..................................................................................... 3
15.2
......................................................................... 3
15.3
................................................................................................. 3
15.3.1
........................................................................................................................ 3
15.3.2
Solaris ........................................................................................................... 4
15.3.3
Linux ............................................................................................................. 5
15.3.4
HP-UX .......................................................................................................... 8
15.3.5
AIX ............................................................................................................... 9
15.3.6
WINDOWS .................................................................................................10
15.3.7
.......................................................................................... 10
15.4
....................................................................................... 11
15.4.1
.......................................................................................... 11
15.4.2
Thread Dump............................................................... 12
15.5
............................................................................................................... 12
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
15 core dump
WebLogic JVM
WebLogic
JVM
Java core
15.1
ie
s
hn
ol
og
Unix
Windows C:\Documents and
Settings\AllUsers\Documents\DrWatson
15.2
Te
c
Java
core dump
ijin
gL
an
di
ng
JVM
C C++ JVM
HotSpot
1
2 core dump
3
Be
WebLogic Server
2 JDBC
JVM
15.3
core
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
15.3.1
1 JVM
file
strings core
2
ie
s
JDBC
JNI
hn
ol
og
4 Thread Dump
Te
c
15.3.2 Solaris
5 JVM
$ file <fullpath>/core
ijin
gL
an
di
ng
15-1
6 Java (Java Development Kit, JDK)
$ java -version
JDK
15-2
dbx
GNU gdb
8
Be
9 dbx
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
(dbx) quit
dbx
15-5
15.3.3 Linux
10 JVM
$ file <fullpath>/core
15-6
11 JDK
JDK
15-7
hn
ol
og
12 GNU gdb
ie
s
$ java -version
$ ls /usr/local/bin/gdb
gdb
$ export DEBUG_PROG=/usr/local/bin/gdb gdb
15-8
gdb
Te
c
ijin
gL
an
di
ng
gbd
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
where
thr
info thr
thread apply 1 bt
quit
thread #1
gdb
15-10
gdb bt
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
#0
hn
ol
og
ie
s
ijin
gL
an
di
ng
Te
c
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
hc_decoder.c:2517
15-13
gdb where
gdb thr
Te
c
15-14
hn
ol
og
ie
s
Be
ijin
gL
an
di
ng
(gdb) thr
[Current thread is 1 (LWP 14 )]
(gdb) info thr
LWP 13 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 12 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 11 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 10 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
LWP 9 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
LWP 8 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 7 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 6 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 5 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 4 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
LWP 3 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 2 0xff29e958 in _signotifywait () from /usr/lib/libc.so.1
LWP 1 0xff29d194 in _poll () from /usr/lib/libc.so.1
LWP 16 0xff29c4fc in door_restart () from /usr/lib/libc.so.1
LWP 15 0xff369774 in private___lwp_cond_wait ()
from /usr/lib/libthread.so.1
* 1 LWP 14 0xff369764 in __sigprocmask ()
from /usr/lib/libthread.so.1
15-15
15.3.4 HP-UX
14 JVM
$ file <fullpath>/core
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
15-16
15 JDK
$ java -version
JDK )
15-17
16
HP-UX adb
GNU gdb
ie
s
17
adb
adb
15-18
dbx
$ <path to java command>/java
hn
ol
og
18 HP-UX adb
corefile
Te
c
15-19
dbx
adb
ijin
gL
an
di
ng
adb> $C
adb> $r
adb> $q
15-20
15.3.5 AIX
19 JVM
$ file
<fullpath>/core
15-21
20 JDK
21 JVM javacore
Be
22
23 AIX javacore
javacore<WLSpid>.<ID#>.txt
Current Thread Details:
"ExecuteThread: '10' for queue: 'default'" (TID:0x31c70ad0,
sys_thread_t:0x3e52df68, state:R, native ID:0xf10) prio=5
at HelloWorld.displayHelloWorld(Native Method)
at servlets.NativeServlet.doGet(NativeServlet.java:85)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$
ServletInvocationAction.run (ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:401)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:306)
15-22
15.3.6 WINDOWS
ie
s
hn
ol
og
27JVM hs_err_pid<WLSpid>.log
28
Te
c
JVM hs_err_888.log
ijin
gL
an
di
ng
Be
15.3.7
pstack pmap
pstack
pmap
Solaris
pstack
pmap
AIX5.2
procstack
procmap
Linux
lsstack
pmap
HP-UX
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -
IT WebLogic
15-1
Solaris
pstack
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
pmap
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 11 -
IT WebLogic
15.4
15.4.1
ulimit c
ie
s
Solaris coreadm
coreadm e process
hn
ol
og
Linux
/etc/security limits.conf
HP-UX maxdsiz
Te
c
Sun JVM:
ijin
gL
an
di
ng
JRockit JVM:
-XX:+ShowMessageBoxOnError
-Djrockit.waitonerror
JVM
15-26
15.5
Be
1 JVM
2
3
/
4
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 12 -
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.............................................................................................................
3
16
.............................................................................................................
.............................................................................................................3
16.1
.........................................................................................................................................3
16.2
......................................................................................................................... 3
16.2.1
................................................................................................ 3
16.2.2
.................................................................................................................... 3
16.2.3
.................................................................................... 4
16.2.3.1 Windows ................................................................................ 4
16.2.3.2 Solaris .................................................................................... 4
16.2.3.3 HP-UX ................................................................................... 4
16.2.3.4 Linux ......................................................................................5
16.2.3.5 AIX ........................................................................................ 5
16.2.4
........................................................................................................ 5
16.3
......................................................................................... 5
16.3.1
.............................................................................5
16.3.2
.....................................................................6
16.3.2.1 IO Exception ..................................................................................... 6
16.4
................................................................................................. 6
16.4.1
........................................................................................ 6
16.4.2
Unix/Linux ......................................................... 6
16.4.3
Windows ................................................................ 7
16.4.3.1 handle......................................................................................................................... 7
16.4.3.2 Process Explorer.........................................................................................................8
16.5
......................................................................................................................... 8
16.5.1
............................................................................................................ 8
16.5.2
............................................................................................................ 9
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
16
too many open files
16.1
16.2
ie
s
WebLogic
WebLogic
I/O socket
hn
ol
og
16.2.1
1 JVM
Te
c
2
Socket
3 HTTP HTTP
TCP
4
ijin
gL
an
di
ng
16.2.2
position
A
B
Be
fork
fcntldupdup2
16-1
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
16-1
ie
s
IT WebLogic
16.2.3
hn
ol
og
Te
c
ijin
gL
an
di
ng
16.2.3.1 Windows
16.2.3.2 Solaris
Solaris /usr/bin/ulimit
rlim_fd_max
65536 root
16.2.3.3 HP-UX
Be
nfile = ((NPROC*2)+1000)
16-1
NPROC
NPROC = ((MAXUSERS*5)+64)
16-2
MAXUSERS 400 nfile 5128
HP-UX
maxfiles
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
maxfiles_lim
IT WebLogic
Maxfiles maxfiles_lim
16.2.3.4 Linux
Linux /etc/security/limits.conf
ie
s
16-3
hn
ol
og
/etc/rc.d/rc.local
10244096 16384
Te
c
16.2.3.5 AIX
AIX /etc/security/limits
2000
ulimit setrlimit
ijin
gL
an
di
ng
OPEN_MAX
16.2.4
7
8 /
close()
open()
9
10TIME_WAIT TCP
Be
socket TIME_WAIT
ACK
Windows TcpTimedWaitDelay
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
16-5
Unix/Windows 240
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
16.3
16.3.1
11
12
13TIME_WAIT TCP
15
16.3.2.1 IO Exception
hn
ol
og
16.3.2
ie
s
14 GC
Java close()
I/O I/O
ijin
gL
an
di
ng
Te
c
Java.io.FileNotFoundExceptin:/***/wlserver_10.3/server/lib/consoleapp/webap
p/images/sort_up.gif(Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:112)
at weblogic.utils.classloaders.FileSource.getInputStream(FileSource.java:31)
at weblogic.servlet.internal.warSource.getInputStream(warSource.java:65)
at weblogic.servlet.FileServlet.sendFile(FileServlet.java:400)
Truncated.see log file for complete stacktrace
16-6
Be
16.4
16.4.1
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
<ListenThread> <system> <> <000000> <Using effective file descriptor limit
of: 8192 open sockets/files.>
16-8
16.4.2 Unix/Linux
1Unix/Linux lsof
ie
s
hn
ol
og
Te
c
WebLogic 6345
16-10
ijin
gL
an
di
ng
Be
losf SolarisTru64HP-UXLinuxAIX
2 HP Glance glance
weblogic glance http://www.hp.com
3 Unix lsof
/proc/<pid>/fd
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
16.4.3 Windows
16.4.3.1 handle
Windows NT Windows 2000 handle
handle
handle -p <process name>
16-12
ie
s
D\Tools>handle p java
handle
hn
ol
og
16-13
http://download.sysinternals.com/Files/Handle.zip
Te
c
Be
ijin
gL
an
di
ng
Process Explorer
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
http://www.sysinternals.com/ntw2k/freeware/procexp.shtml
16.5
16.5.1
16/
17
18
ie
s
19 OS
20
hn
ol
og
16.5.2
21
A?
B?
Te
c
JDBC
C JAR ?
ijin
gL
an
di
ng
jar jar
D TIME_WAIT ?
22
23 TIME_WAIT
TIME_WAIT TIME_WAIT
240 TIME_WAIT
Be
24/
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.................................................................................................
3
17
.................................................................................................
.................................................................................................3
17.1
/................................................................................................ 3
17.1.1
/............................................................................................... 3
17.1.2
................................................................................................................ 3
17.2
..................................................................................................................... 3
17.2.1
Java Heap Memory............................................................................................. 3
17.2.2
........................................................................................................................ 3
17.2.3
........................................................................................................ 4
17.2.4
Garbage Collection................................................................................. 4
17.2.5
........................................................................................ 4
17.2.6
.................................................................................................... 4
17.2.7
WTCWebLogic Tuxedo Connector............................................................................5
17.3
......................................................................................................... 5
17.3.1
Java .................................................................................................... 5
17.3.1.1 Java ........................................................................................ 5
17.3.1.2 Java ................................................................................................ 6
17.3.1.3 Java .......................................................................................6
17.3.2
........................................................................................................ 9
17.3.2.1 ........................................................................................... 9
17.3.2.2 ................................................................................................. 10
17.3.2.3 ................................................................................................. 10
17.3.2.4 OOM ...................................................................................... 12
17.3.3
WTC WTC .............................................................................. 13
17.3.3.1 WebLogic Tuxedo Connector ..........................................................................13
17.3.3.2 WTC ........................................................................................ 13
17.3.3.3 WTC ................................................................................................ 13
17.3.3.4 WTC ........................................................................................ 14
17.4
............................................................................................................... 16
17.4.1
.............................................................................................. 16
17.4.2
Java ...........................................................................16
17.4.3
...............................................................................17
17.4.4
WTC .............................................................................17
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
17
core dump
J2EE
17.1
ie
s
hn
ol
og
17.1.1 /
17.1.2
ijin
gL
an
di
ng
Java
Te
c
17.2
Be
17.2.2
JVM JN JDBC
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
JVM
JDBC
Java
32bit 3GB Java
1GB 2G
17.2.3
ie
s
Java
2.6
hn
ol
og
17.2.5
Te
c
roots
ijin
gL
an
di
ng
Be
17.2.6
RAM
32
0-4GB RAM
32
4GB 1-2 GB
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
Windows 2GB 2GB
Windows /3GB 2GB/2GB
3GB
Te
c
hn
ol
og
ie
s
17-1
17-1
ijin
gL
an
di
ng
1WebLogic Tuxedo
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
hn
ol
og
ie
s
IT
ijin
gL
an
di
ng
Te
c
WebLogic
Be
17.3
Java WTC
WTC 3.4
17.3.1 Java
17.3.1.1 Java
2stdout stderr
hn
ol
og
1JVM Java.lang.OutOfMemoryError
ie
s
4 Thread Dump
Te
c
5WebLogic Server
6
ijin
gL
an
di
ng
WebLogic WebLogic
17.3.1.2 Java
Java
Be
1.
Java Heap
Java
2.
HTTP
HTTP
3.
Java cache
cacha Java
JVM Java
4.
JDBC
JDBC block JDBC
close()
5.
JVM GC
6.
ie
s
JVM bug
hn
ol
og
Java JVM
Compact
17.3.1.3 Java
17.3.1.3.1
Java
Te
c
Java
ijin
gL
an
di
ng
1 verbose GC
java verbose:gc JRockit-verbose
-verbose:gc GC Verbose java
stdout/stderr GC java stdout/stderr
2 GC
3 JVM
4 GC GC GC
Be
5
6JVM /
Servers
--> myServer --> Monitoring -->Performance
17.3.1.3.2 GC
1 OOM
GC
[memory ] 7.160: GC 131072K->130052K (131072K) in 1057.359 ms
16-1
[memory ] <start>: GC <before>K-><after>K
<start>
(<heap>K), <total>ms
GC JVM
<before> KB
KB
<heap>
KB
<total>
ie
s
<after>
hn
ol
og
JVM JVM
verbose //
OOM Heap Dump
JVM
Te
c
17.3.1.3.3 GC
GC GC GC
ijin
gL
an
di
ng
1OOM GC
2GC
JVM
Java OOM java
JVM GC
Be
Java OOM
GC
GC GC
[memory ] 8.162: GC 73043K->72989K (131072K) in 12.938 ms
[memory ] 8.172: GC 72989K->72905K (131072K) in 12.000 ms
[memory ] 8.182: GC 72905K->72580K (131072K) in 13.509 ms
. . .
java.lang.OutOfMemoryError
17-2
128MB 70MB
45% Java JVM OOM
OOM
JVM bug JVM
17.3.1.3.4 Java
ie
s
JVM GC
1
hn
ol
og
Te
c
2
HTTP
3
ijin
gL
an
di
ng
1 JVM (
)
Be
2JVM
3/
JVMPI
Jprobe OptimizeIt
http://www.borland.com/optimizeit
http://www.quest.com/jprobe
17.3.1.3.6 JRockit
ie
s
hn
ol
og
JRA JRA
Java
Te
c
ijin
gL
an
di
ng
GC //
3 JVM
17.3.2
JVMJNI
Be
17.3.2.1
1
2stdout stderr
3JVM
4 JVM libc
SIGABORT JVM
5core dump
JVM
RAM JVM
JVM libc
JVM SIGABORT JVM JVM
SIGABORT
17.3.2.2
RAM
2.
RAM
hn
ol
og
1.
ie
s
RAM
RAM
JVM
Te
c
3.
ijin
gL
an
di
ng
JVM
JVM
JNI
JNI
5.
Be
Java
17.3.2.3
17.3.2.3.1
OOM
1 Java OOM
-verbose:gc GC
GC OOM
JVM /
2
Unix/Linux ps p <PID> -o vsz
Windows
i)
hn
ol
og
iii)
ie
s
ii) +
Process Processor
Virtual Bytes
JVMjava
Te
c
iv) -->
3 JNI
ijin
gL
an
di
ng
4RAM
JDBC
17.3.2.3.2
Be
1
2
3 Java JVM
4 JNI JDBC
5
Java 32
4GB
1-2GB
Windows 2GB 2GB
Windows /3GB 2GB/2GB
3GB
Red Hat Linux AS 2.1 3GB
17.3.2.4 OOM
1 OOM
hn
ol
og
ie
s
Java -Xmx
3GBJava 1GB 2GB
JVM
JDBC JNI
Te
c
Java
ijin
gL
an
di
ng
JAVA
JNI
JNI
3
Be
Java
JVM JVM
Java
5 RAM
6JVM
JRockit-Xnoopt
7 OOM
JVM
JNI /
8 OOM
ie
s
Te
c
hn
ol
og
JVM
ijin
gL
an
di
ng
WebLogic Tuxedo
WebLogic Tuxedo
Tuxedo Tuxedo Weblogic Server EJB
WebLogic Tuxedo
Be
17.3.3.2 WTC
WTC java.lang.OutOfMemoryError
17.3.3.3
WTC
WTC
1WebLogic/Tuxedo
WTC WebLogic Tuxedo
bug WTC
WebLogic 8.1
2OS
ie
s
Unix
java
hn
ol
og
WebLogic Server
WebLogic 128M
4Perm JVM
ijin
gL
an
di
ng
Te
c
VM reflective
reflective
17.3.3.4 WTC
17.3.3.4.1
WebLogic Tuxedo
Be
2WTC
12
Tuxedo
WTC
server WTC target server WTC
target
target server WTC target server
WTC target server
WTC target server
ie
s
17.3.3.4.2 Tuxedo
1 WTC
hn
ol
og
Tuxedo Tuxedo
WTC Tuxedo
TUXCONFIG
WTC Tuxedo/TDomain DMCONFIG
2 MTYPE NULL
ijin
gL
an
di
ng
Te
c
in
processSockets
Be
17-4
17.3.3.4.4 WTC
WTC
ie
s
<StartupClass
Arguments="BDMCONFIG=C:\path\bdmconfig.xml,TraceLevel=100000"
ClassName="weblogic.wtc.gwt.WTCStartup" Name="WTCStartup"
Targets="examplesServer"/>
17-6
JAVA_OPTIONS
hn
ol
og
JAVA_OPTIONS=-Dweblogic.wtc.TraceLevel=100000
17-7
Te
c
ijin
gL
an
di
ng
Weblogic Server
4 WTC
Be
hn
ol
og
ie
s
IT
ijin
gL
an
di
ng
Te
c
WebLogic
Be
17.4
17.4.1
1 OOM
Java
Weblogic Tuxedo Connector
ie
s
GC
GC
Te
c
hn
ol
og
2 Verbose GC
ijin
gL
an
di
ng
17.4.2 Java
1 GC
Be
JVM
17.4.3
1 OS
2
3
4 JVM
5 JNI
6 JVM /
17.4.4 WTC
1
2 JVM
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
3 WebLogic
hn
ol
og
ie
s
IT
Be
ijin
gL
an
di
ng
Te
c
WebLogic
IT WebLogic
........................................................................................................................... 2
...........................................................................................................................
Be
ijin
gL
an
di
ng
Te
c
hn
ol
og
ie
s
.....................................................................................................
3
18
.....................................................................................................
.....................................................................................................3
18.1
..................................................................................................... 3
18.2
............................................................................................................. 3
18.3
......................................................................................................................... 3
18.3.1
.................................................................................................... 4
18.3.2
................................................................................................ 4
18.3.3
.................................................................................................... 4
18.3.4
Solaris ........................................................................................................ 5
18.3.5
Linux ..........................................................................................................5
18.3.6
HP-UX ....................................................................................................... 7
18.3.7
AIX ............................................................................................................ 8
18.3.8
Windows .................................................................................................... 8
18.4
............................................................................................................. 9
18.5
............................................................................................................... 10
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-2-
IT WebLogic
18
(OOM)
18.1
ie
s
StackOverFlow
"an irrecoverable stack overflow has
occurred. Unexpected Signal 11" (SEGV)
ijin
gL
an
di
ng
Te
c
hn
ol
og
JVM
JVM
Be
18.2
StackOverflowError JVM
18.3
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-3-
IT WebLogic
18.3.1
thread dump
JVM
ie
s
18.3.2
hn
ol
og
StackOverflowError
JVM JVM
JVM
Te
c
hs_err_pid<WLSpid>.log <WLSpid> ID
JVM.log
ijin
gL
an
di
ng
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x5a4cf2e4
Function name=Java_HelloWorld_displayHelloWorld
Library=/home/spoz/wls70/linuxAS/user_projects/mydomain/lib/libhello.so
Be
18.3.3
StackOverflowError JVM
JVM
WebLogic
JVM
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-4-
IT WebLogic
ulimit c
Solaris /etc/system
set sys:coredumpsize=0
Linux
/etc/security limits.conf
hn
ol
og
quota v
ie
s
HP-UX maxdsiz
UNIX/ UNIX
Linux
18.3.4 Solaris
$ java -version
Te
c
JDK
JDK
18-3
ijin
gL
an
di
ng
dbx :
$ ls /opt/bin/dbx
dbx
(dbx) where
(dbx) threads
(dbx) quit
dbx
18-5
Be
18.3.5 Linux
JVM
$ file <fullpath>/core
18-6
JDK
$ java -version
JDK
18-7
GNU gdb
GNU gdb
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-5-
IT WebLogic
gdb:
$ ls /usr/local/bin/gdb
gdb
$ export DEBUG_PROG=/usr/local/bin/gdb gdb
$ gdb <path to java command>/java corefile
18-8
gdb
thread #1
gdb
ie
s
where
thr
info thr
thread apply 1 bt
quit
18-9
gdb where
hn
ol
og
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
ijin
gL
an
di
ng
Te
c
gdb) where
#0 0xff369764 in __sigprocmask () from /usr/lib/libthread.so.1
#1 0xff35e978 in _resetsig () from /usr/lib/libthread.so.1
#2 0xff35e118 in _sigon () from /usr/lib/libthread.so.1
#3 0xff361158 in _thrp_kill () from /usr/lib/libthread.so.1
#4 0xff24b908 in raise () from /usr/lib/libc.so.1
#5 0xff2358f4 in abort () from /usr/lib/libc.so.1
#6 0xfe3c6904 in __1cCosFabort6Fl_v_ () from /wwsl/sharedInstalls/
solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so
#7 0xfe3c59f8 in __1cCosbBhandle_unexpected_exception6FpnGThread_
ipCpv_v_ () from /wwsl/sharedInstalls/solaris/wls70sp2/jdk131_06/
jre/lib/sparc/server/libjvm.so
#8 0xfe20a8bc in JVM_handle_solaris_signal () from /wwsl/shared
Installs/solaris/wls70sp2/jdk131_06/jre/lib/sparc/server/libjvm.so
#9 0xff36b82c in __sighndlr () from /usr/lib/libthread.so.1
#10 <signal handler called>
#11 0xe9f90420 in Java_HelloWorld_displayHelloWorld ()
from /home/usera/wls70/solaris/projectWork/lib/libhello.so
#12 0x90aec in ?? ()
Be
18-10
gdb thr
(gdb) thr
[Current thread is 1 (LWP 14 )]
(gdb) info thr
16 LWP 13 0xff29d194 in _poll () from /usr/lib/libc.so.1
15 LWP 12 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
14 LWP 11 0xff29f008 in _lwp_sema_wait () from /usr/lib/libc.so.1
13 LWP 10 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
12 LWP 9 0xff29bc2c in _so_accept () from /usr/lib/libc.so.1
11 LWP 8 0xff29d194 in _poll () from /usr/lib/libc.so.1
10 LWP 7 0xff29d194 in _poll () from /usr/lib/libc.so.1
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-6-
IT WebLogic
ie
s
hn
ol
og
gdb bt
Be
ijin
gL
an
di
ng
Te
c
18.3.6 HP-UX
JVM
$ file <fullpath>/core
18-13
HP-UX JDK
$ java -version
:http://www.landingbj.com
: 400-810-2327
JDK
: service@landingbj.com
: 010-82730518
-7-
IT WebLogic
18-14
HP-UX adb
GNU gdb
adb
ie
s
$ ls /opt/bin/adb
adb> $C
adb> $r
adb> $q
hn
ol
og
adb
adb
18-16
Te
c
18.3.7 AIX
JVM
$file <fullpath>/core
ijin
gL
an
di
ng
18-17
javacore<WLSpid>.<ID#>.txt
Be
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-8-
IT WebLogic
18.3.8 Windows
Windows DrWatson drwtsn32.log Unix
C:\Documents and Settings\All Users\Documents\DrWatson
JVM hs_err_pid<WLSpid>.log
pstack
pstack
pstack
AIX5.2
procstack
Linux
Lsstack
HP-UX
18.4
Te
c
18-1
hn
ol
og
Solaris
ie
s
ijin
gL
an
di
ng
1.
JVM JVM
2.
Be
catch (StackOverflowError e)
{
System.err.println("Exception: " + e );
// Here is the important thing to do
// when catching StackOverflowErrors:
e.printStackTrace();
// do some cleanup and destroy the thread or unravel if possible.
}
18-19
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
-9-
IT WebLogic
JVM
java.util
JVM v1.3.1 1.4.1 getProperty()
ie
s
18.5
Te
c
hn
ol
og
ijin
gL
an
di
ng
3 Thread Dump
4
5
jsp_error login/auth/error
WebLogic JSP
Be
6 JVM
:http://www.landingbj.com
: 400-810-2327
: service@landingbj.com
: 010-82730518
- 10 -