Opentaps Google-Funambol Integration
Author - Avinash Giradkar
Opentaps has a built-in capability to integrate with Funambol. This document demonstrates how the integration works by integrating Events with Google.
Funambol:
Funambol has a open-source synchronization server that can syncronize contacts, calender, task and has email push, device management over SychML protocol. You can find more information about funambol here
Opentaps+Funambol project
Opentaps RC1 has funambol integrated in it. This integrated funambol is customzied according to the opentaps requirements.
Installing Funambol with mysql
There are documents in the $OT_HOME/hot-deploy/funambol/docs/man/
folder that will assist you to install funambol. However, default opentaps funambol configuration assumes that you are using PostgreSQL. If you want to use mysql instead of PostgreSQL then you can do that with some changes in configuration file.
Here is the modified procedure assuming mysql as database.
* first create database and a user that will be used to store funambol data.
mysql> create database funambol;
mysql> GRANT ALL PRIVILEGES ON funambol.* TO
'funambol'@'localhost' IDENTIFIED BY 'funambol';
* copy mysql connector to director
$OT_HOME/framework/entity/lib/jdbc/
mysql-connector-java-5.1.10-bin.jar
* modify the file $OT_HOME/hot-deploy/funambol/install/install.properties
Although the parameter comments specify to address one of
# - hypersonic
# - postgresql
changing the value of the dbms parameter to:
dbms=mysql
comment out the hypersonic specific configuration and enter mysql configuration.
jdbc.classpath=../../framework/entity/lib/jdbc/
mysql-connector-java-5.1.10-bin.jar
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost/funambol
jdbc.user=funambol
jdbc.password=funambol
* Creating sql files to create funambol database into mysql. Fortunatly we can use the pre-existing sql files for postgresql.
copy folder $OT_HOME/hot-deploy/funambol/install/core/postgresql into a new 'mysql' folder
$OT_HOME/hot-deploy/funambol/install/core/mysql
This folder contains the sql files that creates funambol database into mysql.
similarly copy folder $OT_HOME/hot-deploy/funambol/install/modules/postgresql into a new 'mysql' folder
$OT_HOME/hot-deploy/funambol/install/modules/mysql
This will create a init schema for that loads the 'opentaps' module into funambol core.
At this point you can follow the steps given in the funambol_admin.doc. For the sake of completion I will enlist those here.
* modify file
$OT_HOME/hot-deploy/funambol/webapp/WEB-INF/
opentaps-sync-config.xml
change the 1.3 section to reflect to the new mysql database.
<bean id="funambolDS"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:mysql://127.0.0.1/
funambol"/>
<property name="driverClassName" value="com.mysql.jdbc
.Driver"/>
<property name="username" value="root"/>
<property name="password" value="password"/>
<property name="defaultAutoCommit" value="true"/>
<!-- this setting is essential as Funambol is not
TX-aware-->
<property name="maxActive" value="20"/>
<property name="maxIdle" value="2"/>
<property name="maxWait" value="5000"/>
</bean>
and
<bean id="routingDataSourceConfiguration" class="com.
funambol.server.db.RoutingDataSourceConfiguration">
<constructor-arg>
<props>
<prop key="url">
jdbc:mysql://127.0.0.1/funambol</prop>
<prop key="driverClassName"
com.mysql.jdbc.Driver</prop>
<prop key="username">root</prop>
<prop key="password">password</prop>
<prop key="url">
jdbc:mysql://127.0.0.1/funambol</prop>
</props>
</constructor-arg>
<constructor-arg><ref bean="partitioningCriteria"/>
</constructor-arg>
<constructor-arg><null/></constructor-arg>
</bean>
* ant the new configuration from the $OT_HOME location
ant -f hot-deploy/funambol/build.xml config
ant -f hot-deploy/funambol/install/install.xml install
ant -f hot-deploy/funambol/install/install.xml
install-sync-module
ant -f hot-deploy/funambol/install/install.xml
install-sync-source
At this point you should have mysql running with 'funambol' as database with 26 tables
As of now 5-March-2010, the current google-connector is at version 1.1. However, to syncronize google calender we would need version 1.2 which is in beta. you can download the google-connector from here.
Google calender wont work at version 1.1 or lower.
All set-up is been done. Now lets start Opentaps.
once the opentaps completes loading itself check for logs to see if Funambol is loaded properly
alternately you can also check on browser if Funambol is running properly.
* login to your google-account and create a test-event for testing purpose.
* fire-up the google-connector and enter user detatils
goto Edit>Communication Settings
Funambol Username: admin
Funambol Password: ofbiz
Google UserName: <yourgamilid>@gmail.com
Google Password: <yourgmailPassword>
Edit>Synchronization Settings
Uncheck Contacts
Check Calendars
Hit
* login to opentaps as admin to see the entry enlisted as event under 'crmsfa'
Known Issues:
1. Time-zone: The syncronization between google-calendar and opentaps+funambol is not syncronizing to correct timestamp.
2. Google-connector seems to have Hanged-up: The google connector seems to have hanged-up after you press "Synchronize". However the sync request is carried out from the back-end. You can check this from the Server as well as client logs.
