Thursday, July 10, 2008

Apache ODE 1.2 with Oracle Database 10g

Hi there,

It can be very usefull to change the database for many reasons (your customer wants to have this brand, your customer has some commercial discounts, support, etc...).

I'll will show you how to use the RDMS Oracle Database 10g with Apache ODE 1.2 .war version.

You'll need the sysdba privileges in order to follow the next steps.
You can get the oracle.sql script in the directory apache-ode-war-1.2/sql.

Create an ODE tablespace
Connect to the sid :
sqlplus sys/manager@xe as sysdba

Then execute the SQL statement :
CREATE TABLESPACE ODE DATAFILE
'/ENTREPRISE/PRODUCT/ORACLEXE/ORADATA/XE/ODE.DBF' SIZE 1000M AUTOEXTEND OFF
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT MANUAL
FLASHBACK ON;

Feel free to adapt this to your environement (the dbf path, the autoextend property and the initial size of the tbs).


Create an ODE schema
Execute the SQL statement :
CREATE USER ode
IDENTIFIED BY ode
DEFAULT TABLESPACE ode
TEMPORARY TABLESPACE temp
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- Roles
GRANT RESOURCE TO ode;
GRANT CONNECT TO ode;
ALTER USER ode DEFAULT ROLE ALL;
-- System Privileges
GRANT UNLIMITED TABLESPACE TO ode;
GRANT CREATE VIEW TO ode;
-- tablespace Quota
ALTER USER ode QUOTA UNLIMITED ON ode;

Populate the ODE schema
Load the Apache ODE 1.2 schema :
sqlplus ode/ode@xe @oracle.sql
Create the JDBC datasource
Add this in the Host tag to the $CATALINA_HOME/conf/server.xml file :
<Context path="/ode" docBase="ode" debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/oracle/ode"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="ODE"
password="ODE"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:XE"/>
</Context>

Bind the ODE engine to the oracle datasource
Add the file $CATALINA_HOME/webapps/ode/WEB-INF/conf/ode-axis2.properties with this content :
ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/oracle/ode

Add the Oracle JDBC Driver to the tomcat lib directory
Add the file ojdbc14.jar (which you can find in the lib directory of your $ORACLE_HOME) to the $CATALINA_HOME/lib directory.

Ok we're done, that's all !
Just restart the tomcat and it should work.

Wednesday, July 9, 2008

Apache ODE 1.2 is released

Hi folks,

This is my first technical post, and what is better than to announce the Apache ODE 1.2 release ?

This new release sounds very good for several points :
  • Improvements for stability and performance
  • External variables: variables used in a process are not opaque to the outside world anymore. You can map them to a simple database table and manipulate them directly. This means assigning to a variable has the effect of inserting or updating a row in the database, while reading a variable, has the effect of selecting a row from the database (I'll do a post on this feature to test it)
  • Advanced endpoint configuration support : WS-Security & WS-RM
  • New SQL scripts packaged in the ditribution (Derby, MySQL, Oracle)
  • Lots of bugs fixed !
Talk you soon.
Raphaël.