java - tomcat中定义的数据源的auth属性的意义是什么

标签 java tomcat

在tomcat中我们定义数据源。在数据源中有一个属性“auth”。通常我曾经将其值等于“容器”。例如。

<Resource name="jdbc/myoracle" auth="Container"
              type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver"
              url="jdbc:oracle:thin:@127.0.0.1:1521:mysid"
              username="scott" password="tiger" maxActive="20" maxIdle="10"
              maxWait="-1"/> 

有人能告诉我这个“auth”属性的意义是什么吗?谷歌搜索后我也找不到这个属性的意义。

最佳答案

遍历 doc ,它解释说:

Specify whether the web Application code signs on to the corresponding resource manager programmatically, or whether the Container will sign on to the resource manager on behalf of the application. The value of this attribute must be Application or Container. This attribute is required if the web application will use a element in the web application deployment descriptor, but is optional if the application uses a instead.

关于java - tomcat中定义的数据源的auth属性的意义是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17107207/

相关文章:

java - 如何从 Facebook 获取 Android Studio 用户名

tomcat - 如何将日志从 tomcat docker 容器发送到 catalina.out?

java - 如何获取托管网络中代理服务器的名称或 IP?

java - 为什么当我将元素从一维数组传输到二维数组时,在获取上一个循环生成的最后一个一维数组时

java - 将字符串对象转换为方程

tomcat - BPS 部署到 Tomcat 或其他应用程序服务器

java - 启用 SSL 的连接器不断出现在 server.xml 中

apache - 如何在 EC2 机器上安装 Wordpress?

java - 使用 Maven 将 Spring 框架应用程序打包到 war

java - 基于从 Excel 工作表中拉入的变量运行代码。