tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Bolognini <davide.bologn...@bravofly.com>
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:  http://activemq.apache.org/tomee.html
<http://activemq.apache.org/tomee.html>  ,  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>

	<Resource id="IndexerQueueJmsResourceAdapter"
type="ActiveMQResourceAdapter">
		BrokerXmlConfig
broker:(tcp://localhost:61616)?useJmx=true&amp;persistent=true
		ServerUrl tcp://localhost:61616
		DataSource IndexerQueueDataSource
	</Resource>

	<Resource id="IndexerQueueJmsConnectionFactory"
type="javax.jms.ConnectionFactory">
		ResourceAdapter IndexerQueueJmsResourceAdapter
	</Resource>

	<Container id="IndexerQueueJmsMdbContainer" ctype="MESSAGE">
		ResourceAdapter IndexerQueueJmsResourceAdapter
	</Container>
[...]

Now the consumer has some problems due due to the DB locking mechanism. In
fact, as explained in  http://www.h2database.com/html/tutorial.html
<http://www.h2database.com/html/tutorial.html>   I should configure the
TransactDatabaseLocker instead of the present mechanism.

Someone of you knows which is the best solution to configure the
TransactDatabaseLocker? 
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
one... 

Thanks a lot in advance

Cheers

Davide




--
View this message in context: http://openejb.979440.n4.nabble.com/Tomee-ActiveMQ-its-persistence-with-H2-and-TransactDatabaseLocker-tp4660641.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message