AppFUSE configuration on JBOSS

xiaoxiao2021-03-06  42

Mainly a security configuration and log problem, the security configuration involves login-config.xml, web.xml, jboss-web.xml, the log involves the log4j.xml file, the configuration method is as follows:

1. Modify the / Server/default/cof/login-config.xml file to add a login policy for AppFuse.

Flag = "Required">

jdbc / mysql

SELECT Password from app_user where username =?

SELECT ROLE_NAME, 'RoLES' from user_role where username =?

2. Create a data source file, such as file name mysql-ds.xml, put this file in the / server / default / deploy directory, as follows:

JDBC / MySQL

JDBC: MySQL: // Localhost: 3306 / MySQL

com.mysql.jdbc.driver

root

3. Create a JBoss-web.xml file, define which security policy configured by JDBC resources and the app is used by the Login-Config.xml file. The content is as follows:

/ appfuse

jdbc / mysql javax.sql.datasource

Java: JDBC / MYSQL

Java: / JaaS / AppFuse

4. Modify the web.xml file: The key is the definition of the resource, as follows:

DB Connection

jdbc / mysql

javax.sql.datasource

container

5. When the web application deployed in JBoss, the log4j configuration must be configured in /server/default/conf/log4j.xml, as follows:

1.13.2

.8 2003/09/23 14:16:27 SLABOURE EXP $ ->

| For more configuration infromation and examples See the jakarta log4j

| OWEBSITE: http://jakarta.apache.org/log4j

->

->

->

->

->

转载请注明原文地址:https://www.9cbs.com/read-78336.html

New Post(0)