Hi all,
With Amanda making the Trafodion 1.3.0 Sandbox available as a VirtualBox
appliance I could continue my PoC to have Apache OFBiz working with
Trafodion. My first attempt started with the Trafodion 1.1.0 Sandbox.
So having played with the combo over the last few day I want to share my
findings below...
In order to have OFBiz working with an external persistence layer some
setting need to be augmented/added.
1. There needs to be a set of field type definitions in the entity
component. As OFBiz comes with an embedded Apache Derby RMDBS, this is the
starting point and it looks like:
{code}
<field-type-def type="blob" sql-type="BLOB" java-type="java.sql.Blob"
/>
<field-type-def type="byte-array" sql-type="BLOB" java-type="byte[]"
/>
<field-type-def type="object" sql-type="BLOB" java-type="Object"/>
<field-type-def type="date-time" sql-type="TIMESTAMP" java-type=
"java.sql.Timestamp"/>
<field-type-def type="date" sql-type="DATE" java-type="java.sql.Date"
/>
<field-type-def type="time" sql-type="TIME" java-type="java.sql.Time"
/>
<field-type-def type="currency-amount" sql-type="NUMERIC(18,2)"
java-type="java.math.BigDecimal"/>
<field-type-def type="currency-precise" sql-type="NUMERIC(18,3)"
java-type="java.math.BigDecimal"/>
<field-type-def type="fixed-point" sql-type="NUMERIC(18,6)" java-type
="java.math.BigDecimal"/>
<field-type-def type="floating-point" sql-type="DOUBLE" java-type=
"Double"/>
<field-type-def type="numeric" sql-type="NUMERIC(20,0)" java-type=
"Long"/>
<field-type-def type="id" sql-type="VARCHAR(20)" java-type="String"/>
<field-type-def type="id-long" sql-type="VARCHAR(60)" java-type=
"String"/>
<field-type-def type="id-vlong" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="indicator" sql-type="CHAR(1)" java-type=
"String"/>
<field-type-def type="very-short" sql-type="VARCHAR(10)" java-type=
"String"/>
<field-type-def type="short-varchar" sql-type="VARCHAR(60)" java-type
="String"/>
<field-type-def type="long-varchar" sql-type="VARCHAR(255)" java-type
="String"/>
<field-type-def type="very-long" sql-type="CLOB" java-type="String"/>
<field-type-def type="comment" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="description" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type=
"String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type=
"String"/>
<!-- Specialized Types -->
<field-type-def type="credit-card-number" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="credit-card-date" sql-type="VARCHAR(7)"
java-type="String"/>
<field-type-def type="email" sql-type="VARCHAR(320)" java-type=
"String"/>
<field-type-def type="url" sql-type="VARCHAR(2000)" java-type=
"String"/>
<field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type=
"String"/>
<field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type=
"String"/>
<field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type=
"String"/>
{code}
Based on this I created a new one, which looks like:
{code}
<field-type-def type="blob" sql-type="VARCHAR(32000)" java-type=
"java.sql.Blob"/>
<field-type-def type="byte-array" sql-type="VARCHAR(32000)" java-type
="byte[]"/>
<field-type-def type="object" sql-type="VARCHAR(32000)" java-type=
"Object"/>
<field-type-def type="date-time" sql-type="TIMESTAMP" java-type=
"java.sql.Timestamp"/>
<field-type-def type="date" sql-type="DATE" java-type="java.sql.Date"
/>
<field-type-def type="time" sql-type="TIME" java-type="java.sql.Time"
/>
<field-type-def type="currency-amount" sql-type="NUMERIC(18,2)"
java-type="java.math.BigDecimal"/>
<field-type-def type="currency-precise" sql-type="NUMERIC(18,3)"
java-type="java.math.BigDecimal"/>
<field-type-def type="fixed-point" sql-type="NUMERIC(18,6)" java-type
="java.math.BigDecimal"/>
<field-type-def type="floating-point" sql-type="FLOAT" java-type=
"Double"/>
<field-type-def type="numeric" sql-type="NUMERIC(20,0)" java-type=
"Long"/>
<field-type-def type="id" sql-type="VARCHAR(20)" java-type="String"/>
<field-type-def type="id-long" sql-type="VARCHAR(60)" java-type=
"String"/>
<field-type-def type="id-vlong" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="indicator" sql-type="CHAR(1)" sql-type-alias=
"BPCHAR" java-type="String"/>
<field-type-def type="very-short" sql-type="VARCHAR(10)" java-type=
"String"/>
<field-type-def type="short-varchar" sql-type="VARCHAR(60)" java-type
="String"/>
<field-type-def type="long-varchar" sql-type="VARCHAR(255)" java-type
="String"/>
<field-type-def type="very-long" sql-type="VARCHAR(32000)" java-type=
"String"/>
<field-type-def type="comment" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="description" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="name" sql-type="VARCHAR(100)" java-type=
"String"/>
<field-type-def type="value" sql-type="VARCHAR(255)" java-type=
"String"/>
<!-- Specialized Types -->
<field-type-def type="credit-card-number" sql-type="VARCHAR(255)"
java-type="String"/>
<field-type-def type="credit-card-date" sql-type="VARCHAR(7)"
java-type="String"/>
<field-type-def type="email" sql-type="VARCHAR(320)" java-type=
"String"/>
<field-type-def type="url" sql-type="VARCHAR(2000)" java-type=
"String"/>
<field-type-def type="id-ne" sql-type="VARCHAR(20)" java-type=
"String"/>
<field-type-def type="id-long-ne" sql-type="VARCHAR(60)" java-type=
"String"/>
<field-type-def type="id-vlong-ne" sql-type="VARCHAR(255)" java-type=
"String"/>
<field-type-def type="tel-number" sql-type="VARCHAR(60)" java-type=
"String"/>
{code}
2. I also needed to define the connectors for the three schemas OFBiz
uses. I won't bother you with the detail for now.
After having started the Trafodion sandbox, I checked whether it was
working properly before I kicked off the OFBiz start and load demo task
(./ant load-demo). This task has a few sub tasks to 1) build the jars,
start the instantiation, check the tables for existence and completeness
and load the data datasets.
So after a few runs I can say: for now Apache OFBiz doesn't like what
Trafodion does very much. I guess I must tweak the connecitons settings a
bit more.
I'll keep you posted.
Best regards,
Pierre Smits
ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services
OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/