Apache ODE 1.3.2.(BPEL-Engine), Tomcat 6.0 and MySQL
EDIT:PLZ ignore all my complaining! everything should be fine now in wiki and the upcoming releases (>1.3.2) Thx for the fast reaction of the ODE-Developers!
To say it from the beginning. This ODE is a BPEL-Engine for orchestration of Buisiness-Processes and has nothing to do with Physics-Engine ODE. Nevertheless I spent much time switching from the filebased buildin database to MySQL. There wasn’t much to find about that in the WWW. There is a nice point in the userguide that drove me crazy:
...
3. Make sure that MySQL is started and the ODE schema has been loaded in a ode database.
...
Well,…but how!? First of all there is no schema provided and the integrated openJPA seems not to be willing to create the schema for you….
Here a tutorial how to install Apache ODE 1.3.2 on Apache Tomcat 6.0
- download mysql-connector if you haven’t yet
- unzip/untar the archive and move the driver-jar (mysql-connector-java-xxxx.jar) to your tomcat’s lib-directory (TOMCAT/lib)
- download ode-war.zip
- unzip the archive and copy the file ode.war to your webapp-directory (TOMCAT/webapps)
- Follow the instructions as described in the user-guide(following steps 6 + 7):
- Add the following stanza to TOMCAT/conf/server.xml inside the <Host> element:
<Context path=“/ode” docBase=“ode” debug=“5″ reloadable=“true” crossContext=“true”> <Resource name=“jdbc/ODEDB” auth=“Container” type=“javax.sql.DataSource” maxActive=“100″ maxIdle=“30″ maxWait=“10000″ username=“root” password=“” driverClassName=“com.mysql.jdbc.Driver” url=“jdbc:mysql://localhost:3306/ode?autoReconnect=true”/> </Context> - Add a file named ode-axis2.properties under Tomcat/webapps/ode/WEB-INF/conf with the following content:
ode-axis2.db.mode=EXTERNAL ode-axis2.db.ext.dataSource=java:comp/env/jdbc/ODEDB - create a database with the name ‘ode’
- create the ode-job table (somewhere in the sourcecode I found that):
CREATE TABLE ODE_JOB (
COMMIT;
jobid CHAR(64) NOT NULL DEFAULT '',
ts BIGINT NOT NULL DEFAULT 0,
nodeid char(64) NULL,
scheduled int NOT NULL DEFAULT 0,
transacted int NOT NULL DEFAULT 0,
details blob(4096) NULL,
PRIMARY KEY(jobid),
INDEX IDX_ODE_JOB_TS(ts),
INDEX IDX_ODE_JOB_NODEID(nodeid)
)
TYPE=InnoDB; - In order to let openjpa create the schema go to the command-box (START->run…->CMD) and set following java_options(this is one line):
set JAVA_OPTS="-Dopenjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=true)"
- navigate to you tomcat’s bin-directory and start the tomcat by using the startup.bat (or startup.sh)
- With a bit luck, that’s it….hope that helped.
Additionally here is a schema for Apache Ode 1.3.2.
I really ask myself why there is such a huge lack of information about that topic. Maybe I had something on my eyes and all of this is obvious. But for me it was not. And I really can’t get why to use a build-tool “buildr” that is ruby-based!???? And using all “how to build the source-code” instructions ended up in a buildr-error!?! Well,…maybe again my fault!? Actually I now can start to work with ODE and maybe someday I will love it, but not yet! That is for sure!
EDIT:
Just got comments from the Apache ODE developers that they fixed the wiki and will ship the schema with next releases! Wow,…actually I didn’t expect such a reaction! All I can say is:”Thank you”. Sry about being mad about the wiki I know it is no fun to keep that up to date… ;-D