JeeStudy 发表于 2017-7-22 23:28:55

Weblogic:域(user_domain)结构说明

在文章“Weblogic:官方下载-安装及目录说明”中我们介绍了,Weblogic安装后的目录结构,现在我们在创建Domain后再来看下Weblogic的目录结构


通过上图目录结构,我们看到只是多了一个文件夹“user_projects”,但是根据文件夹及文件修改时间,我们可以看到,同时修改的文件还有:


[*]文件夹:logs
[*]文件:domain-registry.xml


文件夹logs:


根据上图,我们可以看到log.txt时间没有变化,这说明,我们再创建Domain域的时候,与这个log.txt文件无关。
另外我们还看到多了三个log文件,其中有两个大小为0,只有“wlsconfig_20170722214341.log”这个文件有内容,根据内容,我们可以看到这个日志文件记录我们创建Domain时的一些底层操作,包括引用了哪个模板文件、读取相关配置文件、创建开始菜单中的快捷方式......
文件“wlsconfig_20170722214341.log”内容:
2017-07-22 21:47:43,769 INFO com.oracle.cie.domain.template.catalog.impl.ComponentsXMLConverter - C:\Oracle\Middleware\wlserver_10.3\common\lib\components.xml does not contain component elements and will be skipped
2017-07-22 21:47:43,770 INFO com.oracle.cie.wizard.domain.gui.tasks.MultipleTemplateSelectionGUITask - Selected required template: Basic WebLogic Server Domain:10.3.6.0 [C:\Oracle\Middleware\wlserver_10.3\common\templates\domains\wls.jar]
2017-07-22 21:55:50,948 INFO com.oracle.cie.domain.WLSTemplateBuilder - No config-groups.xml found in template
2017-07-22 21:55:50,948 INFO com.oracle.cie.domain.WLSTemplateBuilder - No template-database.xml found in template
2017-07-22 21:55:51,624 INFO com.oracle.cie.domain.AbstractTemplate - Adding top-level component reference: WebLogic Server version 10.3.6.0
2017-07-22 21:55:51,626 INFO com.oracle.cie.domain.AbstractTemplate - Setting symbol for component WebLogic Server version 10.3.6.0 to WebLogic_Server_10.3.6.0_wlserver_10.3_ORACLE_HOME
2017-07-22 21:58:40,502 WARN com.oracle.cie.common.util.JdkVersion - JDK version is null.
2017-07-22 22:01:36,221 INFO com.oracle.cie.domain.DomainChecker - ListenPort internal Validation result=
2017-07-22 22:01:36,222 INFO com.oracle.cie.domain.DomainChecker - ListenPort external Validation result=
2017-07-22 22:01:40,416 INFO com.oracle.cie.domain.StartMenu - Creating start menu program=C:\Oracle\Middleware\user_projects\domains\base_domain\bin\startWebLogic.cmd link=Start Admin Server for Weblogic Server Domain
2017-07-22 22:01:40,586 INFO com.oracle.cie.domain.StartMenu - Creating start menu program=C:\Oracle\Middleware\user_projects\domains\base_domain\bin\stopWebLogic.cmd link=Stop Admin Server
2017-07-22 22:01:40,589 INFO com.oracle.cie.domain.StartMenu - Creating start menu program=C:\Windows\system32\rundll32.exe link=Admin Server Console
2017-07-22 22:01:40,621 INFO com.oracle.cie.domain.DomainRegistryWrapper - need to initialize domainRegistrydocument object
2017-07-22 22:01:40,647 INFO com.oracle.cie.domain.DomainGenerator - Domain Generation Successful!


文件:domain-registry.xml
<?xml version="1.0" encoding="UTF-8"?>
<domain-registry xmlns="http://xmlns.oracle.com/weblogic/domain-registry">
<domain location="C:\Oracle\Middleware\user_projects\domains\base_domain"/>
</domain-registry>


user_domain 目录结构




1. autodeploy
自动部署目录,可以把要部署的项目放到这个目录(In a development environment, the server will automatically deploy any applications or modules you place here. You must run the server in development mode for it to take advantage of the automatic deployment feature.)
在这个目录下有个Readme.txt文件,根据此文件可以知道具体的细节内容:

This autodeploy directory provides a quick way to deploy applications
to a development server. When the WebLogic Server instance is running
in development mode, applications and modules in this directory are
automatically deployed.

You can place J2EE applications such as the following in this directory:

* EAR files
* WAR, EJB JAR, or RAR archive files
* Exploded archive directories for applications or modules

The autodeploy directory is automatically created when you install
the WebLogic Server sample domains or when you use the Configuration
Wizard to create domains.

To automatically deploy an application:

1. Start the WebLogic Server domain in development mode.
2. Place the application's exploded directory structure
or archive file in this autodeploy directory.

STARTING WEBLOGIC SERVER IN DEVELOPMENT MODE

WebLogic Server domains start up in development mode by
default. To change startup mode for a domain, follow
the below instructions.

The startup mode applies to all WebLogic Server instances in a domain.
You can set the domain startup mode in any of the following ways:

*With the startWebLogic start scripts in the bin directory.
   startWebLogic.cmd (for Windows) and startWebLogic.sh (for Unix)
   can be modified with any text editor.

   By default, the start scripts start WebLogic Server in development
   mode so you do not need to modify the default scripts in order to
   auto-deploy applications. If you want to start WebLogic Server in
   production mode, use the 'production' argument with the start command
   or modify the startup scripts.

*Start the server in development mode from the command line with the
   -Dweblogic.ProductionModeEnabled=false setting. If you want to
   start the server in production mode from the command line, use
   the -Dweblogic.ProductionModeEnabled=true setting.

      
*Set the domain startup mode in the Administration Console by
   selecting or deselecting the Production Mode box in the domain's
   Configuration->General page. See the Administration
   Console online help for more information about setting this
   attribute.



2. bin
包含启动停止脚本及节点管理相关脚本(Contains the start and stop scripts)

3.config
域的配置文件(Contains the key domain configuration file, config.xml.)

4. console-ext
控制台扩展,只对admin server 起作用(Contains any Administration Console extensions you’ve created)

5. init-info      
初始化信息(This directory contains files that are used for WebLogic domain provisioning. You should not modify any files in this directory.)


6.lib
存放自己要添加的jar文件,在这里添加的jar文件,在此域中的所有服务器实例都起作用(You can place JAR files in this directory so they can be available to all applications running on the domain’s server instances.)
此文件夹下的readme.txt文件内容:
This is the domain library directory and is usually located at $DOMAIN_DIR/lib.

The jars located in this directory will be picked up and added dynamically to the end of the server classpath at server startup. The jars will be ordered lexically in the classpath. The domain library directory is one mechanism that can be used for adding application libraries to the server classpath.

It is possible to override the $DOMAIN_DIR/lib directory using the -Dweblogic.ext.dirs system property during startup. This property specifies a list of directories to pick up jars from and dynamically append to the end of the server classpath using java.io.File.pathSeparator as the delimiter between path entries.


7. security
安全验证相关文件(Holds security-related files such as SerializedSystemIni.dat.)

8.servers
管理服务器(Admin Server)和托管服务器(Managed Servers)目录(This is an important directory that contains a separate subdirectory for each of the servers in your domain, including both Admin and Managed Servers.)


9.edit.lok
编辑锁,用来保证在同一时间只有一个用户在编辑配置文件,这个文件只用在管理服务(The edit lock is used to ensure that only one user at a time is editing the configuration. The edit lock is only used on the Admin server.)

扩展信息:
They are config.lok, EmbeddedLDAP.lok and XXXserver.lok files which are used by the admin server and managed server. Another lock file named edit.lok is used for the admin server only.config.lok: The config.lok file is just used for getting a file lock on the config.xml file, in order to ensure that config file updates run serially. It will not cause any problems if it exists in the directory.edit.lok: The edit lock is used to ensure that only one user at a time is editing the configuration. The edit lock is only used on the Admin server.EmbeddedLDAP.lok: This file locks access to the embedded LDAP server, in order to ensure that only a single process has access to this directory server. if two processes write to the same directory server, the directory server will have a problem.XXXServer.lok: The .lok indicates that the server with name is running. This is used to prevent a server from being booted twice. If you are sure that this server process is shut down, you can delete it.
Enable and disable the domain configuration lockThe Administration Console Change Center provides a way to lock a domain configuration so you can make changes to the configuration while preventing other accounts from making changes during your edit session.The domain configuration locking feature is always enabled in production domains. It can be enabled or disabled in development domains. It is disabled by default when you create a new development domain.To enable or disable the domain configuration locking feature in a development domain:


[*]In the banner toolbar region at the top of the right pane of the Console, click Preferences.
[*]Select User Preferences.
[*]Select or clear Automatically Acquire Lock and Activate Changes to enable or disable the feature.
[*]Click Save.
After you finishWhen you enable domain configuration locking, you must use the Change Center to lock and edit the domain configuration.

10.fileRealm.properties

This properties file controls the User, Group, and ACL objects that are created when WebLogic Server is started.         
11.startWebLogic.cmd
Windows下启动Weblogic
12.startWebLogic.sh

Linux下启动Weblogic


页: [1]
查看完整版本: Weblogic:域(user_domain)结构说明