Gmane
Picon Favicon
From: Tim Anderson <tma@...>
Subject: Re: help: how to modify the table schema for derby DB
Newsgroups: gmane.comp.java.openjms.user
Date: 2006-12-21 20:21:23 GMT (1 year, 28 weeks, 4 days, 9 hours and 38 minutes 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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
openjms-user mailing list
openjms-user@...
https://lists.sourceforge.net/lists/listinfo/openjms-user