How to deploy MessageBus in Liferay?

1k views Asked by At

Written in Liferay Documentation 6.1 on using Message Bus,

Configuration of Message Bus is done using the following files: WEB-INF/src/META-INF/messaging-spring.xml - Specifies your destinations, listeners, and their mappings to each other WEB-INF/web.xml - Holds a listing of deployment descriptors for your plugin. Be sure to add messaging-spring.xml to your list of Spring configurations in this file.

How does messaging-spring.xml listed in web.xml?

I tried this

<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> 
<listener>    
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>  </listener>             
<context-param><param-name>contextConfigLocation</param-name>          
     <param-value>/WEB-INF/classes/META-INF/messaging-spring.xml</param-value>       </context-param>
 </web-app>

but tomcat logged

org.apache.catalina.core.standardcontext start severe error listenerstart

And when i removed

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

tomcat logged

Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost]. has not been started

just want to try the Message Bus, and i cant invoke the listener when a send a message using

    Message message = new Message();        
message.put("slogan", "Procurement");        
MessageBusUtil.sendMessage("inkwell/slogan", message);

I'm developing in Liferay 6.0.5 Thanks for the help

0

There are 0 answers