设为首页收藏本站 JeeStudy企业开发官网①

JEE Study|JAVA EE|企业级开发学习网

 找回密码
 立即加入

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 2366|回复: 0
打印 上一主题 下一主题

Weblogic:域(user_domain)结构说明

[复制链接]

219

主题

221

帖子

1418

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1418

最佳新人活跃会员热心会员推广达人宣传达人灌水之王突出贡献优秀版主荣誉管理论坛元老

跳转到指定楼层
楼主
发表于 2017-7-22 23:28:55 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
在文章“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”内容:
[Java] 纯文本查看 复制代码
2017-07-22 21:47:43,769 INFO  [WizardController] 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  [WizardController] com.oracle.cie.wizard.domain.gui.tasks.MultipleTemplateSelectionGUITask - Selected required template: Basic WebLogic Server Domain:10.3.6.0 [[b][color=#ff0000]C:\Oracle\Middleware\wlserver_10.3\common\templates\domains\wls.jar[/color][/b]] 
2017-07-22 21:55:50,948 INFO  [WizardController] com.oracle.cie.domain.WLSTemplateBuilder - No config-groups.xml found in template
2017-07-22 21:55:50,948 INFO  [WizardController] com.oracle.cie.domain.WLSTemplateBuilder - No template-database.xml found in template
2017-07-22 21:55:51,624 INFO  [WizardController] 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  [WizardController] 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  [WizardController] com.oracle.cie.common.util.JdkVersion - JDK version is null.
2017-07-22 22:01:36,221 INFO  [WizardController] com.oracle.cie.domain.DomainChecker - ListenPort internal Validation result= [null]
2017-07-22 22:01:36,222 INFO  [WizardController] com.oracle.cie.domain.DomainChecker - ListenPort external Validation result= [null]
2017-07-22 22:01:40,416 INFO  [Thread-4] com.oracle.cie.domain.StartMenu [b][color=#ff0000]- Creating start menu program[/color][/b]=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  [Thread-4] 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  [Thread-4] 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  [Thread-4] com.oracle.cie.domain.DomainRegistryWrapper - need to initialize domainRegistrydocument object
2017-07-22 22:01:40,647 INFO  [Thread-4] com.oracle.cie.domain.DomainGenerator - Domain Generation Successful!


文件:domain-registry.xml
[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文件,根据此文件可以知道具体的细节内容:
[Java] 纯文本查看 复制代码
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文件内容:
[XML] 纯文本查看 复制代码
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 [server name].lok indicates that the server with name [server 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 lock
The 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 finish
When 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




知识改变命运!

JAVA EE 学习     JAVA EE 资料
JEE Study:企业级开发学习网!
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

QQ|Archiver|手机版|小黑屋|JEE Study ( 京ICP备16036936   JeeStudy企业开发官网①

GMT+8, 2024-4-24 23:02 , Processed in 0.271023 second(s), 41 queries .

Powered by JeeStudy!

© 2008-2020 JEE Study 企业级开发学习网

快速回复 返回顶部 返回列表