-
1. Re: Basic questions on how to deploy hornetQ Topics on AS 6
timfox Aug 19, 2010 12:12 PM (in response to imitchell)There are plenty of examples in the distro which show Topics being deployed.
-
2. Re: Basic questions on how to deploy hornetQ Topics on AS 6
imitchell Aug 19, 2010 12:20 PM (in response to timfox)Thanks Tim -
Which distro are you talking about?
I was just plunked down on this project with another newbie (and there are just the two of us) so sorry for these overly simplistic questions. I'm just looking for a push in the right direction.
-
3. Re: Basic questions on how to deploy hornetQ Topics on AS 6
timfox Aug 19, 2010 1:29 PM (in response to imitchell)1 of 1 people found this helpfulThe best place to start would be to read the quick start guide.
Now, please don't ask me where that is
(Hint: hornetq.org and follow the links, or google "HornetQ")
-
4. Re: Basic questions on how to deploy hornetQ Topics on AS 6
andreas_back Aug 19, 2010 1:34 PM (in response to imitchell)1 of 1 people found this helpfulHello Ian,
you may have a look at
http://community.jboss.org/wiki/GettingstartedwithHornetQinlessthanfiveminutes
With best redards,
Andreas
-
5. Re: Basic questions on how to deploy hornetQ Topics on AS 6
imitchell Aug 19, 2010 2:50 PM (in response to andreas_back)Thanks Andreas and Tim,
Things are getting better but I'm still missing something (just call me a "thick client")
It seems that the example pointed to at http://community.jboss.org/wiki/GettingstartedwithHornetQinlessthanfiveminutes is "standalone" in that it does not use JBoss AS but instead starts a hornetq server.
Are there any deployment methodologies to use when getting hornetQ messaging to work on JBoss AS 6? I don't mean setting up hornetQ on JBoss AS 6 (since it comes with hornetQ ready-to-go) but I do mean establishing the Topics or Queues that will be valid to use by beans/pojos/etc.
I did try the examples/javee/mdb-txt-send distro example using MDBMessageSendTxClientExample.java and got the below error on the following line.
Queue queue = (Queue) initialContext.lookup("/queue/testQueue");
Exception in thread "main"
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at ianjboss.msg.hornetq.MDBMessageSendTxClientExample.main(MDBMessageSendTxClientExample.java:39)
Thanks again
-
6. Re: Basic questions on how to deploy hornetQ Topics on AS 6
andreas_back Aug 19, 2010 3:12 PM (in response to imitchell)Hello Ian,
you can use the examples in the distribution as hints.
Look at
server\default\deploy\hornetq
in JBoss.
The queues and topics are configured in
hornetq-jms.xml.
You can take the relevant parts of the corresponding file in the distro
hornetq-2.1.2.Final\examples\javaee\mdb-tx-send\server\hornetq-jms.xml
to enter the required queues
<queue name="testQueue">
<entry name="/queue/testQueue"/>
</queue><queue name="replyQueue">
<entry name="/queue/replyQueue"/>
</queue>in the JBoss configuration file.
With best regards,
Andreas
-
7. Re: Basic questions on how to deploy hornetQ Topics on AS 6
andreas_back Aug 19, 2010 3:48 PM (in response to andreas_back)Hello Ian,
you can, of course, check that the queues and topic, that you have configured are there in the jmx-console and the admin-console (of JBoss 6 M4 at least).
Both enable you to monitor the messages that have been send and consumed and you can check the ConsumerCount to see if your MDB's are connected to the queues.
With best regards,
Andreas
-
8. Re: Basic questions on how to deploy hornetQ Topics on AS 6
clebert.suconic Aug 19, 2010 4:32 PM (in response to andreas_back)@andreas_back : We probably own you a few beers already :-) as you have been helping on the forums here! :-)
thanks for the help! :-)
-
9. Re: Basic questions on how to deploy hornetQ Topics on AS 6
imitchell Aug 19, 2010 4:33 PM (in response to andreas_back)Andreas,
Yes, i see the new ones under jmx-console - org.hornetq - JMX Agent View
for example:
- address="jms.queue.ianQueue",module=Core,name="jms.queue.ianQueue",type=Queue
- address="jms.queue.replyQueue",module=Core,name="jms.queue.replyQueue",type=Queue
- address="jms.queue.testQueue",module=Core,name="jms.queue.testQueue",type=Queue
They also show up in the admin screens
But I still get the previous exception -
Exception in thread "main"
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
I wonder if it is a jndi issue
right now I am passing in the jndi to java info as:
-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-Djava.naming.provider.url=192.168.0.102:1099
-Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfacesAll your help is appreciated - it is not lost on me that you have other things to be doing!
Thanks,
Ian
- address="jms.queue.ianQueue",module=Core,name="jms.queue.ianQueue",type=Queue
-
10. Re: Basic questions on how to deploy hornetQ Topics on AS 6
jaikiran Aug 20, 2010 12:20 AM (in response to imitchell)See if this helps http://community.jboss.org/wiki/GetquotjavaxnamingNoInitialContextExceptionquot
(Instead of the system params try using a jndi.properties in the classpath).
-
11. Re: Basic questions on how to deploy hornetQ Topics on AS 6
imitchell Aug 20, 2010 3:52 PM (in response to jaikiran)Thanks - I had accidently put the jndi.properties file in the wrong directory but your link at least confirmed that I had things setup correctly.
I was hoping to mark your response as helpful but that option was not there some reason.
-
12. Re: Basic questions on how to deploy hornetQ Topics on AS 6
imitchell Aug 20, 2010 3:54 PM (in response to andreas_back)Andreas - sorry for not getting back to you (I was in proposal hell).
Thanks so much for your help and patience on this - you and the others where a huge help and it is greatly appreciated!!
Thanks,
Ian
-
13. Re: Basic questions on how to deploy hornetQ Topics on AS 6
imitchell Aug 20, 2010 3:56 PM (in response to clebert.suconic)I've noticed that most things i start - no what it is - always ends up with me having a beer or two