activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NASGroup <ke...@nasgroup.com>
Subject Configured message store to Oracle, but always uses derby
Date Mon, 30 Jun 2008 16:49:24 GMT

Hello all,

We have an app using ActiveMQ embedded in JBoss server. It  has been running
fine for 1+ years. I was tasked with getting it to use Oracle instead of
Derby. Seemed simple enough, just some minor configuration changes detailed
in the documentation.

I made the changes and thought I had success. It intially created the DB
tables and the app worked fine....  but when I dropped the tables, I noted
that the messaging was still working.

I reviewed the JBOSS startup I see that it always find ts the DERBY adaptor.

12:01:29,816 INFO  [JDBCPersistenceAdapter] Database driver recognized:
[apache_derby_embedded_jdbc_driver]

 I've tried changing from the journal, to jdbcpersistence I tried naming the
adapter so it would not have to determine it itself....

Anyone seen any issues like this? It's gotta be something simple....

tia,

Kevin

Which version of the software  activemq 4.0.2
What platform and JDK/JRE?  jre1.5
Any particular container being used - if so what version? JBoss 4.0.4

Your code & configuration files are often useful 

broker-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- START SNIPPET: xbean -->
<beans xmlns="http://activemq.org/config/1.0">

  <broker brokerName="theBroker" useJmx="true" persistent="true">

	<!-- In ActiveMQ 4, you can setup destination policies. note: this xml
format may still change a bit -->
    <destinationPolicy>
      <policyMap><policyEntries>

          <policyEntry queue="queue.Audit">
            <deadLetterStrategy>
		      <sharedDeadLetterStrategy>
			    <deadLetterQueue>
			      <queue name="queue/eigDLQ" physicalName="queue.eigDLQ"/>
		        </deadLetterQueue>
		      </sharedDeadLetterStrategy>
	        </deadLetterStrategy>
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

          <policyEntry queue="queue.loadContentQueue">
            <deadLetterStrategy>
		      <sharedDeadLetterStrategy>
			    <deadLetterQueue>
			      <queue name="queue/eigDLQ" physicalName="queue.eigDLQ"/>
		        </deadLetterQueue>
		      </sharedDeadLetterStrategy>
	        </deadLetterStrategy>
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>


    persistenceAdapter>
	    <journaledJDBC journalLogFiles="5" dataDirectory="../data"
dataSource="#oracle-ds"/>
    </persistenceAdapter>
 
        <!--<<persistenceAdapter>
            <jdbcPersistenceAdapter dataSource="#oracle-ds"/>
        </persistenceAdapter>
        -->

    <transportConnectors>
      <!-- prefixing a connector with discovery: causes the connector to be
advertised over rendezvous -->
      <transportConnector uri="tcp://127.0.0.1:61616"
discoveryUri="multicast://default"/>
    </transportConnectors>
  
  </broker>

  <!-- Oracle DataSource  Setup
  <bean id="oracle-ds"
class="org.springframework.jndi.JndiObjectFactoryBean">
   <property name="jndiName" value="java:/QspDS"/>
  </bean>-->
 
  <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
    <property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:mckdb"/>
    <property name="username" value="user123"/>
    <property name="password" value="password123"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>
  
</beans>


JBOSS statup 


12:00:59,657 INFO  [RARDeployment] Required license terms exist, view
META-INF/ra.xml in .../deploy/activemq-r
a.rar
12:00:59,985 INFO  [XBeanXmlBeanDefinitionReader] Loading XML bean
definitions from class path resource [com/m
ckesson/eig/broker-config.xml]
12:01:00,687 INFO  [ClassPathXmlApplicationContext] Bean factory for
application context [org.apache.xbean.spr
ing.context.ClassPathXmlApplicationContext;hashCode=12004577]:
org.springframework.beans.factory.support.Defau
ltListableBeanFactory defining beans
[org.apache.activemq.xbean.XBeanBrokerService]; root of BeanFactory hiera
rchy
12:01:00,734 INFO  [ClassPathXmlApplicationContext] 1 beans defined in
application context [org.apache.xbean.s
pring.context.ClassPathXmlApplicationContext;hashCode=12004577]
12:01:00,749 INFO  [CollectionFactory] JDK 1.4+ collections available
12:01:00,765 INFO  [ClassPathXmlApplicationContext] Unable to locate
MessageSource with name 'messageSource':
using default
[org.springframework.context.support.DelegatingMessageSource@2bbb7b]
12:01:00,765 INFO  [ClassPathXmlApplicationContext] Unable to locate
ApplicationEventMulticaster with name 'ap
plicationEventMulticaster': using default
[org.springframework.context.event.SimpleApplicationEventMulticaster
@103368e]
12:01:00,765 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons
in factory [org.springframework.b
eans.factory.support.DefaultListableBeanFactory defining beans
[org.apache.activemq.xbean.XBeanBrokerService];
 root of BeanFactory hierarchy]
12:01:02,076 INFO  [BrokerService] ActiveMQ 4.0.2 JMS Message Broker
(localhost) is starting
12:01:02,076 INFO  [BrokerService] For help or more information please see:
http://incubator.apache.org/active
mq/
12:01:02,592 INFO  [ManagementContext] JMX consoles can connect to
service:jmx:rmi:///jndi/rmi://localhost:109
9/jmxrmi
12:01:29,816 INFO  [JDBCPersistenceAdapter] Database driver recognized:
[apache_derby_embedded_jdbc_driver]
12:01:35,155 INFO  [JournalPersistenceAdapter] Journal Recovery Started
from: Active Journal: using 5 x 20.0 M
egs at: C:\HECMJBoss\bin\activemq-data\journal
12:01:35,296 INFO  [JournalPersistenceAdapter] Journal Recovered: 0
message(s) in transactions recovered.
12:01:35,764 INFO  [TransportServerThreadSupport] Listening for connections
at: tcp://A1CWVRC1:61616
12:01:35,764 WARN  [MulticastDiscoveryAgent] brokerName not set
12:01:35,951 INFO  [TransportConnector] Connector tcp://localhost:61616
Started


-- 
View this message in context: http://www.nabble.com/Configured-message-store-to-Oracle%2C-but-always-uses-derby-tp18199688p18199688.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message