[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: DerbyDatabase mbean in 4.0.3 missing?
richardToren
do-not-reply at jboss.com
Tue Sep 19 01:04:39 EDT 2006
You have to go into the deploy/jms folder and replace the hsql-jdbc2-service.xml with the following below. There was an error in the original text (it read EXITS not EXISTS). If you have the other dependencies for Derby in place and the datasource initalizes properly this should work (or to be exact, it works on 4.0.4GA for me under jdk 1.5 ):
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- $Id: derby-jdbc2-service.xml,v 1.1.4.2 2005/12/29 15:27:57 ltexier Exp $ -->
|
|
|
| <!-- ==================================================================== -->
| <!-- Persistence and caching using DERBY-DB (Synonym: IBM-Cloudscape) -->
| <!-- See docs/examples/jms for other configurations -->
| <!-- IMPORTANT: Remove hsqldb-jdbc2-service.xml -->
| <!-- -->
| <!-- Configuration supplied by Bison Schweiz AG Hendrik Schäfer -->
| <!-- ==================================================================== -->
|
| <!--
| | The destination manager is the core service within JBossMQ
| -->
|
| <depends optional-attribute-name="MessageCache">jboss.mq:service=MessageCache
| <depends optional-attribute-name="PersistenceManager">jboss.mq:service=PersistenceManager
| <depends optional-attribute-name="StateManager">jboss.mq:service=StateManager
|
|
| <!--
| | The MessageCache decides where to put JBossMQ message that
| | are sitting around waiting to be consumed by a client.
| |
| | The memory marks are in Megabytes. Once the JVM memory usage hits
| | the high memory mark, the old messages in the cache will start getting
| | stored in the DataDirectory. As memory usage gets closer to the
| | Max memory mark, the amount of message kept in the memory cache aproaches 0.
| -->
|
| 50
| 60
| jboss.mq:service=PersistenceManager
|
|
| <!-- The PersistenceManager is used to store messages to disk. -->
| <!--
| | The jdbc2 PersistenceManager is the new improved JDBC implementation.
| | This implementation allows you to control how messages are stored in
| | the database.
| |
| | This jdbc2 PM configuration has been tested against Derby DB
| |
| -->
|
| <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DerbyDS
|
| BLOB_TYPE=BYTES_BLOB
| INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
| INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
| SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
| SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
| DELETE_ALL_TX = DELETE FROM JMS_TRANSACTIONS
| SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
| SELECT_MESSAGE_KEYS_IN_DEST = SELECT MESSAGEID FROM JMS_MESSAGES WHERE DESTINATION=?
| SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
| MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
| UPDATE_MESSAGE = UPDATE JMS_MESSAGES SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?
| UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=?
| UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
| DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGES WHERE EXISTS (SELECT JMS_TRANSACTIONS.TXID FROM JMS_TRANSACTIONS \
| WHERE JMS_TRANSACTIONS.TXID = JMS_MESSAGES.TXID) \
| AND JMS_MESSAGES.TXOP = ?
| DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
| DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
| DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXOP='T'
| DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
| CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGES (MESSAGEID INTEGER NOT NULL, \
| DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
| MESSAGEBLOB blob(1024M), PRIMARY KEY (MESSAGEID, DESTINATION))
| CREATE_IDX_MESSAGE_TXOP_TXID = CREATE INDEX JMS_MESSAGES_TXOP_TXID ON JMS_MESSAGES (TXOP, TXID)
| CREATE_IDX_MESSAGE_DESTINATION = CREATE INDEX JMS_MESSAGES_DESTINATION ON JMS_MESSAGES (DESTINATION)
| CREATE_TX_TABLE = CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER not null, PRIMARY KEY (TXID) )
| CREATE_TABLES_ON_STARTUP = TRUE
|
| <!-- Uncomment to override the transaction timeout for recovery per queue/subscription, in seconds -->
| <!--attribute name="RecoveryTimeout">0</attribute-->
| <!-- The number of blobs to load at once during message recovery -->
| 0
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972475#3972475
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972475
More information about the jboss-user
mailing list