Thanks for this information; it clarifies things. On to the next question now. I was able to get ActiveMQ to use a MySQL repository, and noticed that there were three tables created:
ACTIVEMQ_ACKS ACTIVEMQ_LOCK activemq_msgs I ran a producer and dumped 10 messages onto a queue (without consuming them), but saw nothing in the activemq_msgs table. I assume this is probably because the server caches a certain amount before needing to use the database. What I was a bit surprised by was the fact that there was one row in the ACTIVEMQ_LOCK table (which has 3 columns, ID, TIME and BROKER_NAME), which had 1 for the ID column, and NULLs for TIME and BROKER_NAME columns. Is that what we ought to expect? If it is, then I'd hazard a guess that each broker will have to have its own database instance. Is that correct? Thanks much, Prashanth James.Strachan wrote: > > You must use a shared database for JDBC based master/slave so use > MySQL or Postgresql - not Derby (which is typically used as an in-JVM > database). > > > On 12/11/06, Anthrope <[EMAIL PROTECTED]> wrote: >> >> Hello Marlon, >> Thanks for the response. I tried your suggestion by changing the >> jdbcPersistence tag to: >> >> <jdbcPersistenceAdapter dataDirectory="activemq-data" >> dataSource="#derby-ds"/> >> >> and declaring a derby-ds bean (basically uncommenting the derby-ds >> specification in the example). I still see the same problem, with the >> slave >> failing because it is also attempting to create the database. I can get >> the >> slave to start if I specify a different location for its own database, >> but >> that doesn't quite make it any different from the Pure Master Slave. >> >> I will attempt this with MySQL and see whether this works as >> advertised. From your message, it appears that you have been able to gte >> this JDBC Master Slave configuration working with Postgres. Is that >> correct? >> >> Thanks much, >> Prashanth >> >> >> Marlon Santos wrote: >> > >> > Hi, >> > >> > The problem was you were not using a jdbc database in your xml config. >> > Try changing >> > >> > <jdbcPersistenceAdapter >> > dataDirectory="${activemq.base}/activemq-data"/> >> > >> > with >> > >> > <jdbcPersistenceAdapter dataDirectory="activemq-data" >> > dataSource="#postgres-ds"/> >> > >> > If your using other data source rather than postgres-sql, just change >> the >> > dataSource with the database you are using, such as mysql. then >> uncomment >> > this part. >> > ( this example is for postgres-sql.) >> > >> > <!-- >> > >> > <bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource"> >> > <property name="serverName" value="localhost"/> >> > <property name="databaseName" value="activemq"/> >> > <property name="portNumber" value="0"/> >> > <property name="user" value="activemq"/> >> > <property name="password" value="activemq"/> >> > <property name="dataSourceName" value="postgres"/> >> > <property name="initialConnections" value="1"/> >> > <property name="maxConnections" value="10"/> >> > </bean> >> > >> > --> >> > >> > then create the necessary tables and database needed. >> > >> > Regards... >> > >> > >> > Anthrope wrote: >> >> >> >> Hello, >> >> I'm using version 4.1 and am trying to get a fairly >> straightforward >> >> jdbc master-slave setup going. I'm using a minimal configuration, with >> >> the default JDBC persistence adaptor, as specified in this example: >> >> http://www.activemq.org/site/jdbc-master-slave.html . I start the >> master >> >> instance first, and attempt to start the slave with the *same* >> >> configuration file. The slave fails to start, because it attempts to >> >> create the derby database as well. >> >> >> >> Now, the documentation states this: in regard to JDBC master >> slave >> >> configuration: "By default if you use the <jdbcPersistenceAdapter/> to >> >> avoid the high performance journal you will be using JDBC Master Slave >> by >> >> default. You just need to run more than one broker and point the >> client >> >> side URIs to them to get master/slave." >> >> >> >> The behaviour I see is not quite consistent with this. I am not >> able >> >> to start more than one broker, which is the master. Am I missing >> >> something here? And, has anyone got this to work? I am attaching the >> >> broker configuration file, which is a verbatim cut and paste of the >> xml >> >> configuration file in the JDBC master slave example. >> >> >> >> http://www.nabble.com/file/4543/m.xml m.xml >> >> >> >> Regards, >> >> Prashanth >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/JDBC-Master-Slave-tf2792225.html#a7790449 >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > -- View this message in context: http://www.nabble.com/JDBC-Master-Slave-tf2792225.html#a7833488 Sent from the ActiveMQ - User mailing list archive at Nabble.com.