TimesTen uses a JDBC-ODBC bridge. There's a driver class called
com.timesten.jdbc.TimesTenDriver, and a data source class called
com.timesten.jdbc.TimesTenDataSource.
We have managed to get this working .. almost. We added a
TimesTenJDBCAdapter thus:
public class TimesTenJDBCAdapter extends BytesJDBCAdapter {
public void setStatements(Statements statements) {
statements.setBinaryDataType("VARBINARY(4000000)");
super.setStatements(statements);
}
}
... then we added a resource file to specify the adapter class:
class=org.apache.activemq.store.jdbc.adapter.TimesTenJDBCAdapter
The only problem is that on startup activeMQ fails to create its 3 tables.
So we created them manually in our db, using the following:
CREATE TABLE ACTIVEMQ_MSGS(ID INTEGER NOT NULL, CONTAINER VARCHAR(250),
MSGID_PROD VARCHAR(250), MSGID_SEQ INTEGER, EXPIRATION BIGINT, MSG
VARBINARY(4000000), PRIMARY KEY ( ID ) );
CREATE INDEX ACTIVEMQ_MSGS_MIDX ON ACTIVEMQ_MSGS (MSGID_PROD,MSGID_SEQ);
CREATE INDEX ACTIVEMQ_MSGS_CIDX ON ACTIVEMQ_MSGS (CONTAINER);
CREATE INDEX ACTIVEMQ_MSGS_EIDX ON ACTIVEMQ_MSGS (EXPIRATION);
CREATE TABLE ACTIVEMQ_LOCK( ID BIGINT NOT NULL, TTIME BIGINT, BROKER_NAME
VARCHAR(250), PRIMARY KEY (ID) );
>From there on it seems to work.
Pete
James.Strachan wrote:
>
> On 4/6/07, prylance <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I'm using Oracle TimesTen embedded database
>> (http://www.oracle.com/technology/software/products/timesten/index.html)
>> and
>> want to use it as the persistent message store with ActiveMQ. It isn't
>> mentioned in the ActiveMQ list of supported JDBC databases:
>>
>> http://activemq.apache.org/jdbc-support.html
>>
>> ... and that pages says I should email this list if I want my database to
>> be
>> supported. So here it is: could you add support for Oracle TimesTen
>> please?
>
> Sure - particularly if you help us test it :)
>
> The main thing we need to know is what its SQL syntax is like. Could
> you let us know what the JDBC driver name is? Also does TimesTen
> support Oracle like syntax and blob support?
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
--
View this message in context:
http://www.nabble.com/JDBC-support-for-Oracle-TimesTen-tf3536704s2354.html#a10084949
Sent from the ActiveMQ - User mailing list archive at Nabble.com.