Author: ppitonak(a)redhat.com
Date: 2011-05-03 10:10:18 -0400 (Tue, 03 May 2011)
New Revision: 22461
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml
Log:
JMS initialization refactored
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java 2011-05-03
11:12:59 UTC (rev 22460)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JPushBean.java 2011-05-03
14:10:18 UTC (rev 22461)
@@ -34,6 +34,8 @@
import org.richfaces.component.UIPush;
import org.richfaces.tests.metamer.Attributes;
import org.richfaces.tests.metamer.Message;
+import org.richfaces.tests.metamer.listener.HornetQInitializer;
+import org.richfaces.tests.metamer.listener.TopicsInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,6 +64,11 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
+ // TODO refactor
+ // set up messaging
+ new HornetQInitializer().processEvent(null);
+ new TopicsInitializer().processEvent(null);
+
topicsContext = TopicsContext.lookup();
attributes = Attributes.getComponentAttributesFromClass(UIPush.class,
getClass());
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java 2011-05-03
11:12:59 UTC (rev 22460)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/listener/HornetQInitializer.java 2011-05-03
14:10:18 UTC (rev 22461)
@@ -26,7 +26,6 @@
import javax.faces.application.Application;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
-import javax.faces.event.PostConstructApplicationEvent;
import javax.faces.event.PreDestroyApplicationEvent;
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
@@ -75,7 +74,7 @@
serverType = e.getMessage();
}
- if (serverType != null && serverType.contains("Tomcat")
&& event instanceof PostConstructApplicationEvent) {
+ if (serverType != null && serverType.contains("Tomcat")) {
try {
startHornetQ();
} catch (Exception e) {
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml 2011-05-03
11:12:59 UTC (rev 22460)
+++
modules/tests/metamer/trunk/application/src/main/webapp/WEB-INF/faces-config.xml 2011-05-03
14:10:18 UTC (rev 22461)
@@ -4,6 +4,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<application>
+ <!--
<system-event-listener>
<system-event-listener-class>org.richfaces.tests.metamer.listener.HornetQInitializer</system-event-listener-class>
<system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
@@ -12,6 +13,7 @@
<system-event-listener-class>org.richfaces.tests.metamer.listener.TopicsInitializer</system-event-listener-class>
<system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>
</system-event-listener>
+ -->
</application>
<lifecycle>