JBoss Configuration
From LoopFuse Wiki
restaurant mountain view missouri illinois dot drivers licence edmonton web webmap alley baggett clip movie no child left behind wisconsin raider tomb torrent gtco home wordperfect office receiver buying guide ephedrine overdose roller blading video paige flori cviricli
Contents |
Overview
Once JBoss has been installed (which normally just requires unzipping the download), there are a few configuration steps required.
By default, JBossAS comes with some components that are not required to run LoopFuse OneView. Although it is not required that these components be removed, it is suggested as will increase performance and help decrease security holes. The following services can be removed from the default JBossAS distribution:
server/default/deploy - files/directories to remove:
- http-invoker.sar
- jms
- jmx-console.war
- management
- snmp-adaptor.sar
- uuid-key-generator.sar
- bsh-deployer.xml
- iiop-service.xml
- jmx-invoker-service.xml
Note, note all of the above will be present as will depend on which type of distribution was installed.
Login module and Security
For LoopFuse OneView the LoopFuse login module, org.loopfuse.web.admin.security.DataSourceLoginModule, is used along with the JBossAS security (based on JAAS). This requires modification of the JBoss login-config.xml file (found under JBOSS_HOME]/server/default/conf/login-config.xml). A new application-policy (or security domain) needs to be added for LoopFuse OneView. This application-policy entry would look like:
<application-policy name = "loopfuse">
<authentication>
<login-module code = "org.loopfuse.web.admin.security.DataSourceLoginModule"
flag = "required">
<module-option name = "dbURL">jdbc:mysql://localhost:3306/loopfuse</module-option>
<module-option name = "dbDriver">com.mysql.jdbc.Driver</module-option>
<module-option name = "dbUser">root</module-option>
<module-option name = "dbPassword">qwerty</module-option>
<module-option name = "userTable">lf_users</module-option>
<module-option name = "roleTable">lf_user_roles</module-option>
<module-option name = "roleMapTable">lf_role_members</module-option>
</login-module>
</authentication>
</application-policy>
Of course, the above configuration is for a MySQL database called loopfuse which needs to be manually created before starting JBossAS. The tables declared in the configuration should be automatically by LoopFuse OneView when started for the first time. Of course whatever user is supplied will need to have permissions within the database to create tables.
Will also need to include the jdbc connector jar for MySQL (or for whatever database you use). The MySQL jdbc connector jar can be downloaded from http://www.mysql.com/products/connector/j/. The jar should be placed in the JBOSS_HOME]/server/default/lib directory.
Use of the JBoss security domain also requires including a jboss-web.xml file within war deployments. This is already built into the application within the loopfuse-admin.war and loopfuse-recorder.war files, but looks like:
<jboss-web>
<security-domain>java:/jaas/loopfuse</security-domain>
</jboss-web>
Notice the name 'loopfuse' for the application-policy is the same as the one given for the security-domain. This is how the two are tied together.
Mail Service Configuration
Since LoopFuse OneView will generate a new password and e-mail it to users that have forgotten their password, there needs a way to send e-mail. LoopFuse OneView will do this using the JBossAS mail service. This service is configured via the mail-service.xml (found under JBOSS_HOME/server/default/deploy/mail-service.xml). This file will need to be modified to look something like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<server>
<mbean code="org.jboss.mail.MailService"
name="jboss:service=Mail">
<attribute name="JNDIName">java:/Mail</attribute>
<attribute name="User">nobody</attribute>
<attribute name="Password">password</attribute>
<attribute name="Configuration">
<configuration>
<property name="mail.store.protocol" value="pop3"/>
<property name="mail.transport.protocol" value="smtp"/>
<property name="mail.user" value="loopfuse_admin"/>
<property name="mail.pop3.host" value="pop3.myhost.com"/>
<property name="mail.smtp.host" value="smtp.myhost.com"/>
<property name="mail.from" value="support@myhost.com"/>
<property name="mail.debug" value="false"/>
</configuration>
<depends>jboss:service=Naming</depends>
</attribute>
</mbean>
</server>
Of course will need to change the property values above to work with your mail server. For more information on mail service configuration, please reference http://wiki.jboss.org/wiki/Wiki.jsp?page=JavaMail.
LoopFuse OneView Installation and Configuration
There are three distribution files that can be downloaded for LoopFuse OneView, loopfuse-admin.war, loopfuse-recorder.war, and loopfuse-demo.war.
The loopfuse-recorder.war file is used to capture tracking information from your web site. Within this war, you will find a loopfuse.properties file (within the WEB-INF/classes directory). This file contains configuration information such as the database properties needed to connect to your database. By default, this file will contain the following:
# local development deployment DB connection values
hibernate.connection.url=jdbc:mysql://localhost:3306/loopfuse
hibernate.connection.username=root
hibernate.connection.password=qwerty
SessionManagerFactory.class=org.loopfuse.persistence.hibernate.DefaultSessionFactoryManager
You will need to change the hibernate connection properties so they match your database environment. One way to do this is to create a loopfuse-recorder.war directory in the JBoss deploy directory (i.e. JBOSS_HOME/server/default/deploy), then extract the contents of the loopfuse-recorder.war file into that new directory and edit the loopfuse.properties file under the directory.
However, an even easier way to handle changing of the loopfuse.properties values is to create a new loopfuse.properties file within the JBoss conf directory (i.e. JBOSS_HOME]/server/default/conf) and add the configuration properties from the loopfuse.properties within the loopfuse-recorder.war to the new loopfuse.properties file under the conf directory. LoopFuse OneView will use the loopfuse.properties in the conf directory if one is found over the one included in the war file. This way all that is needed for deployment is to copy the loopfuse-recorder.war file into the JBoss deploy directory as is.
The loopfuse-admin.war file is used for the LoopFuse OneView administration application. The loopfuse-admin.war also contains a loopfuse.properties file as well. By default, it will contain the following:
# local development deployment DB connection values
hibernate.connection.url=jdbc:mysql://localhost:3306/loopfuse
hibernate.connection.username=root
hibernate.connection.password=qwerty
supported_crm_types=SugarCRM
# class name for CRM instance factory
SugarCRM=org.loopfuse.crm.sugarcrm.SugarCRMInstanceFactory
SessionManagerFactory.class=org.loopfuse.persistence.hibernate.DefaultSessionFactoryManager
#initializer.class=org.loopfuse.persistence.hibernate.init.DefaultInitializer
initializer.class=org.loopfuse.persistence.hibernate.init.DemoDataInitializer
Just like with the loopfuse-recorder.war, the loopfuse.properties file needs to be updated for the loopfuse-admin.war to match your database environment. The same steps can be followed to do this as was done for the loopfuse-recorder.war.
Also notice the initializer.class property. By default, it uses the DemoDataInitializer, which will populate the database with some demo data (which can be used with the loopfuse-demo.war). If want a clean install without demo data, use the DefaultInitializer.
The loopfuse-demo.war is the deployment file for a sample web site, Wonders of the World Real Estate Sales. This sample web site has already been configured to use LoopFuse OneView, so will post hits and registrations to the default LoopFuse OneView running within the same JBossAS instance. There is no special configuration needed for this application, so to install, simply copy the loopfuse-demo.war to the JBossAS deploy directory (i.e. JBOSS_HOME/server/default/deploy).
