tags:

views:

405

answers:

2

Hi,

I am doing a POC for runnig JMS on JBoss 4.0.5 GA. can anyone privide me a link which shows examples on how to 1. Create a queue in Jboss 2. Crate a factory in Jboss. 3. Configuration

If the above are not applicable, the is there a default que, topic, factory in Jboss.

Adhir

A: 

The first thing to note is that JBoss 4.0.5 will be running JBossMQ by default (As opposed to the newer JBoss Messaging). The answers to some of your questions depend on what you're doing, i.e. MDBs/EJB3 or not?

Note, you'll have to add http:// to the beginning of these links, Stackoverflow is being lame and not letting me post links.

Take a look at this URL: www.java2s.com/Code/Java/EJB3/EJBTutorialfromJBossdemoformessagedrivenbean.htm

  1. The Queue will be created for you automatically when JBoss loads the MDB in the example
  2. Assuming you mean a JMS Connection Factory, you can inject factories and destinations into EJB3s using something like the following:

    @Resource(mappedName = "queue/notification.EmailSender") private javax.jms.Destination emailSenderQueue;

    @Resource(mappedName = "QueueConnectionFactory") private javax.jms.ConnectionFactory connectionFactory;

  3. This is a good starting point: www.jboss.org/file-access/default/members/jbossas/freezone/docs/Server_Configuration_Guide/4/html/Messaging_on_JBoss.html

Also if you're not doing EJB3 yet in Jboss 4.0.3, see: rwatsh.blogspot.com/2006/12/ejb3-development-using-jboss-405ga.html

Rich Taylor