Download Latest Version Webberchat.zip (13.6 MB)
Email in envelope

Get an email when there's a new version of WebberChat

Home / Beta release / Beta version 0.9.0
Name Modified Size InfoDownloads / Week
Parent folder
README_livechat.txt 2007-05-28 9.0 kB
setup_resources.zip 2007-05-28 446.2 kB
livechat_tomcat_package.zip 2007-05-28 21.2 MB
livechat.war 2007-05-28 11.4 MB
Totals: 4 Items   33.0 MB 0
Deployment procedures with Tomcat and Resin application servers (using Windows as examples but you can apply them easily to Linux or other OS)

============================
Deployment with Tomcat server
============================
1. Download and Install the J2SE Runtime Environment (JRE). It requires JRE 5.0 or later. Set an environment variable named JAVA_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\j2sdk5.0

2. Download and install Tomcat server. Recommend to use Tomcat 5 or higher.

3. Config Tomcat to run the application. 
  (1). Copy livechat.war file to your tomcat webapps folder
  (2). Set up a  web context in Tomcat server.xml or context.xml for livechat. And set up a data source JNDI name if you are not using the embeded HSQL database. The embeded HSQL database is not recommended for large volume of traffic. The following is an example config with mysql database:
  	<Context path="/livechat" docBase="livechat">
  	
  	    <!-- maxActive: Maximum number of dB connections in pool. Make sure you
  	         configure your mysqld max_connections large enough to handle
  	         all of your db connections. Set to 0 for no limit.
  	         -->
  	
  	    <!-- maxIdle: Maximum number of idle dB connections to retain in pool.
  	         Set to -1 for no limit.  See also the DBCP documentation on this
  	         and the minEvictableIdleTimeMillis configuration parameter.
  	         -->
  	
  	    <!-- maxWait: Maximum time to wait for a dB connection to become available
  	         in ms, in this example 10 seconds. An Exception is thrown if
  	         this timeout is exceeded.  Set to -1 to wait indefinitely.
  	         -->
  	
  	    <!-- username and password: MySQL dB username and password for dB connections  -->
  	
  	    <!-- driverClassName: Class name for the old mm.mysql JDBC driver is
  	         org.gjt.mm.mysql.Driver - we recommend using Connector/J though.
  	         Class name for the official MySQL Connector/J driver is com.mysql.jdbc.Driver.
  	         -->
  	    
  	    <!-- url: The JDBC connection url for connecting to your MySQL dB.
  	         The autoReconnect=true argument to the url makes sure that the
  	         mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
  	         connection.  mysqld by default closes idle connections after 8 hours.
  	         -->
  	
  	  	<Resource name="jdbc/livechat" auth="Container" type="javax.sql.DataSource"
  	               maxActive="30" maxIdle="20" maxWait="10000"
  	               username="root" password="" driverClassName="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
  	               url="jdbc:mysql://localhost:3306/livechat"/>
  	
	</Context>

   (3). Put your database driver class jar file in the TOMCAT_HOME/lib folder. For the above config, I am using mysql-connector-java-3.1.12-bin.jar.
   (4). Create a folder named "livechat" in a convenient location such as under TOMCAT_HOME. This will be the livechat project home folder where the necessary application config files and chat transcript search indices will be located. Give permission to the application process for writing to this folder.  
   	a. Copy the config folder from the setup_resources.zip file under this livechat home folder. Put this folder in classpath. If your livechat home folder is C:\apache-tomcat-6.0.10\liveChat, you can set this in classpath by setting the optional parameter in the TOMCAT_HOME/catalina.bat file: set JAVA_OPTS=%JAVA_OPTS% -Xbootclasspath/a:C:\apache-tomcat-6.0.10\liveChat\config
   	b. Modify the following variable in the config.properties file under config folder to reflect your livechat home folder:
   		#project home folder
		project_home_folder=C:/apache-tomcat-6.0.10/livechat

4. Create your database. Follow the procedures at the bottom of this file. 		
5. Start up your database server. 
6. Start up your tomcat server. Run startup.bat from TOMCAT_HOME/bin folder. 
	

================================
Deployment with Resin app server
================================
1. Download and Install the J2SE Runtime Environment (JRE). It requires JRE 5.0 or later. Set an environment variable named JAVA_HOME to the pathname of the directory into which you installed the JRE, e.g. c:\j2sdk5.0

2. Download and install resin app server. Recommend to use resin 3.0.21 or higher.

3. Config resin to run the application. 
  (1). Copy livechat.war file to your resin webapps folder
  (2). Set up a  web context in resin/resin.conf file for livechat. And set up a data source JNDI name if you are not using the embeded HSQL database. The embeded HSQL database is not recommended for large volume of traffic. The following is an example config with mysql database:
  
  <database>
	  <jndi-name>jdbc/livechat</jndi-name>
	  <driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
	      <url>jdbc:mysql://localhost:3306/livechat</url>
	      <user>root</user>
	      <password></password>
	      </driver>
	  <prepared-statement-cache-size>8</prepared-statement-cache-size>
	 <max-connections>30</max-connections>
	<max-idle-time>30s</max-idle-time>
    </database>
    
  <host id="" root-directory=".">
        <!--
           - configures an explicit root web-app matching the
           - webapp's ROOT
          -->
        <web-app id="/" document-directory="webapps/ROOT"/>
      <web-app id='/liveChat' document-directory="webapps/livechat"/>
    .....
  </host>
  (3). Put your database driver class jar file in the RESIN_HOME/lib folder. For the above database config, I am using mysql-connector-java-3.1.12-bin.jar.
  (4). Create a folder named "livechat" in a convenient location such as under RESIN_HOME. This will be the livechat project home folder where the necessary application config files and chat transcript search indices will be located. Give permission to the application process for writing to this folder.  
     	a. Copy the config folder from the setup_resources.zip file under this livechat home folder. Put this folder in classpath. If your livechat home folder is C:\resin-pro-3.0.22\liveChat, you can set this in classpath by starting your resin with the following command line: httpd.exe  -Xbootclasspath/a:C:\resin-pro-3.0.22\liveChat\config
     	b. Modify the following variable in the config.properties file under config folder to reflect your livechat home folder:
     		#project home folder
		project_home_folder=C:\resin-pro-3.0.22/livechat

4. Create your database. Follow the procedures at the bottom of this file. 		
5. Start up your database server. 
6. Start up your resin server. Run httpd.exe from the RESIN_HOME folder or the command line above if you need to set the config folder in classpath. 


================================
Procedures to create database
================================
1. Locate the sql scripts under the SQL folder in the setup_resources.zip file. 
2. Run liveChat_ddl.sql to set up database structure 
3. Run liveChat_static_data.sql to populate static tables
4. If you want to create some test user account to play with, run the liveChat_test_data.sql script. 
	(1). It sets up two workgroups and two queues under each workgroup. 
	(2). It sets up an admin user to manage the admin site: login/password: admin/test. URL to login: http://localhost:8080/livechat/admin.do.
	(3). It sets up three agent users who receives chats: login/password: alias4/test, alias5/test, alias6/ test. Url to login: http://localhost:8080/livechat/
	(4). It sets up three clients users who starts chat. Login/password: alias1/test, alias2/test, alias3/test. Url to login: http://localhost:8080/livechat/start.jsp and http://localhost:8080/livechat/start2.jsp if you want to start two windows on the same machine.

If you want to run HSQL as an embeded database, just do the following steps:
1. Copy the db folder from sql/hsql folder in the setup_resources.zip file to the livechat project home folder. This folder has everything necessary to set up the database. You don't need to run the above scripts any more. 
2. Change the following parameter to true in the config.properties under the livechat project home folder.
	#Whether use embeded HSQL database (Not recommended for high volume production purpose)
	use_embeded_hsql_db=true
3. Reference http://hsqldb.org/ if you need more help about HSQL.



=================== 
Please visit the project documentation page on sourceForge (coming soon) for more details on how to manage the application, how to set up workgroups and queues, how to customize routing logic, how to integrate chat client link on other sites and cusomize look and feel and how to set up clustering for failover. This application has a plugin based framework and it allows flexible customization. It is currently used by multiple departments of my employer. 
Source: README_livechat.txt, updated 2007-05-28