CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE JBM_USER(USER_ID VARCHAR(32) NOT NULL PRIMARY KEY,PASSWD VARCHAR(32) NOT NULL,CLIENTID VARCHAR(128))
CREATE MEMORY TABLE JBM_ROLE(ROLE_ID VARCHAR(32) NOT NULL,USER_ID VARCHAR(32) NOT NULL,PRIMARY KEY(USER_ID,ROLE_ID))
CREATE MEMORY TABLE HILOSEQUENCES(SEQUENCENAME VARCHAR(50) NOT NULL,HIGHVALUES INTEGER NOT NULL,CONSTRAINT HILO_PK PRIMARY KEY(SEQUENCENAME))
CREATE MEMORY TABLE JBM_DUAL(DUMMY INTEGER NOT NULL PRIMARY KEY)
CREATE MEMORY TABLE JBM_MSG_REF(MESSAGE_ID BIGINT NOT NULL,CHANNEL_ID BIGINT NOT NULL,TRANSACTION_ID BIGINT,STATE CHAR(1),ORD BIGINT,PAGE_ORD BIGINT,DELIVERY_COUNT INTEGER,SCHED_DELIVERY BIGINT,PRIMARY KEY(MESSAGE_ID,CHANNEL_ID))
CREATE INDEX JBM_MSG_REF_TX ON JBM_MSG_REF(TRANSACTION_ID,STATE)
CREATE MEMORY TABLE JBM_MSG(MESSAGE_ID BIGINT NOT NULL PRIMARY KEY,RELIABLE CHAR(1),EXPIRATION BIGINT,TIMESTAMP BIGINT,PRIORITY TINYINT,TYPE TINYINT,HEADERS LONGVARBINARY,PAYLOAD LONGVARBINARY)
CREATE MEMORY TABLE JBM_TX(NODE_ID INTEGER,TRANSACTION_ID BIGINT NOT NULL PRIMARY KEY,BRANCH_QUAL VARBINARY(254),FORMAT_ID INTEGER,GLOBAL_TXID VARBINARY(254))
CREATE MEMORY TABLE JBM_COUNTER(NAME VARCHAR(255) NOT NULL PRIMARY KEY,NEXT_ID BIGINT)
CREATE MEMORY TABLE JBM_ID_CACHE(NODE_ID INTEGER NOT NULL,CNTR INTEGER NOT NULL,JBM_ID VARCHAR(255),PRIMARY KEY(NODE_ID,CNTR))
CREATE MEMORY TABLE JBM_POSTOFFICE(POSTOFFICE_NAME VARCHAR(255) NOT NULL,NODE_ID INTEGER NOT NULL,QUEUE_NAME VARCHAR(255) NOT NULL,CONDITION VARCHAR(1023),SELECTOR VARCHAR(1023),CHANNEL_ID BIGINT,CLUSTERED CHAR(1),ALL_NODES CHAR(1),PRIMARY KEY(POSTOFFICE_NAME,NODE_ID,QUEUE_NAME))
CREATE MEMORY TABLE TIMERS(TIMERID VARCHAR(80) NOT NULL,TARGETID VARCHAR(250) NOT NULL,INITIALDATE TIMESTAMP NOT NULL,TIMERINTERVAL BIGINT,INSTANCEPK VARBINARY,INFO VARBINARY,CONSTRAINT TIMERS_PK PRIMARY KEY(TIMERID,TARGETID))
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO JBM_USER VALUES('dynsub','dynsub',NULL)
INSERT INTO JBM_USER VALUES('guest','guest',NULL)
INSERT INTO JBM_USER VALUES('j2ee','j2ee',NULL)
INSERT INTO JBM_USER VALUES('john','needle','DurableSubscriberExample')
INSERT INTO JBM_USER VALUES('nobody','nobody',NULL)
INSERT INTO JBM_ROLE VALUES('durpublisher','dynsub')
INSERT INTO JBM_ROLE VALUES('publisher','dynsub')
INSERT INTO JBM_ROLE VALUES('guest','guest')
INSERT INTO JBM_ROLE VALUES('j2ee','guest')
INSERT INTO JBM_ROLE VALUES('john','guest')
INSERT INTO JBM_ROLE VALUES('durpublisher','john')
INSERT INTO JBM_ROLE VALUES('publisher','john')
INSERT INTO JBM_ROLE VALUES('subscriber','john')
INSERT INTO JBM_ROLE VALUES('noacc','nobody')
INSERT INTO HILOSEQUENCES VALUES('general',0)
INSERT INTO JBM_DUAL VALUES(1)
INSERT INTO JBM_COUNTER VALUES('CHANNEL_ID',240)
INSERT INTO JBM_COUNTER VALUES('MESSAGE_ID',98304)
INSERT INTO JBM_POSTOFFICE VALUES('JMS post office',0,'DLQ','queue.DLQ',NULL,0,'N','N')
INSERT INTO JBM_POSTOFFICE VALUES('JMS post office',0,'EventQueue','queue.EventQueue',NULL,190,'N','N')
INSERT INTO JBM_POSTOFFICE VALUES('JMS post office',0,'ExpiryQueue','queue.ExpiryQueue',NULL,1,'N','N')
INSERT INTO JBM_POSTOFFICE VALUES('JMS post office',0,'NormalizationProgressQueue','queue.NormalizationProgressQueue',NULL,191,'N','N')
INSERT INTO JBM_POSTOFFICE VALUES('JMS post office',0,'TitleStatusQueue','queue.TitleStatusQueue',NULL,192,'N','N')
