JBoss package on the data source access user passwords
I use the jboss-4.0.2, sql server2000 jdk1.507
Before doing password package must ensure that your database visit is a success. Jboss use of the configuration data sources and jsp servlet or visit no problem. As is how to achieve the above, see themselves get.
First, mssql-ds.xml modified as follows:
<local-tx-datasource>
<jndi-name> MSSQLDS </ jndi-name>
<!–< Use context-java-> false </ java-use context-> ->
<connection-url> Jdbc: microsoft: sqlserver: / / localhost: 1433; DatabaseName = testserver </ connection-url>
<driver-class> Com.microsoft.jdbc.sqlserver.SQLServerDriver </ driver-class>
<min-pool-size> 10 </ min-pool-size>
<max-pool-size> 30 </ max-pool-size>
<blocking-timeout-mills> 3000 </ blocking-timeout-mills>
<idle-timeout-minutes> 10 </ idle-timeout-minutes>
<! - Sql to call when connection is created
<new-connection-sql> Some arbitrary sql </ new-connection-sql>
<!–< Prepared-statement-cache-size> </ prepared-statement-cache-size> ->
<! - Sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql> Some arbitrary sql </ check-valid sql-connection->
–>
<! - Corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) ->
<metadata>
<type-mapping> MS SQLSERVER2000 </ type-mapping>
</ Metadata>
<security-domain> EncryptDBPassword </ security-domain> / / landing here is done by the database to be used to check the security domain
</ Local-tx-datasource>
</ Datasources>
In this we have been deleted xml expressly use the Database Access user name and password. Then, in longin-config.xml, we must build a EncryptDBPassword with the same domain, security access their domain settings.
Longin-config.xml
<application-policy Name = "EncryptDBPassword">
<authentication>
<Login-module code = "org.jboss.resource.security.SecureIdentityLoginModule"
Flag = "required">
<module-option Name = "username"> sa </ module-option>
<module-option Name = "password">-1b92045752737243207a6df87216de44 </ module-option> / / here through jboss own password generated password generated document will be presented to generation behind
"managedConnectionFactoryName"> Jboss.jca <module-option name =: = LocalTxCM service, name = MSSQLDS </ module-option>
</ Login-module>
</ Authentication>
</ Application-policy>
About password generated by cmd jboss visit to the main directory. Use the following code to a string of generating a password file: / / jboss password protection mechanisms to provide the database user password Packaging
Microsoft Windows XP [Version 5.1.2600]
D: \> cd testserver \ jboss-4.0.2 \ bin
D: \ TestServer \ jboss 4.0.2-> java-cp "lib / jboss-jmx.jar; lib / jboss-common.jar; serve
R / default / lib / jboss-jca.jar; server / default / lib / jbosssx.jar "org.jboss.resource.s
Ecurity.SecureIdentityLoginModule ********( your password, the best ensure that your password is at least eight) [ENTER]
Encoded password:-1b92045752737243207a6df87216de44
As to how to generate and use the password base64 format package, I did not test into the offensive, and if you are interested then you can try, the first time such a thing has a problem, speak, please, and joint research. Thank you how to package the English behind me, interested in the study, hoping that someone can complete base64 format package.
Tags: java access, java package, jboss, out source, package, source






