如何在启动服务器之前设置 jdbc-login-timeout-seconds。在 Weblogic 服务器启动时,如果数据源无法访问数据库,Weblogic 服务器线程会挂在 JDBC 驱动程序代码中,等待来自数据库服务器的回复。
该模式domain xmlns="http://xmlns.oracle.com/weblogic/domain"
具有此属性 jdbc-login-timeout-seconds 但我无法弄清楚如何设置它?以下是来自 domain.xsd 的详细信息
<xs:complexType name="serverType">
<xs:complexContent>
<xs:extension base="dom:kernelType">
<xs:element default="0" minOccurs="0" name="jdbc-login-timeout-seconds" nillable="false">
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="kernelType">
以下是从 oracle 1) http://docs.oracle.com/cd/E11035_01/wls100/schemaref/config/http.www.bea.com.ns.weblogic.920.domain/types/
进行设置的文档servertype.jdbc-login-timeout-seconds.html
2) http://docs.oracle.com/cd/E15523_01/web.1111/e13737/jdbc_datasources.htm#i1203054
此外,如果这可以通过我在 ServerMBean 上设置 JDBCLoginTimeoutSeconds 属性来完成,请分享通过管理控制台进行设置的步骤。
下面是我的 config.xml
<?xml version='1.0' encoding='UTF-8'?>
<domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd">
<name>base_domain</name>
<domain-version>10.3.5.0</domain-version>
<security-configuration>
<name>base_domain</name>
<realm>
<sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>
<sec:authentication-provider xsi:type="wls:default-identity-asserterType">
<sec:active-type>AuthenticatedUser</sec:active-type>
</sec:authentication-provider>
<sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
<sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
<sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
<sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
<sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
<sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
<sec:name>myrealm</sec:name>
<sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
<sec:name>SystemPasswordValidator</sec:name>
<pas:min-password-length>8</pas:min-password-length>
<pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
</sec:password-validator>
</realm>
<default-realm>myrealm</default-realm>
<credential-encrypted>{AES}QEVyKcPXSLI3fJ4+E7+vZXSCAyCiqKRCgZ+g3VG/6bg0+5W2aeZ/RvvdpY09+wFqyjSSENtW7uuPii8I5VcdAx6fXTLp5LabMTmVMKWU5ionHtVOvCbDCYHebmPnC6ky</credential-encrypted>
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>{AES}RFTA5Jc8EDK/SQOKxSJLcyEwWprM6bmtefX4yPgaNjs=</node-manager-password-encrypted>
</security-configuration>
<server>
<name>AdminServer</name>
<listen-address></listen-address>
</server>
<embedded-ldap>
<name>base_domain</name>
<credential-encrypted>{AES}WFD4gnix1Q8sUzcFWhXtZf/bWE2C4qu7lokJGxmRn23fwSi1o8EzZx0TW9QqxnVm</credential-encrypted>
</embedded-ldap>
<configuration-version>10.3.5.0</configuration-version>
<admin-server-name>AdminServer</admin-server-name>
<jdbc-system-resource>
<name>appDS</name>
<target>AdminServer</target>
<descriptor-file-name>jdbc/appDS-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>
</domain>