On Sun, 2011-01-23 at 08:48 -0800, archana saini wrote:
> Here is the content of activemq.xml
> 
> <!-- START SNIPPET: example -->
> <beans
>   xmlns="http://www.springframework.org/schema/beans";
>   xmlns:amq="http://activemq.apache.org/schema/core";
>   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.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd";>  
>   
>     <!-- Allows us to use system properties as variables in this
> configuration file -->
>     <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>         <property name="locations">
>             <value>file:${activemq.base}/conf/credentials.properties</value>
>         </property>      
>     </bean>
> 
>     <broker xmlns="http://activemq.apache.org/schema/core";
> brokerName="localhost" dataDirectory="${activemq.base}/data"
> destroyApplicationContextOnStop="true">
> 
>         <!-- Destination specific policies using destination names or
> wildcards -->
>         <destinationPolicy>
>             <policyMap>
>                 <policyEntries>
>                     <policyEntry queue=">" producerFlowControl="false"
> memoryLimit="20mb"/>
>                     <policyEntry topic=">" producerFlowControl="false"
> memoryLimit="20mb">
>                         <dispatchPolicy>
>                             <strictOrderDispatchPolicy/>
>                         </dispatchPolicy>
>                         <subscriptionRecoveryPolicy>
>                             <lastImageSubscriptionRecoveryPolicy/>
>                         </subscriptionRecoveryPolicy>
>                     </policyEntry>
>                 </policyEntries>
>             </policyMap>
>         </destinationPolicy>
> 
>         <!-- Use the following to configure how ActiveMQ is exposed in JMX
> -->
>         <managementContext>
>             <managementContext createConnector="false"/>
>         </managementContext>
> 
>         <!-- The store and forward broker networks ActiveMQ will listen to
> -->
>         <networkConnectors>
>             <!-- by default just auto discover the other brokers -->
>             <!--<networkConnector name="default-nc"
> uri="multicast://default"/>-->
>             <!-- Example of a static configuration:
>             <networkConnector name="host1 and host2"
> uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
>             -->
>         </networkConnectors>
> 
>         <persistenceAdapter>
>             <journaledJDBC journalLogFiles="5"
> dataDirectory="${activemq.base}/activemq-data" dataSource="#mysql-ds"/>
>         </persistenceAdapter>
> 
>         <!-- The transport connectors ActiveMQ will listen to -->
>         <transportConnectors>
>             <transportConnector name="openwire"
> uri="tcp://localhost:61616?trace=true" discoveryUri="multicast://default"/>
>             <transportConnector name="http"
> uri="http://localhost:8090?trace=true"/>
>             <!--<transportConnector name="ssl"
> uri="ssl://localhost:61617"/>-->
>             <!--<transportConnector name="stomp"
> uri="stomp://localhost:61613"/>-->
>             <!--<transportConnector name="xmpp"
> uri="xmpp://localhost:61222"/>-->
>         </transportConnectors>
> 
>     </broker>
> 
>       <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>               <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
>               <property name="url"
> value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
>               <property name="username" value="predserv"/>
>               <property name="password" value="predserv"/>
>               <property name="poolPreparedStatements" value="true"/>
>       </bean>
> 
>     <!-- An embedded servlet engine for serving up the Admin console -->
>     <jetty xmlns="http://mortbay.com/schemas/jetty/1.0";>
>         <connectors>
>             <nioConnector port="8161"/>
>         </connectors>
> 
>         <handlers>
>             <webAppContext contextPath="/admin"
> resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
>             <webAppContext contextPath="/demo"
> resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
>             <webAppContext contextPath="/fileserver"
> resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
>         </handlers>
>     </jetty>
> 
> 
> 
> </beans>
> <!-- END SNIPPET: example -->
> 
> 
> Thanks
> Archana

Your transports are all bound to localhost so you can only connect to
them on the loopback device, bind them to 0.0.0.0 (the any device) in
order allow outside clients to connect as well as client using loopback.

        uri="tcp://0.0.0.0:61616"

Regards

-- 
Tim Bish
------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: tabish121
Blog: http://timbish.blogspot.com/


Reply via email to