activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hardikphd <hardik_...@yahoo.com>
Subject Re: Connection Factory Problem
Date Tue, 12 Jun 2007 10:27:01 GMT

Sorry James for confusing you,

Here is the problem in a descriptive manner,

say, I have 10 machine and Each machine has their own broker running on
61616 port.
Now Any machine can send message to any machine, On receiving message,
Receiver has to send back message to sender.

My understanding of JMS is we need connection factory to create connection
connectionFactory = (ConnectionFactory)
envContext.lookup(CONNECTION_FACTORY_JNDI_NAME);
connection = connectionFactory.createConnection(user,password);
and so on 

and we configure this connection factory in context.xml file like
    <Resource
        name="jms/LocalConnectionFactory"
        auth="Container"
        type="org.apache.activemq.ActiveMQConnectionFactory"
        description="JMS Connection Factory"
        factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        brokerURL="tcp://machine1:61000"
        brokerName="LocalActiveMQBroker"
        useEmbeddedBroker="yes"/>


Now, To reply to sender, Currently I have configured ConnectionFactories for
each broker like i have mentioned above, and I think this is not flexible
solution.

So, I need generalize solution for this problem

I hope, this tim, you would have understood something out of this







James.Strachan wrote:
> 
> On 6/12/07, hardikphd <hardik_phd@yahoo.com> wrote:
>>
>> Hi James,
>>
>> Actually, I want only one receiver and more than one producer and
>> receiver
>> will send response back to only one sender and all senders and receiver
>> are
>> on different machine.
> 
> Could you try rewrite that sentence again; it completely threw me.
> Maybe name the processes & what a producer / receiver is or something
> 
> 
>> And as I have many senders, I don't want to configure connectionfactory
>> for
>> each of sender at receiver side and still want to get connection to
>> broker
>> running on sender's machine and send message it to.
> 
> Again you've lost me again :).
> 
> Note that a ConnectionFactory is just configured to talk to the JMS
> broker; it has no configuration particular to any receiver or
> producer. One of the benefits of JMS is minimal configuration &
> location transparency & loose coupling; so a JMS client only needs to
> be aware of some logical JMS destintations as opposed to knowing about
> other producers/consumers in the network.
> 
> 
>> Will setJMSReplyTo work across different tomcats?
> 
> It will work across all ActiveMQ clients; whatever JVM they are living
> in; plus if they are written in other languages.
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Connection-Factory-Problem-tf3905663s2354.html#a11076349
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message