5 Replies Latest reply on Sep 19, 2006 1:04 AM by richardtoren

    DerbyDatabase mbean in 4.0.3 missing?

    grafpoo

      i am running jboss-4.0.3 and trying to set up a derby datasource (taken from the example in the 4.0.3 install). trouble is i don't have the mbean class org.jboss.jdbc.DerbyDatabase in any jarfiles in the jboss install. i've found the source code online, referring to 4.0.2 - is this something that went away? i really don't think i removed it.

        • 1. Re: DerbyDatabase mbean in 4.0.3 missing?
          pgriboval

          I have exactly the same problem, any issue ?

          • 2. Re: DerbyDatabase mbean in 4.0.3 missing?
            engelsen

            I get the same error.

            ITS SO FINE TO SEE EVERYONE POSTING THE FIX WHEN THEY FINALLY FIND WHY THEIR ERROR OCCURED........


            NOT ! please remember to post how you fixed it !

            • 3. Re: DerbyDatabase mbean in 4.0.3 missing?
              rsoika

              hi,

              I found this thread by ibm
              http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?message=13709280&cat=19&thread=69159&treeDisplayType=threadmode1&forum=370#13709280

              he suggest to uncomment the two lines

              <depends>jboss:service=Derby</depends>
              
              <mbean code="org.jboss.jdbc.DerbyDatabase" name="jboss:service=Derby"/>


              in the derby-ds.xml

              but I do not understand how to replace the default hsqldb ?

              ralph

              • 4. Re: DerbyDatabase mbean in 4.0.3 missing?
                jpersson


                I downloaded the JBoss 'trunk' and built it. After that there is a derby-plugin.jar file containing that missing mbean DerbyDatabase. Placed that jar in lib and my derby-ds.xml is happy.

                But in my case still no luck with trying to put JBossMQ on top of Derby instead of Hypersonic...

                • 5. Re: DerbyDatabase mbean in 4.0.3 missing?
                  richardtoren

                  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