-
1. Re: Jboss messaging supported?
norman.richards Jan 3, 2007 2:09 PM (in response to liudan2005)Please check the documentation for exact usage. It does work. Can you show the code where you are injecting paymentQueueSender? Where exactly are you getting a null pointer? Is the paymentQueueSender itself null?
-
2. Re: Jboss messaging supported?
liudan2005 Jan 3, 2007 4:12 PM (in response to liudan2005)I simply followed seam doc http://docs.jboss.com/seam/1.1GA/reference/en/html/jms.html#d0e5121
and I haven't added any thing new. The doc seem to be not updated. Here is my code:@In(create=true) private QueueSender paymentQueueSender; @In(create=true) private QueueSession queueSession; public void publish(Payment payment) { try { paymentQueueSender.send( queueSession.createObjectMessage(payment) ); } catch (Exception ex) { throw new RuntimeException(ex); } }
Here is the component defined in my components.xml<component name="paymentQueueSender" class="org.jboss.seam.jms.ManagedQueueSender"> <property name="queueJndiName">queue/testQueue</property> </component>
In the doc, it says you need to define queueConnection.queueConnectionFactoryJndiName and topicConnection.topicConnectionFactoryJndiName if you use anything other than JbossMQ. Can you give an example of how to use it with JBoss Messaging? -
3. Re: Jboss messaging supported?
norman.richards Jan 3, 2007 5:09 PM (in response to liudan2005)I don't have jboss messaging installed, but it should be as simple as setting the jndi name for your connection factory:
<jms:queue-connection queue-connection-factory-jndi-name="/ConnectionFactory" />
(I think that's the correct JNDI name for jboss messaging - you'll have to check for yourself on that) -
4. Re: Jboss messaging supported?
liudan2005 Jan 4, 2007 5:06 AM (in response to liudan2005)It says "jms:queue-connection" is not a valid tag in components.xml when I deploy it. here is my xml definition:
<components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
What's your xml like? -
5. Re: Jboss messaging supported?
norman.richards Jan 4, 2007 8:34 AM (in response to liudan2005)You need to add the jms namespace declaration or use the older style component/property generic-XML equivalent. Please see the recent Seam examples to see the new XML structure in action.