Well, thanks. The deploy is ok now, but I'm not being able to find the
QueueConnectionFactory through jndi lookup. I'll post my descriptors, plus the client
code:
jboss.xml :
| <message-driven>
| <ejb-name>MailCreatorMDB</ejb-name>
| <destination-jndi-name>queue/MailQueue</destination-jndi-name>
| <resource-ref>
| <res-ref-name>jms/QCF</res-ref-name>
| <jndi-name>QueueConnectionFactory</jndi-name>
| </resource-ref>
| </message-driven>
|
ejb-jar.xml
| <enterprise-beans>
| <message-driven>
| <display-name>MailCreatorMDB</display-name>
| <ejb-name>MailCreatorMDB</ejb-name>
| <ejb-class>mailcreator.MailCreatorMDBBean</ejb-class>
| <transaction-type>Container</transaction-type>
| <message-driven-destination>
| <destination-type>javax.jms.Queue</destination-type>
| </message-driven-destination>
| <resource-ref>
| <res-ref-name>jms/QCF</res-ref-name>
| <res-type>javax.jms.QueueConnectionFactory</res-type>
| <res-auth>Container</res-auth>
| </resource-ref>
| <resource-env-ref>
| <resource-env-ref-name>queue/MailQueue</resource-env-ref-name>
| <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
| </resource-env-ref>
| </message-driven>
| </enterprise-beans>
|
jbossmq-destinations-service.xml
| <mbean code="org.jboss.mq.server.jmx.Queue"
| name="jboss.mq.destination:service=Queue,name=MailQueue">
| <depends
optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| </mbean>
|
Cliente code (POJO class):
| try {
| this.ctx = new InitialContext(System.getProperties());
| QueueConnectionFactory factory = (QueueConnectionFactory)
ctx.lookup("jms/QCF");
| Queue queue = (Queue)ctx.lookup("java:/comp/env/jms/MailQueue");
| QueueConnection queueConnection = factory.createQueueConnection();
| QueueSession queueSession = queueConnection.createQueueSession(false,0);
| QueueSender sender = queueSession.createSender(queue);
| ObjectMessage objMsg = queueSession.createObjectMessage();
| objMsg.setObject(userDTO);
| sender.send(objMsg);
| queueConnection.close();
| }
|
I'm running jboss 3.2.2 on a windows XP (development, production is a Debian) JVM 1.4.2
Thanks
Vinicius
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3845627#3845627
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3845627
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user