[jboss-dev-forums] [JBoss Messaging Development] - jBoss 5.0.1 - topic connection doesn't start

Marco Baldelli do-not-reply at jboss.com
Fri Oct 5 09:22:58 EDT 2012


Marco Baldelli [https://community.jboss.org/people/marcob83] created the discussion

"jBoss 5.0.1 - topic connection doesn't start"

To view the discussion, visit: https://community.jboss.org/message/763491#763491

--------------------------------------------------------------
hi all,
i'm new here and i need a little help. i have configured on my jBoss 5.0.1 (running under eclipse helios, ubuntu 12.04 64-bit as OS) a new connection factory and a topic queue for my messages. 

configurations posted down here, from connection-factories-service.xml (first portion) and destinations-service.xml (second one):

...
   <!-- connection factory -->     
   <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
      name="jboss.messaging.connectionfactory:service=MyConnectionFactory"
      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
      <depends>jboss.messaging:service=PostOffice</depends>

      <attribute name="JNDIBindings">
         <bindings>
            <binding>jms/MyConnectionFactory</binding>
         </bindings>
      </attribute>
   </mbean>
...
   <mbean xmbean-dd="xmdesc/Topic-xmbean.xml" 
      name="jboss.messaging.destination:service=Topic,name=MyTopic" 
      code="org.jboss.jms.server.destination.TopicService">
      <attribute name="JNDIName">topic/MyTopic</attribute>
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
      <depends>jboss.messaging:service=PostOffice</depends>
   </mbean>
...

i have a servlet where i wrote basic instruction for calling my topic, here's the code:

Properties p = new Properties();
p.put("java.naming.factory.initial",           "org.jnp.interfaces.NamingContextFactory");
p.put("java.naming.factory.url.pkgs",          "org.jboss.naming:org.jnp.interfaces");
p.put("java.naming.provider.url",                    "localhost:1099");

InitialContext ctx = new InitialContext(p);
JBossTopic topic = (JBossTopic) ctx.lookup("topic/MyTopic");
JBossConnectionFactory topicConnectionFactory =(JBossConnectionFactory) ctx.lookup("jms/MyConnectionFactory");
TopicConnection topicConnection = topicConnectionFactory.createTopicConnection();
topicConnection.start();
TopicSession topicSession = topicConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);

// create a queue sender
TopicPublisher topicSender = topicSession.createPublisher(topic);
topicSender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

MyDTO myDTO = getMessage(); //internal method
ObjectMessage  message = topicSession.createObjectMessage(myDTO);
// send the message
topicSender.send(message);


doing this, my execution stops to topicConnection.start(); (i checked it with a debug and some custom log message). i'm not getting any error, stacktrace exception or something, the browser page where i call my servlet just stands waiting for a response.
i used JBossTopic and JBossConnectionFactory due to some ClassCastException from JBoss when i tried to use simple javax.jms Topic and TopicConnectionFactory.

could someone help me with this? i'm getting totally mad!!!


thanks in advance,
marco
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/763491#763491]

Start a new discussion in JBoss Messaging Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2043]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20121005/7bafefb7/attachment.html 


More information about the jboss-dev-forums mailing list