This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.apache.activemq.ActiveMQConnectionFactory; | |
import javax.jms.Connection; | |
import javax.jms.DeliveryMode; | |
import javax.jms.JMSException; | |
import javax.jms.Message; | |
import javax.jms.MessageListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory | |
# use the following property to configure the default connector | |
java.naming.provider.url = tcp://localhost:61616 | |
# register some topics in JNDI using the form | |
# topic.[jndiName] = [physicalName] | |
topic.MyTopic = example.MyTopic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package activemq.test; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.Map; | |
import org.apache.activemq.api.core.TransportConfiguration; | |
import org.apache.activemq.core.config.Configuration; | |
import org.apache.activemq.core.config.impl.ConfigurationImpl; | |
import org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gwt.user.server; | |
import org.jboss.errai.bus.client.api.base.MessageBuilder; | |
import org.jboss.errai.bus.client.api.messaging.Message; | |
import org.jboss.errai.bus.client.api.messaging.MessageBus; | |
import org.jboss.errai.bus.client.api.messaging.MessageCallback; | |
import org.jboss.errai.bus.server.annotations.Service; | |
import org.jboss.errai.bus.server.service.ErraiService; | |
import org.jboss.errai.bus.server.service.ErraiServiceSingleton; | |
@Service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErraiService<?> service = ErraiServiceSingleton.getService(); | |
this.bus = service.getBus(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<context-param> | |
<param-name>ErraiApp.properties</param-name> | |
<param-value>WEB_INF/ErraiApp.properties</param-value> | |
</context-param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Request dispatcher implementation (default is SimpleDispatcher) | |
# | |
errai.dispatcher_implementation=org.jboss.errai.bus.server.SimpleDispatcher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<servlet> | |
<servlet-name>ErraiServlet</servlet-name> | |
<servlet-class>org.jboss.errai.bus.server.servlet.DefaultBlockingServlet</servlet-class> | |
<init-param> | |
<param-name>auto-discover-services</param-name> | |
<param-value>true</param-value> | |
</init-param> | |
<load-on-startup>1</load-on-startup> | |
</servlet> | |
<servlet-mapping> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<inherits name='org.jboss.errai.bus.ErraiBus' /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bus.subscribe("ClientService", new MessageCallback() { | |
public void callback(Message message) { | |
Window.alert("ClientService message is received. " + message.get(String.class, "text")); | |
} | |
}); |