Installations
Download Java 8 and Wildfly 8.2.0-Final on local machine
Standalone xml Changes
Location - (${JBOSS_HOME}\standalone\configuration)
Adding SSL configuration
1.
Add a new
security realm under <security-realms>
<security-realm
name="SSLRealm">
<server-identities>
<ssl>
<keystore
path="${path_to_jks_file}/jboss.jks"
relative-to="jboss.server.config.dir"
keystore-password="changeit"/>
</ssl>
</server-identities>
</security-realm>
2.
Copy the jboss.jks inside jboss7 to ${JBOSS_HOME}\standalone\configuration
3.
Make a new entry for https listener within <server
name="default-server"> , within <subsystem
xmlns="urn:jboss:domain:undertow:1.2">
<https-listener
name="default-ssl" socket-binding="https"
security-realm="SSLRealm"/>
Adding Datasource
1.
Make a new entry for datasource within
<datasources> for PV
<datasource
jndi-name="java:/jdbc/datasources/pvMySQLDS"
pool-name="pvMySQLDS" enabled="true">
<connection-url>jdbc:mysql://DB server name:3306/DB name</connection-url>
<driver>mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>400</max-pool-size>
</pool>
<security>
<user-name>DB_USER</user-name>
<password>DB_PWD</password>
</security>
<timeout>
<blocking-timeout-millis>5000</blocking-timeout-millis>
</timeout>
</datasource>
2.
Add a new driver for MySQL within
<drivers>
<driver name="mysql"
module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
Adding global modules
1.
Add global modules within <subsystem
xmlns="urn:jboss:domain:ee:2.0">
<global-modules>
<module
name="config" slot="main"/>
<module
name="org.bouncycastle" slot="main"/>
<module
name="com.mysql" slot="main"/>
</global-modules>
Copying dependent folders\jars
1.
Copy config folder into ${JBOSS_HOME}\modules\system\layers\base
2.
Copy mysql folder into ${JBOSS_HOME}\modules\system\layers\base\com.
Application changes
Open jboss-deployment-structure.xml and replace the existing
with the following:
<?xml
version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem
name="jaxrs" />
</exclude-subsystems>
<exclusions>
<module
name="javax.ws.rs.api" />
</exclusions>
</deployment>
</jboss-deployment-structure>
Note: Put this change if required.
Enjoy Reading
No comments:
Post a Comment