activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MarasM <coma...@wp.pl>
Subject Problem with ActiveMQ 4.0.1 and Tomcat
Date Fri, 07 Jul 2006 22:16:20 GMT

Hello

I have a problem with my application. After I changed AMQ3 to AMQ4.0.1 when
i try to close tomcat i get exception:

2006-07-07 23:56:46,765 ERROR
[org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent:262]
- failed to process packet: java.net.SocketException: socket closed

and nothing more happens. I can't stop tomcat .. Could anyone help me with
it? 

thanks in advance
MarasM

ps. sorry for my poor english ;)

My acvtiveMQContext.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
	<bean id="activeMQBroker"
		class="org.apache.activemq.xbean.BrokerFactoryBean">
		<description>JMS Broker</description>
		<property name="config" value="classpath:activeMQ.cfg.xml" />
		<property name="start" value="true" />
	</bean>

	<bean id="jmsFactory"
		class="org.springframework.jms.connection.SingleConnectionFactory">
		<property name="targetConnectionFactory">
					<bean
						class="org.apache.activemq.ActiveMQConnectionFactory">
						<property name="useAsyncSend" value="true" />
						<property name="optimizedMessageDispatch"
							value="true" />
						<property name="copyMessageOnSend"
							value="false" />
						<property name="brokerURL">
							<value>vm://localhost</value>
						</property>
					</bean>
		</property>
	</bean>

	<bean id="jmsTemplate"
		class="org.springframework.jms.core.JmsTemplate">
		<description>Spring JMS Template</description>
		<property name="connectionFactory">
			<ref local="jmsFactory" />
		</property>
	</bean>


...


</beans>


activeMQ.cfg.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://activemq.org/config/1.0">
	<!-- 
		WARNING:
		Remeber to add
<code>-Dorg.apache.activeio.journal.active.DisableLocking=true</code> to JVM
startup options.
		See: http://issues.apache.org/activemq/browse/AMQ-704 for further details
on the bug it resolve.
	-->

	<broker useJmx="false">

		<persistenceAdapter>
			<journaledJDBC useJournal="true" journalLogFiles="5"
				dataDirectory="../dataDir"
				dataSource="#postgresql-ds" adapter="#postgresql-adapter" />
		</persistenceAdapter>

		<transportConnectors>
			<transportConnector name="default"
				uri="tcp://localhost:61616?connectionTimeout=0"
discoveryUri="multicast://default" />
		</transportConnectors>

		<networkConnectors>
			<networkConnector name="default" uri="multicast://default" />
		</networkConnectors>

	</broker>

	
	<bean id="postgresql-adapter"
		class="org.apache.activemq.store.jdbc.adapter.PostgresqlJDBCAdapter" />

	<bean id="postgresql-ds"
		class="org.postgresql.ds.PGPoolingDataSource"
		>
		<property name="serverName" value="localhost" />
		<property name="databaseName" value="db" />
		<property name="portNumber" value="5432" />
		<property name="user" value="db" />
		<property name="password" value="db" />
		<property name="dataSourceName" value="ActiveMQ40PostgreSQL" />
		<property name="initialConnections" value="1" />
		<property name="maxConnections" value="10" />
	</bean>

</beans>


-- 
View this message in context: http://www.nabble.com/Problem-with-ActiveMQ-4.0.1-and-Tomcat-tf1908903.html#a5225472
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message