activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dege Ratak" <deg...@pointclickcare.com>
Subject RE: ActiveMQ + SQL Server
Date Wed, 18 Jan 2006 19:44:27 GMT
Here's how I got it to work, note that I had to explicitly set the
adapterClass because the driver I used wasn't recognized as a MSSQL
driver by ActiveMQ

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC  "-//ACTIVEMQ//DTD//EN"
"http://activemq.org/dtd/activemq.dtd">
<beans>

  <!--
==================================================================== -->
  <!-- ActiveMQ Broker Configuration -->
  <!--
==================================================================== -->
  <broker name="gateway">
    <connector>
      <tcpServerTransport uri="tcp://localhost:62001" backlog="1000"
useAsyncSend="true" maxOutstandingMessages="50"/>
    </connector>
	
	<!--  need to put network connector here for each client!-->
	<networkConnector >
      <networkChannel uri="reliable:tcp://pccapp:61616"
reconnectSleepTime="10000" remoteBrokerName="pccapp"/>
    </networkConnector>
 
 
    <persistence>
      <cachePersistence>
        <journalPersistence directory="qmessages/journal">
        <jdbcPersistence dataSourceRef="mssql-ds"
adapterClass="org.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor"/>
        </journalPersistence>
      </cachePersistence>
    </persistence>
    
    <redeliveryPolicy maximumRetryCount="200"
initialRedeliveryTimeout="1" backOffMode="false"/>
  </broker>

  <!--
==================================================================== -->
  <!-- JDBC DataSource Configurations -->
  <!--
==================================================================== -->

  <bean id="mssql-ds" class="com.inet.pool.PDataSource" >
  	<property name="properties">
  		<props>
	  	<prop
key="url">jdbc:inetpool:inetdae:pccgateway:1433?database=PCCGateway</pro
p>
	  		<prop key="user">xxx</prop>
	  		<prop key="password">xxx</prop>
  		</props>
  	</property> 
  </bean>
</beans>

-----Original Message-----
From: Gogineni, Venu (Home Office) [mailto:gogineniv@lls.org] 
Sent: Wednesday, January 18, 2006 2:39 PM
To: activemq-users@geronimo.apache.org
Subject: ActiveMQ + SQL Server

Hi All,
 
I am having problems configuring the jdbcPersistence to use sql server
database. 
I am getting the following error when i tried to start the broker. 
 
ActiveMQ Message Broker (http://activemq.org/ <http://activemq.org/> )
 
Loading Message Broker from file: activemq.xml
14:22:48 INFO  JDK 1.4+ collections available
Caught: org.springframework.beans.factory.BeanCreationException: Error
creating
bean with name 'jdbcPersistence' defined in file
[C:\activemq\bin\activemq.xml]:
Can't resolve reference to bean 'mssqlserver-ds' while setting property
'dataSource';
nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: 
No bean named 'mssqlserver-ds' is defined:
org.activemq.spring.ActiveMQBeanFactory 
defining beans [memoryManager,broker]; root of BeanFactory hierarchy
org.springframework.beans.factory.BeanCreationException: Error creating
bean
with name
'jdbcPersistence' defined.
 
Here is the snippet of configuration i am using. Any idea what i am
doing
wrong...
 
<persistence>        
        <jdbcPersistence dataSourceRef="mssqlserver-ds" />
</persistence>
 
 <bean id="mssqlserver-ds"
          class="org.apache.commons.dbcp.BasicDataSource" 
          destroy-method="close">
      <property name="driverClassName">
          <value>net.sourceforge.jtds.jdbc.Driver</value>
      </property>
      <property name="url">
          <value>url name....</value>
      </property>
      <property name="username">
          <value>user name....</value>
      </property>
      <property name="password">
          <value>password.....</value>
      </property>        
  </bean>
 
Thanks,
Venu.
NOTICE: This message, including all attachments transmitted with it, is
for
the use of the addressee only. It may contain proprietary, confidential
and/or legally privileged information. No confidentiality or privilege
is
waived or lost by any mistransmission. If you are not the intended
recipient, you must not, directly or indirectly, use, disclose,
distribute,
print or copy any part of this message. If you believe you have received
this message in error, please delete it and all copies of it from your
system and notify the sender immediately by reply e-mail. Thank you.
REF#38293.51942 


______________________________________________________________________
This e-mail has been scanned by The Leukemia & Lymphoma Society Managed
Email Content Service, provided by MCI and Message Labs.s.
------_=_NextPart_001_01C61C66.CF060426--

Mime
View raw message