[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] JdbcQueuePlugin won't load



Hallo Michael,
Jdbc Support for the queues is currently only tested with ORACLE and POSTGRES. MySQL has not been tested and I believe MySQL has no support for transactions either.


I am currently working on an alternate plugin which only uses three tables (JdbcQueueCommonTable plugin) which has already been tested with postgres. I will make a last test with ORACLE today. You can find documentation on how to use it on

http://www.xmlBlaster.org/xmlBlaster/doc/requirements/queue.jdbc.commontable.html


The reason why you did'nt get anything on your db and did not get any logs either is probably that you did'nt switch persitence on in your xmlBlaster.properties file.


Make sure that the following lines are uncommented:

persistence/defaultPlugin=CACHE,1.0
queue/defaultPlugin=CACHE,1.0
useTopicStore=true

Then, since nobody has tested it yet, you should provide the specific settings for MYSQL which will be something like this:

JdbcDriver.mapping[x1]=string=x2,longint=x3,int=x4,boolean=char(1),tables=x5, blob=x6,tablename=x7

Where all the xxx are specific to MySQL. Note that x1 is the name given back by the metadata of the DB (mysql or MYSQL or something like that). The other parameters are the name used by mysql to handle their java counterpart:

- string (choose a type which is sufficiently long for your needs)
- long
- int
- boolean (must be handled as a single character for oracle)
- tables it the name of the table containing all tables on the db
- blob
- tablename the name of the attribute (column) of the table containing all tables, specifying the name of the tables.


I hope it will work. Please let me know.

The JdbcQueueCommonTablePlugin has less transaction dependent code, so it will probably be more like to work with mySql.

Please let us know about the results

Michele







Michael Atighetchi wrote:
I have a xmlblaster scenario with 2 clients that communicate with
eatch other via talking to a xmlblaster slave instance (which in turn
talks to a master).

I'd like to change the master so that it stores messages in a mysql
database instead of keeping them in RAM. First, I changed the qos key
on publishing messages to "<qos> <persistent /> </qos>". I also added the
following line to the xmlblaster.properties file of the master:

ProtocolPlugin[JDBC][1.0]=org.xmlBlaster.protocol.jdbc.JdbcDriver
CbProtocolPlugin[JDBC][1.0]=org.xmlBlaster.protocol.jdbc.CallbackJdbcDriver
QueuePlugin[JDBC][1.0]=org.xmlBlaster.util.queue.jdbc.JdbcQueuePlugin
JdbcDriver.drivers=org.gjt.mm.mysql.Driver
queue.persistent.url=<...>
queue.persistent.user=<...>
queue.persistent.password=<...>
cb.queue.persistent.url=<...>
cb.queue.persistent.user=<...>
cb.queue.persistent.password=<...>

cb.queue.persistent.connectionPoolSize=3
cb.queue.persistent.connectionBusyTimeout=90000
cb.queue.persistent.maxWaitingThreads=300
cb.queue.defaultPlugin=RAM,1.0
cb.queue.persistent.tablePrefix=xmlBlaster
cb.queue.persistent.tableAllocationIncrement=2

NOTE: assume reasonable entries for <...>


Upon starting up the master node, I see that the JdbcDriver initializes correctly: [Feb 25, 2003 6:31:08 PM INFO  JdbcDriver-/node/psq1] Started successfully JDBC driver with loginName=__sys__jdbc

However, I don't see any printout for the JdbcQueuePlugin, but lots of
printout for RamQueuePlugin.

Upon starting up the clients, messages are still kept in RAM in the
master, and not put into the mysql database.

How can I change the configuration to use jdbc for storing messages ?

Michael







--
Michele Laghi
mailto:laghi at swissinfo.org
tel. +46 8 7492952 / mob. +46 70 4103964
http://www.geocities.com/laghi2000
http://www.xmlBlaster.org