You could do the following to create a destination object during runtime.

Destination  = new AMQDestination("<binding-url>")

However this means you will be using a Qpid specific construct to
create a JMS destination.
The advantage here is that you could create your binding URL at
runtime according your requirements and get away with only using one
non standard class. This IMO is a better approach than trying to use
unsupported java API classes which may change between releases.

Regards,

Rajith

On Wed, Jul 29, 2009 at 9:12 AM, Gordon Sim<g...@redhat.com> wrote:
> ricardlf wrote:
>>
>> Gordon Sim wrote:
>>>>
>>>> Please, could you post an example code
>>>> showing how to do that?
>>>
>>> You can cause exchanges to be declared simply by altering your binding
>>> url and creating a consumer or publisher. E.g. look at the direct example
>>> for jms[1] and modify the direct.properties to change from using amq.direct
>>> to some other exchange[2]. Now if you run the direct producer or consumer
>>> the exchange will be created.
>>>
>>> --Gordon
>>>
>>
>> These examples are not appropiate for what I'm trying to achive, because I
>> don't know what programs will connect to the broker in the future, so it
>> will be necessary to modify the properties file dinamically.
>
> You can directly create Destination objects which might suite your use case
> better. However for that I would need to refer you to someone with greater
> expertise. Rajith, could you describe how this coule be achieved?
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscr...@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscr...@qpid.apache.org

Reply via email to