Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix examples

  • Loading branch information...
commit bc1ff542eabd3f065e1db99fa600eeef12bf9cc6 1 parent 903ed4c
Bill Burke authored
View
19 dup-send/pom.xml
@@ -1,14 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq.rest</groupId>
+ <artifactId>hornetq-rest-all</artifactId>
+ <version>2.2.2.Final</version>
+ </parent>
<groupId>org.hornetq.rest.examples</groupId>
<artifactId>dup-send</artifactId>
- <version>2.2.0.CR1</version>
<packaging>war</packaging>
- <properties>
- <resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.0.CR1</hornetq.version>
- </properties>
<name>Duplicate Send Demo</name>
<repositories>
<repository>
@@ -103,42 +103,35 @@
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
- <version>3.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
- <version>1.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest</artifactId>
- <version>${hornetq.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
- <version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
- <version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.1</version>
<scope>test</scope>
</dependency>
</dependencies>
View
13 javascript-chat/pom.xml
@@ -1,14 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq.rest</groupId>
+ <artifactId>hornetq-rest-all</artifactId>
+ <version>2.2.2.Final</version>
+ </parent>
<groupId>org.hornetq.rest.examples</groupId>
<artifactId>javascript-chat</artifactId>
- <version>2.2.0.CR1</version>
<packaging>war</packaging>
- <properties>
- <resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.0.CR1</hornetq.version>
- </properties>
<name>Browser Chat App</name>
<repositories>
<repository>
@@ -117,17 +117,14 @@
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
- <version>3.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
View
19 jms-to-rest/pom.xml
@@ -1,14 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq.rest</groupId>
+ <artifactId>hornetq-rest-all</artifactId>
+ <version>2.2.2.Final</version>
+ </parent>
<groupId>org.hornetq.rest.examples</groupId>
<artifactId>mixed-jms-rest</artifactId>
- <version>2.2.0.CR1</version>
<packaging>war</packaging>
- <properties>
- <resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.0.CR1</hornetq.version>
- </properties>
<name>Mixed JMS and REST Producers/Consumers</name>
<repositories>
<repository>
@@ -103,42 +103,35 @@
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
- <version>3.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
- <version>1.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest</artifactId>
- <version>${hornetq.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
- <version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
- <version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.1</version>
<scope>test</scope>
</dependency>
</dependencies>
View
5 jms-to-rest/src/main/java/JmsHelper.java
@@ -1,9 +1,11 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
+import org.hornetq.core.client.impl.ClientSessionFactoryImpl;
import org.hornetq.core.config.impl.FileConfiguration;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQJMSConnectionFactory;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
@@ -20,8 +22,7 @@ public static ConnectionFactory createConnectionFactory(String configFile) throw
config.setConfigurationUrl(configFile);
config.start();
TransportConfiguration transport = config.getConnectorConfigurations().get("netty-connector");
- ClientSessionFactory factory = HornetQClient.createClientSessionFactory(transport);
- return new HornetQConnectionFactory(factory);
+ return new HornetQJMSConnectionFactory(HornetQClient.createServerLocatorWithoutHA(transport));
}
View
18 push/pom.xml
@@ -1,14 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.hornetq.rest</groupId>
+ <artifactId>hornetq-rest-all</artifactId>
+ <version>2.2.2.Final</version>
+ </parent>
<groupId>org.hornetq.rest.examples</groupId>
<artifactId>push</artifactId>
- <version>2.2.0.CR1</version>
<packaging>war</packaging>
- <properties>
- <resteasy.version>2.0.1.GA</resteasy.version>
- <hornetq.version>2.2.0.CR1</hornetq.version>
- </properties>
<name>Push Subscriptions</name>
<repositories>
<repository>
@@ -109,7 +109,6 @@
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-core</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.netty</groupId>
@@ -119,32 +118,27 @@
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms</artifactId>
- <version>${hornetq.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
- <version>1.0.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.hornetq.rest</groupId>
<artifactId>hornetq-rest</artifactId>
- <version>${hornetq.version}</version>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
- <version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
- <version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.1</version>
<scope>test</scope>
</dependency>
</dependencies>
View
5 push/src/main/java/JmsHelper.java
@@ -4,6 +4,7 @@
import org.hornetq.core.config.impl.FileConfiguration;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.client.HornetQDestination;
+import org.hornetq.jms.client.HornetQJMSConnectionFactory;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
@@ -20,9 +21,7 @@ public static ConnectionFactory createConnectionFactory(String configFile) throw
config.setConfigurationUrl(configFile);
config.start();
TransportConfiguration transport = config.getConnectorConfigurations().get("netty-connector");
- ClientSessionFactory factory = HornetQClient.createClientSessionFactory(transport);
- return new HornetQConnectionFactory(factory);
+ return new HornetQJMSConnectionFactory(HornetQClient.createServerLocatorWithoutHA(transport));
}
-
}
Please sign in to comment.
Something went wrong with that request. Please try again.