broken version. would work with Athmosphere 0.7.2
will update to 0.9 ... need some refactoring
This commit is contained in:
parent
a1feb25187
commit
dfba009524
45
pom.xml
45
pom.xml
|
@ -7,10 +7,11 @@
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<org.springframework.version>3.0.5.RELEASE</org.springframework.version>
|
<org.springframework.version>3.1.0.RELEASE</org.springframework.version>
|
||||||
<!--<jettyVersion>7.2.0.v20101020</jettyVersion>-->
|
<!--<jettyVersion>7.2.0.v20101020</jettyVersion>-->
|
||||||
<jettyVersion>8.1.0.RC4</jettyVersion>
|
<jettyVersion>8.1.0.RC4</jettyVersion>
|
||||||
<org.slf4j.version>1.6.4</org.slf4j.version>
|
<org.slf4j.version>1.6.4</org.slf4j.version>
|
||||||
|
<atmosphere.version>0.9-SNAPSHOT</atmosphere.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -20,6 +21,7 @@
|
||||||
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
|
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
|
||||||
<snapshots><enabled>false</enabled></snapshots>
|
<snapshots><enabled>false</enabled></snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>org.eclipse.repository.development</id>
|
<id>org.eclipse.repository.development</id>
|
||||||
<name>Jetty Repo</name>
|
<name>Jetty Repo</name>
|
||||||
|
@ -120,8 +122,20 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.atmosphere</groupId>
|
<groupId>org.atmosphere</groupId>
|
||||||
<artifactId>atmosphere-runtime</artifactId>
|
<artifactId>atmosphere-runtime</artifactId>
|
||||||
<version>0.7.2</version>
|
<version>${atmosphere.version}</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.atmosphere</groupId>
|
||||||
|
<artifactId>atmosphere-ping</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.atmosphere</groupId>
|
||||||
|
<artifactId>atmosphere-compat-jetty</artifactId>
|
||||||
|
<version>${atmosphere.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--<dependency>-->
|
<!--<dependency>-->
|
||||||
|
@ -162,21 +176,22 @@
|
||||||
<source>1.6</source>
|
<source>1.6</source>
|
||||||
<target>1.6</target>
|
<target>1.6</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<version>2.3.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<!--<plugin>-->
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<!--<groupId>org.apache.maven.plugins</groupId>-->
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<!--<artifactId>maven-dependency-plugin</artifactId>-->
|
||||||
<executions>
|
<!--<executions>-->
|
||||||
<execution>
|
<!--<execution>-->
|
||||||
<id>install</id>
|
<!--<id>install</id>-->
|
||||||
<phase>install</phase>
|
<!--<phase>install</phase>-->
|
||||||
<goals>
|
<!--<goals>-->
|
||||||
<goal>sources</goal>
|
<!--<goal>sources</goal>-->
|
||||||
</goals>
|
<!--</goals>-->
|
||||||
</execution>
|
<!--</execution>-->
|
||||||
</executions>
|
<!--</executions>-->
|
||||||
</plugin>
|
<!--</plugin>-->
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
|
|
|
@ -15,13 +15,13 @@ import java.util.Map;
|
||||||
@Controller
|
@Controller
|
||||||
public class RestController {
|
public class RestController {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(RestController.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(RestController.class);
|
||||||
private Validator validator;
|
// private Validator validator;
|
||||||
private BuntiController controller;
|
private BuntiController controller;
|
||||||
|
|
||||||
@Autowired
|
// @Autowired
|
||||||
public void setValidator(Validator validator) {
|
// public void setValidator(Validator validator) {
|
||||||
this.validator = validator;
|
// this.validator = validator;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public final void setController(BuntiController controller) {
|
public final void setController(BuntiController controller) {
|
||||||
|
|
|
@ -13,6 +13,7 @@ public final class AtmosphereUtils {
|
||||||
public static AtmosphereResource<HttpServletRequest, HttpServletResponse> getAtmosphereResource(
|
public static AtmosphereResource<HttpServletRequest, HttpServletResponse> getAtmosphereResource(
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
|
|
||||||
|
|
||||||
AtmosphereResource<HttpServletRequest, HttpServletResponse> resource =
|
AtmosphereResource<HttpServletRequest, HttpServletResponse> resource =
|
||||||
(AtmosphereResource<HttpServletRequest, HttpServletResponse>) request.getAttribute(AtmosphereServlet.ATMOSPHERE_RESOURCE);
|
(AtmosphereResource<HttpServletRequest, HttpServletResponse>) request.getAttribute(AtmosphereServlet.ATMOSPHERE_RESOURCE);
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,21 @@
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:task="http://www.springframework.org/schema/task"
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
|
||||||
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
|
||||||
|
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd ">
|
||||||
|
|
||||||
|
<context:component-scan base-package="de.ctdo.bunti.web*"/>
|
||||||
<context:component-scan base-package="de.ctdo.bunti"/>
|
|
||||||
|
|
||||||
<!-- Configures the @Controller programming model -->
|
<!-- Configures the @Controller programming model -->
|
||||||
<mvc:annotation-driven />
|
<mvc:annotation-driven>
|
||||||
|
<mvc:argument-resolvers>
|
||||||
|
<bean class="de.ctdo.bunti.websocket.AtmosphereResourceArgumentResolver" />
|
||||||
|
</mvc:argument-resolvers>
|
||||||
|
</mvc:annotation-driven>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Forwards requests to the "/" resource to the "welcome" view -->
|
<!-- Forwards requests to the "/" resource to the "welcome" view -->
|
||||||
<mvc:view-controller path="/" view-name="index"/>
|
<mvc:view-controller path="/" view-name="index"/>
|
||||||
|
@ -23,17 +30,6 @@
|
||||||
<property name="suffix" value=".jsp" />
|
<property name="suffix" value=".jsp" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<task:annotation-driven scheduler="myScheduler"/>
|
|
||||||
<task:scheduler id="myScheduler" pool-size="3"/>
|
|
||||||
|
|
||||||
|
|
||||||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
|
||||||
<property name="location" value="classpath:bunti.properties"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean class="de.ctdo.bunti.dmx.DMXMixerImpl">
|
|
||||||
<property name="artNetDeviceAddress" value="${artnet.deviceAddress}"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!--<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />-->
|
<!--<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />-->
|
||||||
<bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" />
|
<bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" />
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:context="http://www.springframework.org/schema/context"
|
||||||
|
xmlns:task="http://www.springframework.org/schema/task"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
|
||||||
|
|
||||||
|
<!-- Root Context: defines shared resources visible to all other web components -->
|
||||||
|
|
||||||
|
<context:component-scan base-package="de.ctdo.bunti">
|
||||||
|
<context:exclude-filter type="regex" expression="de\.ctdo\.bunti\.web*"/>
|
||||||
|
</context:component-scan>
|
||||||
|
|
||||||
|
|
||||||
|
<task:annotation-driven scheduler="myScheduler"/>
|
||||||
|
<task:scheduler id="myScheduler" pool-size="3"/>
|
||||||
|
|
||||||
|
|
||||||
|
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||||
|
<property name="location" value="classpath:bunti.properties"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean class="de.ctdo.bunti.dmx.DMXMixerImpl">
|
||||||
|
<property name="artNetDeviceAddress" value="${artnet.deviceAddress}"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
<!-- Root Logger -->
|
<!-- Root Logger -->
|
||||||
<root>
|
<root>
|
||||||
<priority value="warn" />
|
<priority value="info" />
|
||||||
<appender-ref ref="console" />
|
<appender-ref ref="console" />
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
Manifest-Version: 1.0
|
|
||||||
Class-Path:
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
function() {
|
function() {
|
||||||
var Socket = "MozWebSocket" in window ? MozWebSocket : WebSocket;
|
var Socket = "MozWebSocket" in window ? MozWebSocket : WebSocket;
|
||||||
ws = new Socket("ws://" + window.location.hostname + ":" + window.location.port + "/bunti_server/bunti");
|
ws = new Socket("ws://" + window.location.hostname + ":" + window.location.port + "/buntisocket");
|
||||||
|
|
||||||
ws.onmessage = function (message) {
|
ws.onmessage = function (message) {
|
||||||
//$("#messages").append("<p>" + message.data + "</p>");
|
//$("#messages").append("<p>" + message.data + "</p>");
|
||||||
|
|
|
@ -3,14 +3,18 @@
|
||||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||||
id="WebApp_ID" version="3.0">
|
id="WebApp_ID" version="3.0">
|
||||||
|
<display-name>bunti_server</display-name>
|
||||||
<display-name>bunti_server</display-name>
|
|
||||||
<welcome-file-list>
|
|
||||||
<welcome-file>index.jsp</welcome-file>
|
|
||||||
</welcome-file-list>
|
|
||||||
|
|
||||||
<description>CTDO bunti control Server</description>
|
<description>CTDO bunti control Server</description>
|
||||||
|
|
||||||
|
<context-param>
|
||||||
|
<param-name>contextConfigLocation</param-name>
|
||||||
|
<param-value>classpath:META-INF/spring/root-context.xml</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<listener>
|
||||||
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||||
|
</listener>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>characterEncodingFilter</filter-name>
|
<filter-name>characterEncodingFilter</filter-name>
|
||||||
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
|
||||||
|
@ -29,19 +33,6 @@
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</filter-mapping>
|
</filter-mapping>
|
||||||
|
|
||||||
<!--<servlet>-->
|
|
||||||
<!--<servlet-name>dispatcher</servlet-name>-->
|
|
||||||
<!--<servlet-class>-->
|
|
||||||
<!--org.springframework.web.servlet.DispatcherServlet-->
|
|
||||||
<!--</servlet-class>-->
|
|
||||||
<!--<load-on-startup>1</load-on-startup>-->
|
|
||||||
<!--</servlet>-->
|
|
||||||
|
|
||||||
<session-config>
|
|
||||||
<session-timeout>25</session-timeout>
|
|
||||||
</session-config>
|
|
||||||
|
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>appServlet</servlet-name>
|
<servlet-name>appServlet</servlet-name>
|
||||||
<servlet-class>org.atmosphere.cpr.MeteorServlet</servlet-class>
|
<servlet-class>org.atmosphere.cpr.MeteorServlet</servlet-class>
|
||||||
|
@ -75,7 +66,7 @@
|
||||||
</init-param>
|
</init-param>
|
||||||
<init-param>
|
<init-param>
|
||||||
<param-name>contextConfigLocation</param-name>
|
<param-name>contextConfigLocation</param-name>
|
||||||
<param-value>/WEB-INF/spring/servlet-context.xml</param-value>
|
<param-value>classpath:/META-INF/spring/mvc/servlet-context.xml</param-value>
|
||||||
</init-param>
|
</init-param>
|
||||||
<load-on-startup>1</load-on-startup>
|
<load-on-startup>1</load-on-startup>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
Loading…
Reference in New Issue