Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Tim Anderson <tma-ooduxAEi7gXtt0EhB6fy4g <at> public.gmane.org>
Subject: Re: help: how to modify the table schema for derby DB
Newsgroups: gmane.comp.java.openjms.user
Date: Thursday 21st December 2006 20:21:23 UTC (over 10 years ago)
Ken Hu wrote:
> The persisitent storage we use for openjms is postgresql right now.
>     Openjms always throws error message like this:
>     ERROR [LeaseManager] - Cannot remove
>     message=ID:b3f55374-c16e-1004-8eee-11dd688bf151
>     If I use derby to replace postgresql, it seems work fine.
>     But another problem sometimes happens, if a message is too long, the
>     default schema of table message won't be allowed to store such a
> long
>     message.
>     So I think I should try to modify the table schema.
>     Does anyone know where should I start for this purpose ?
>   
You need to update the schema manually, so that the messageBlob column
is a blob instead of a long binary. ie.

DROP TABLE MESSAGES

CREATE TABLE MESSAGES
(
MESSAGEID VARCHAR(64) not null,
DESTINATIONID BIGINT not null,
PRIORITY INTEGER not null,
CREATETIME BIGINT not null,
EXPIRYTIME BIGINT not null,
PROCESSED INTEGER not null,
MESSAGEBLOB BLOB not null
);

CREATE UNIQUE INDEX MESSAGES_PK ON MESSAGES(MESSAGEID);


You can do this using SQuirrel SQL[1], or the ij tool [2] included in
the derby binary distribution [3].

-Tim

[1] http://squirrel-sql.sourceforge.net/
[2] http://db.apache.org/derby/docs/10.1/tools/
[3] http://db.apache.org/derby/derby_downloads.html
 
CD: 2ms