tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Bolognini <>
Subject Tomee, ActiveMQ, its persistence with H2 and TransactDatabaseLocker
Date Fri, 08 Feb 2013 10:30:42 GMT
Hi all,

I'am developing a queue with activeMQ and I am trying to develop its
persistence with the H2 DB in Tomee+. At present I have obtain some
important results and, in practice, the application works pretty well. The
producer is defined following this:
<>  ,  while, in order to implement the
persistence, I have defined these resources/containers in tomee.xml:
<Resource id="IndexerQueueDataSource" type="DataSource">
		JdbcDriver org.h2.Driver
		JdbcUrl jdbc:h2:tcp://localhost:9999/indexerQueuePersistence;IFEXISTS=TRUE
		UserName indexerQueuePersistence
		Password indexerQueuePersistence
		JtaManaged true

	<Resource id="IndexerQueueJmsResourceAdapter"
		ServerUrl tcp://localhost:61616
		DataSource IndexerQueueDataSource

	<Resource id="IndexerQueueJmsConnectionFactory"
		ResourceAdapter IndexerQueueJmsResourceAdapter

	<Container id="IndexerQueueJmsMdbContainer" ctype="MESSAGE">
		ResourceAdapter IndexerQueueJmsResourceAdapter

Now the consumer has some problems due due to the DB locking mechanism. In
fact, as explained in
<>   I should configure the
TransactDatabaseLocker instead of the present mechanism.

Someone of you knows which is the best solution to configure the
If not possible, can you suggest me another possible solution to remotely
persist the queue? H2 is the most comfortable one, but it is not the only

Thanks a lot in advance



View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message