activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Jencks and Message Listener Ports
Date Thu, 30 Mar 2006 07:52:30 GMT
I don't know what URI you are connecting to due to the expression:
$jms{jms.serverUrl}

I guess you're running the broker remotely right?

Generally the JMS client and resource adapter connect to the host/port
where the broker is running using a regular TCP socket. I've no idea
what PVM is or how it works - my only guess is if it does something
bad grabbing existing ports in use - try start PVM first and then
start Jencks; that way your operating system should just allocate
unused ports as is the normal case when you try open a socket.

James

On 3/29/06, Archer314 <archer314@hotmail.com> wrote:
>
> I posted this on the old LogicBlaze forums, then discovered these forums.
> Maybe I will get an answer here..
>
> <<<Copied from the other forum >>>>
>
> The project that I am working on came across a very strange problem.
> Part of our program uses PVM (Parallel Virtual Machine) and some JNI
> bindings to it to receive messages(legacy requirement, not JMS messages). It
> is also is using Jencks to listen for JMS messages.
>
> When the PVM component is not running, the message listener works just fine.
> But when PVM is started up, the message listener stops receiving. Our
> current thought is that PVM is some how usurping the network port the the
> message listener is using, but we are not sure.
>
> So the question is.
> When Jencks connects a MDPojo to a topic or queue, what ports are assigned
> to it?
>
> We are using jencks-all-1.1.2
>
> Our spring file looks something like this...
> Code:
>
>  <!-- JCA Container -->
>      <bean id="jencks" class="org.jencks.JCAContainer">
>          <!-- lets use the default configuration of work manager and
> transaction manager-->
>          <property name="bootstrapContext">
>              <bean class="org.jencks.factory.BootstrapContextFactoryBean">
>                  <property name="threadPoolSize" value="25"/>
>              </bean>
>          </property>
>          <!-- the JCA Resource Adapter -->
>          <property name="resourceAdapter" ref="jmsResourceAdapter">
>          </property>
>      </bean>
>
>      <!-- Transaction beans -->
>      <bean id="transactionContextManager"
> class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
>      <bean id="userTransaction"
> class="org.jencks.factory.GeronimoTransactionManagerFactoryBean"/>
>      <bean id="jtaTransactionManager"
> class="org.springframework.transaction.jta.JtaTransactionManager">
>          <property name="userTransaction" ref="userTransaction"/>
>      </bean>
>
>      <!-- JMS Resource Adapter -->
>      <!-- Set the serverURL to the address and port of the ActiveMQ broker
> -->
>      <bean id="jmsResourceAdapter"
> class="org.activemq.ra.ActiveMQResourceAdapter">
>          <property name="serverUrl" value="$jms{jms.serverUrl}"/>
>      </bean>
>
>      <!-- JSM Connection Manager -->
>      <bean id="connectionManager"
> class="org.jencks.factory.ConnectionManagerFactoryBean">
>          <property name="transactionSupport">
>              <ref local="transactionSupport"/>
>          </property>
>          <property name="poolingSupport">
>              <ref local="poolingSupport"/>
>          </property>
>      </bean>
>
>      <!-- Transaction support class for the Connection Manager -->
>      <bean id="transactionSupport"
> class="org.jencks.factory.XATransactionFactoryBean">
>          <property name="useTransactionCaching">
>              <value>true</value>
>          </property>
>          <property name="useThreadCaching">
>              <value>false</value>
>          </property>
>      </bean>
>
>      <!-- Pooling for the Connection Manager -->
>      <bean id="poolingSupport"
> class="org.jencks.factory.SinglePoolFactoryBean">
>          <property name="maxSize">
>              <value>2</value>
>          </property>
>          <property name="minSize">
>              <value>1</value>
>          </property>
>          <property name="blockingTimeoutMilliseconds">
>              <value>60</value>
>          </property>
>          <property name="idleTimeoutMinutes">
>              <value>60</value>
>          </property>
>          <property name="matchOne">
>              <value>true</value>
>          </property>
>          <property name="matchAll">
>              <value>true</value>
>          </property>
>          <property name="selectOneAssumeMatch">
>              <value>true</value>
>          </property>
>      </bean>
>
>      <!-- Managed Connection Factory -->
>      <bean id="jmsManagedConnectionFactory"
> class="org.activemq.ra.ActiveMQManagedConnectionFactory">
>          <property name="resourceAdapter">
>              <ref local="jmsResourceAdapter"/>
>          </property>
>      </bean>
>
>      <!-- Connection Factory -->
>      <bean id="jmsConnectionFactory"
> class="org.springframework.jca.support.LocalConnectionFactoryBean">
>          <property name="managedConnectionFactory">
>              <ref local="jmsManagedConnectionFactory"/>
>          </property>
>          <property name="connectionManager">
>              <ref local="connectionManager"/>
>          </property>
>      </bean>
>
>      <!-- Spring JMS Template for sending messages -->
>      <bean id="jmsTemplate"
> class="org.springframework.jms.core.JmsTemplate">
>          <property name="connectionFactory" ref="jmsConnectionFactory" />
>          <property name="defaultDestination" ref="dead.letter.queue" />
>      </bean>
>
>      <!-- Default queue for the JMS template -->
>      <bean id="dead.letter.queue"
> class="org.activemq.message.ActiveMQQueue">
>          <constructor-arg index="0" type="java.lang.String"
> value="Notifier.Outbound.DeadLetterQ"/>
>      </bean>
>
>  <bean id="myConnector"
>                 class="org.jencks.JCAConnector">
>                 <property name="jcaContainer" ref="jencks" />
>                 <!-- subscription details -->
>                 <property name="activationSpec">
>                         <bean class="org.activemq.ra.ActiveMQActivationSpec">
>                                 <property name="destination"
>                                         value="myTopic" />
>                                 <property name="destinationType"
>                                         value="javax.jms.Topic" />
>                         </bean>
>                 </property>
>                 <!-- use XA transactions -->
>                 <property name="transactionManager" ref="userTransaction" />
>                 <property name="ref" value="myListener" />
>         </bean>
>
>         <bean id="myListener" class="myListenerClass">
>
>         </bean>
>
> --
> View this message in context: http://www.nabble.com/Jencks-and-Message-Listener-Ports-t1364547.html#a3658137
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message