[JBoss Messaging] - Re: Problem with callbackURI
by clebert.suconic@jboss.com
I'm adding this to the end of Chapter 6. If anyone wants to review it:
6.5. Configuring the remoting connector
JBoss Messaging uses JBoss Remoting for all client to server communication. For full details of what JBoss Remoting is capable of and how it is configured please consult the JBoss Remoting documentation.
The default configuration includes a single remoting connector which is used by the single default connection factory. Each connection factory can be configured to use its own connector.
The default connector is configured to use the remoting socket transport.
This transport opens TCP connections from client to server for client to server communications (e.g. sending messages) and TCP connections from server to client for server to client communications (e.g. receiving messages). The transport can be configured to use SSL where a higher level of security is required.
Future releases JBoss Messaging will support a bidirectional socket transport (similar to UIL2 in JBoss MQ) and an HTTP transport, both of which are useful in network environments where TCP connections from server to client are not possible. This means, for example, that you could deploy one connection factory that uses the HTTP transport for all the connections created from it, and another connection factory that uses the socket transport for all connections created from it.
You can look at remoting configuration under:
/server//deploy/jboss-messaging.sar/remoting-service.xml
By default JBoss Messaging binds to ${jboss.bind.address} which can be defined by: ./run.sh -c -b yourIP.
You can change remoting-service.xml if you want for example use a different communication port, or any other network behavior.
6.6. Configuring the callback
JBoss Messaging uses a callback mechanism from Remoting that needs a Socket for callback operations. These socket properties are passed to the server by a remote call when the connection is being estabilished. As we said before we will support bidirectional protocols in future releases.
By default JBoss Messaging will execute InetAddress.getLocalHost().getHostAddress() to access your local host IP, but in case you need to setup a different IP, you can define a system property in your java arguments:
Use java -Djboss.messaging.callback.bind.address=YourHost - That will determine the callBack host in your client.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973103#3973103
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973103
19 years, 7 months
[JBoss Messaging] - Messaging client can't create connection
by anshah1
I have a simple client.. here's the crux of it..
public void initialize() throws Exception {
| // lookup the queue and topic objects
| System.out.println("Starting init");
| Destination queue = (Destination) mCtx.lookup("/queue/myQueue");
| System.out.println("q look up done " + queue);
| // lookup a connection factory
| ConnectionFactory factory = (ConnectionFactory) mCtx
| .lookup("/ConnectionFactory");
| System.out.println("factory done ");
| // create a connection
| javax.jms.Connection connection = factory.createConnection();
| System.out.println("created connection ");
| // create a session
| Session session = connection.createSession(true,
| Session.AUTO_ACKNOWLEDGE);
| System.out.println("created session");
| // create a message consumer for the topic
| MessageConsumer subscriber = session.createConsumer(queue);
| System.out.println("created consumer");
| // set this class as message listener for the topic
| subscriber.setMessageListener(this);
| System.out.println("finished init");
| connection.start(); // start connection
| }
|
This is the output I get.
:
| [java] You are connecting to server wd55237
| [java] Threads available 4
| [java] datasource look up done
| [java] Starting init
| [java] q look up done JBossQueue[myQueue]
| [java] factory done
|
I am running this example with the following class path...
C:\Documents and
| Settings\d3m293\workspace\NCBIOfflineRetrieval\build\lib\ncbiretrieval.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\blueprint-commons-db-3.8.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\brm-server.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\brm-util.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\jboss-messaging-client.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\seqhound-4.0.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\axis.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\commons-discovery-0.2.jar
|
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\commons-logging.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\jaxrpc.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\saaj.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\lib\axis\wsdl4j-1.5.1.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\activation.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\antlr-2.7.5H3.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\asm-attrs.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\asm.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\autonumber-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\axis.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bcel.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bindingservice-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\blueprint-commons-db-3.8.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bsf.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bsh-1.3.0.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\bsh-deployer.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\cglib-2.1_2jboss.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\commons-collections.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\commons-httpclient.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\commons-logging.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\ejb3-persistence.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hibernate-annotations.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hibernate-entitymanager.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hibernate3.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hsqldb-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\hsqldb.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\javax.servlet.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\javax.servlet.jsp.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-common-jdbc-wrapper.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-hibernate.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-j2ee.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jaxrpc.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jca.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jsr77.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-jsr88.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-management.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-monitoring.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-remoting.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-saaj.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss-transaction.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jboss.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jbosssx.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jmx-adaptor-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jnpserver.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jpl-pattern.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\jpl-util.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\log4j.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mail-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mail.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\msbase.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mssqlserver.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\msutil.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\mysql-connector-java-5.0-nightly-20060131-bin.
| jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\pg74jdbc3.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\properties-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\scheduler-plugin-example.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\scheduler-plugin.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\seqhound-4.0.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\snmp-support.jar
| -C:\jboss-4.0.3SP1\server\messaging\lib\xmlentitymgr.jar
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\etc\jndi.properties
| -C:\Documents and Settings\d3m293\workspace\NCBIOfflineRetrieval\build\lib
|
Any ideas what might be going wrong? It simply hangs at the createConnection point and does not receive any messages from the queue at all.
When I run one of the examples distributed with the messaging bundle, they run just fine.
how do I debug this kind of a problem? Any thoughts, inputs, ideas are most appreciated :))
Thanks.,
Anuj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973096#3973096
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973096
19 years, 7 months