on 10-17-2005 11:55 AM
Hello all,
I am trying to access a queue with QueueConnectionFactory. When I am doing the factory.createConnection(), I am getting the Exception Stack as :
javax.jms.JMSException: The following hosts (hostname:port) cannot be accessed: . Check host names and ports.
at com.sap.jms.client.connection.ConnectionFactory.getSocket(ConnectionFactory.java:447)
at com.sap.jms.client.connection.ConnectionFactory.createConnection(ConnectionFactory.java:300)
at com.sap.jms.client.connection.ConnectionFactory.createConnection(ConnectionFactory.java:244)
at com.sap.jms.client.connection.ConnectionFactory.createConnection(ConnectionFactory.java:212)
at com.fwk.jms.MessageBroker.init(MessageBroker.java:128)
at com.fwk.jms.MessageBroker.<init>(MessageBroker.java:82)
at com.fwk.jms.MessageBroker.<init>(MessageBroker.java:76)
at com.fwk.jms.test.FwkTest.main(FwkTest.java:25)
When I debug the application using SAP NetWeaver, I find that the size of LinkedList for Hosts and ports in QueueConnectionFactory is 0 (zero)(i.e. there are no elements in them).
Why is this happening ? How to set the host names and ports manually?
The settings of the environment go like this:
INITIAL_CONTEXT_FACTORY=com.sap.engine.services.jndi.InitialContextFactoryImpl
PROVIDER_URL=localhost:50004
CONNECTION_FACTORY=jmsfactory/default/QueueConnectionFactory
INPUT_QUEUE=jmsqueues/default/IN
Please note that the look up is happening perfectly. The casting from com.sap.jms.client.connection.QueueConnectionFactory to the javax.jms.ConnectionFactory is also happening fine.
Any ideas ?
Thanks,
Pawan
Hi pawan,
I am getting the same error - were you able to resolve this?
Thanks
Dushy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry mate, not sure what you meant. I am not sure how to addDispatcher to the QueueConnection, i cannot even get to the point of creating a queue connection at the moment.
would highly appreciate if you could give me an example of the code snippet. I get the JMS Exception when i try to do a QueuecConnectionFactory.getConnection()
Thanks
Dushy
In com.sap.jms.client.connection.QueueConnectionFactory you can find the method addDispatcher(String, int) to add the dispatcher, before creating the connection.
But where can I find more about this method and required parameter values? And where can I find the complete javadoc API from the Netweaver application server? I didn't find it in the installation directory, nor in the help from the IDE.
Does someone has a pointer to an example dispatcher? And any reference why this deviates from standard J2EE?
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.