I was studying JavaEE7
and using Widlfly 11.0.0.CR1
, first with no configuration on the server itself, just running a normal webapp without many things, a form with a listing, and the time was OK. 1 minute maximum.
After setting a dataSource
, a security-domain
and a smtp
, the time to upload the server and deploy the application was very large.
1. Upload the server : 4 minutes and a few seconds
2. Deploy the web app : 1 minute 25 seconds
Follows portions of the server configuration file with the settings I mentioned
standalone.xml
// datasource
<datasource jndi-name="java:jboss/datasources/banco" pool-name="bancoDS">
<connection-url>jdbc:postgresql://localhost:5432/banco</connection-url>
<connection-property name="DatabaseName">banco</connection-property>
<driver>org.postgresql</driver>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>20</max-pool-size>
</pool>
<security>
<user-name>postgres</user-name>
<password>root</password>
</security>
</datasource>
//security-domain
<security-domain name="database-login" cache-type="default">
<authentication>
<login-module code="Database" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/bancoDS"/>
<module-option name="principalsQuery" value="select senha from SystemUser where email = ?"/>
<module-option name="rolesQuery" value="select sysRole.roles_name,'Roles' from SystemUser_SystemRole sysRole inner join SystemUser su on sysRole.SystemUser_id = su.id where su.email = ?"/>
<module-option name="hashAlgorithm" value="SHA-256"/>
<module-option name="hashEncoding" value="base64"/>
</login-module>
</authentication>
</security-domain>
//email
<outbound-socket-binding name="mail-smtp-gmail">
<remote-destination host="smtp.gmail.com" port="465"/>
</outbound-socket-binding>