Hey folks,
i hope somebody can help me out with this issue:
I integrated "AMQ 5 Snapshot" into Jboss 5 Beta 2 (the latest) according to
the following howto:
################# HOWTO START ##########################
Create a an activemq-directory:
mkdir $JBOSS_HOME/server/default/deploy/activemq-ra.rar
Copy the AMQ-rar file to that directory:
cp $AMQ_HOME/lib/optional/activemq-rar-*.rar
$JBOSS_HOME/server/default/deploy/activemq-ra.rar/
Unpack it:
cd $JBOSS_HOME/server/default/deploy/activemq-ra.rar/
jar xvf activemq-rar-*.rar
Edit the following file:
vim $JBOSS_HOME/server/default/deploy/activemq-ra.rar/META-INF/ra.xml
You have to change two configuration items:
* Adjust "ServerUrl" by setting it to "vm://localhost":
<config-property-name>ServerUrl</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>vm://localhost</config-property-value>
* Adjust "BrokerXMLConfig" by setting it to "xbean:broker-config.xml":
<config-property-name>BrokerXmlConfig</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>xbean:broker-config.xml</config-property-value>
Copy your previous AMQ sample setup to the now embedded activemq-directory:
cp $AMQ_HOME/conf/activemq.xml
$JBOSS_HOME/server/default/deploy/activemq-ra.rar/broker-config.xml
################# HOWTO END ##########################
My broker-config.xml is __really__ simple:
-----------------------------------------------------------------------------------------
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.org/config/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.org/config/1.0
http://activemq.apache.org/schema/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
<!-- Allows us to use system properties as variables in this configuration
file -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.org/config/1.0" brokerName="localhost"
useJmx="false">
<!-- Destination specific policies using destination names or wildcards
-->
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic="FOO.>">
<dispatchPolicy>
<strictOrderDispatchPolicy/>
</dispatchPolicy>
<subscriptionRecoveryPolicy>
<lastImageSubscriptionRecoveryPolicy/>
</subscriptionRecoveryPolicy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61616" />
</transportConnectors>
<persistenceAdapter>
<journaledJDBC journalLogFiles="5"
dataDirectory="/opt/apache-activemq-5.0-SNAPSHOT/data/"/>
</persistenceAdapter>
<managementContext>
<managementContext connectorPort="1099" />
</managementContext>
</broker>
</beans>
-----------------------------------------------------------------------------------------
Now this configuration works fine if i run AMQ standalone, but AMQ
integrated into Jboss does not work:
1.) With a
<persistenceAdapter>
<journaledJDBC journalLogFiles="5"
dataDirectory="/opt/apache-activemq-5.0-SNAPSHOT/data/"/>
</persistenceAdapter>
entry:
15:29:00,076 INFO [JournalPersistenceAdapterFactory] Journal is locked...
waiting 10 seconds for the journal to be unlocked.
15:29:10,076 INFO [JournalPersistenceAdapterFactory] Journal is locked...
waiting 10 seconds for the journal to be unlocked.
15:29:20,077 INFO [JournalPersistenceAdapterFactory] Journal is locked...
waiting 10 seconds for the journal to be unlocked.
15:29:30,078 INFO [JournalPersistenceAdapterFactory] Journal is locked...
waiting 10 seconds for the journal to be unlocked.
15:29:40,078 INFO [JournalPersistenceAdapterFactory] Journal is locked...
waiting 10 seconds for the journal to be unlocked.
15
How can this be locked?
- There is only __one__ amq-instance
- The user who owns and starts Jboss also owns the complete datadirectory
2.) Without the
<persistenceAdapter>
<journaledJDBC journalLogFiles="5"
dataDirectory="/opt/apache-activemq-5.0-SNAPSHOT/data/"/>
</persistenceAdapter>
entry Jboss gives me:
ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of
incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** CONTEXTS IN ERROR: Name -> Error
jboss.jca:name='activemq-ra.rar',service=RARDeployment ->
org.apache.activemq.kaha.impl.StoreLockedExcpetion: Kaha Store state is
already opened by this application.
Googling for this error messages didn't illuminate this matter.......
Any ideas on this?
--
View this message in context:
http://www.nabble.com/StoreLockedExcpetion%3A-Kaha-Store-state-is-already-opened-by-this-application.-tf4765086s2354.html#a13628250
Sent from the ActiveMQ - User mailing list archive at Nabble.com.