connect to remote broker

I am using this to create a connectionfactory.com.sun.messaging.QueueConnectionFactory myQConnFactory = new com.sun.messaging.QueueConnectionFactory();this will connect to the broker in my localhost. Is there a way I can connect to remote broker?Thanks,
[281 byte] By [forestever] at [2007-11-14]
# 1

you can set the connection factory properties using com.sun.messaging.ConnectionConfiguration, for example the host and the port can be set in the following manner

myQConnFactory .setProperty(com.sun.messaging.ConnectionConfiguration.imqBrokerHostName,

getHostName());

myQConnFactory .setProperty(com.sun.messaging.ConnectionConfiguration.imqBrokerHostPort,

getPort());

Thanks

-Sujit

_sujit_biswas at 2007-7-6 > top of java,Application & Integration Servers,Sun Java System Message Queue...
# 2

the setProperty message is not available for myQConnFactory?

I have imq.jar and jms.jar in my classpath.

> you can set the connection factory properties using

> com.sun.messaging.ConnectionConfiguration, for

> example the host and the port can be set in the

> following manner

>

> myQConnFactory

> .setProperty(com.sun.messaging.ConnectionConfiguration

> .imqBrokerHostName,

>getHostName());

> tory

> .setProperty(com.sun.messaging.ConnectionConfiguration

> .imqBrokerHostPort,

>getPort());

> it

forestever at 2007-7-6 > top of java,Application & Integration Servers,Sun Java System Message Queue...
# 3
ok, I know what is wrong.In the helloworld example, myQConnFactory is of typejavax.jms.QueueConnectionFactory;javax.jms.QueueConnectionFactory myQConnFactory = new com.sun.messaging.QueueConnectionFactory();Thanks,
forestever at 2007-7-6 > top of java,Application & Integration Servers,Sun Java System Message Queue...