[virtualcommons-svn] SF.net SVN: virtualcommons:[269] mentalmodels/trunk
Status: Beta
Brought to you by:
alllee
From: <see...@us...> - 2009-08-25 00:22:17
|
Revision: 269 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=269&view=rev Author: seematalele Date: 2009-08-25 00:20:46 +0000 (Tue, 25 Aug 2009) Log Message: ----------- Changed the pom.xml so that it will point to spring-flex 1.0.0.RC2 version. Configured the project using new version of BlazeDS(spring-flex-1.0.0.RC2) Modified Paths: -------------- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml mentalmodels/trunk/pom.xml mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartGame.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml mentalmodels/trunk/src/main/webapp/WEB-INF/flex/messaging-config.xml mentalmodels/trunk/src/main/webapp/WEB-INF/flex/services-config.xml Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-08-21 23:37:51 UTC (rev 268) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-08-25 00:20:46 UTC (rev 269) @@ -430,7 +430,7 @@ currentState = "wait"; btnBack.enabled = btnForward.enabled = btnReset.enabled = true; - getNextBlock(); + //getNextBlock(); returnValue = true; } } Modified: mentalmodels/trunk/pom.xml =================================================================== --- mentalmodels/trunk/pom.xml 2009-08-21 23:37:51 UTC (rev 268) +++ mentalmodels/trunk/pom.xml 2009-08-25 00:20:46 UTC (rev 269) @@ -1,220 +1,230 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- + <!-- vim:sts=2:sw=2 --> -<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"> - <organization> - <name>The Virtual Commons</name> - <url>http://dev.commons.asu.edu</url> - </organization> - <modelVersion>4.0.0</modelVersion> - <groupId>edu.asu.commons</groupId> - <artifactId>mme</artifactId> - <version>0.1-SNAPSHOT</version> - <name>Mental Models Application</name> - <packaging>war</packaging> - <repositories> - <repository> - <id>dev.commons.asu.edu</id> - <url>http://dev.commons.asu.edu/archiva/repository/internal/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <dependencies> - <!-- mysql jdbc --> - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql-connector-java</artifactId> - <version>5.1.6</version> - </dependency> - <!-- spring dependencies --> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring</artifactId> - <version>2.5.6</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-webmvc</artifactId> - <version>2.5.6</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-flex</artifactId> - <version>1.0.0.M2</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-hibernate3</artifactId> - <version>2.0-m3</version> - </dependency> - <dependency> - <groupId>cglib</groupId> - <artifactId>cglib-nodep</artifactId> - <version>2.2</version> - </dependency> - <!-- hibernate and JPA persistence --> - <dependency> - <groupId>javax.persistence</groupId> - <artifactId>persistence-api</artifactId> - <version>1.0</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-annotations</artifactId> - <version>3.4.0.GA</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-ehcache</artifactId> - <version>3.3.1.GA</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-tools</artifactId> - <version>3.2.3.GA</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.5.2</version> - </dependency> - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>3.1</version> - </dependency> - <dependency> - <groupId>commons-dbcp</groupId> - <artifactId>commons-dbcp</artifactId> - <version>1.2.2</version> - </dependency> - <dependency> - <groupId>javassist</groupId> - <artifactId>javassist</artifactId> - <version>3.8.0.GA</version> - </dependency> - <!-- - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>4.0-beta2</version> - </dependency> - --> - <dependency> - <groupId>com.adobe.blazeds</groupId> - <artifactId>blazeds-core</artifactId> - <version>3.2.0.3978</version> - </dependency> - <dependency> - <groupId>com.adobe.blazeds</groupId> - <artifactId>blazeds-remoting</artifactId> - <version>3.2.0.3978</version> - </dependency> - <dependency> - <groupId>com.adobe.blazeds</groupId> - <artifactId>blazeds-common</artifactId> - <version>3.2.0.3978</version> - </dependency> - <dependency> - <groupId>com.adobe.blazeds</groupId> - <artifactId>blazeds-proxy</artifactId> - <version>3.2.0.3978</version> - </dependency> - <dependency> - <groupId>com.adobe.blazeds</groupId> - <artifactId>blazeds-opt</artifactId> - <version>3.2.0.3978</version> - </dependency> - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - <version>2.7.1</version> - </dependency> +<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"> + <organization> + <name>The Virtual Commons</name> + <url>http://dev.commons.asu.edu</url> + </organization> + <modelVersion>4.0.0</modelVersion> + <groupId>edu.asu.commons</groupId> + <artifactId>mme</artifactId> + <version>0.1-SNAPSHOT</version> + <name>Mental Models Application</name> + <packaging>war</packaging> + <repositories> + <repository> + <id>dev.commons.asu.edu</id> + <url>http://dev.commons.asu.edu/archiva/repository/internal/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>spring-milestone</id> + <name>Spring Portfolio Milestone Repository</name> + <url>http://maven.springframework.org/milestone</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <dependencies> + <!-- mysql jdbc --> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>5.1.6</version> + </dependency> + <!-- spring dependencies --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring</artifactId> + <version>2.5.6</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-webmvc</artifactId> + <version>2.5.6</version> + </dependency> + <dependency> +<groupId>org.springframework.flex</groupId> +<artifactId>spring-flex</artifactId> +<version>1.0.0.RC2</version> +</dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-hibernate3</artifactId> + <version>2.0-m3</version> + </dependency> + <dependency> + <groupId>cglib</groupId> + <artifactId>cglib-nodep</artifactId> + <version>2.2</version> + </dependency> + <!-- hibernate and JPA persistence --> + <dependency> + <groupId>javax.persistence</groupId> + <artifactId>persistence-api</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-annotations</artifactId> + <version>3.4.0.GA</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-ehcache</artifactId> + <version>3.3.1.GA</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-tools</artifactId> + <version>3.2.3.GA</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.5.2</version> + </dependency> + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>3.1</version> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>1.2.2</version> + </dependency> + <dependency> + <groupId>javassist</groupId> + <artifactId>javassist</artifactId> + <version>3.8.0.GA</version> + </dependency> + <!-- + <dependency> <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> <version>4.0-beta2</version> + </dependency> + --> + <dependency> + <groupId>com.adobe.blazeds</groupId> + <artifactId>blazeds-core</artifactId> + <version>3.2.0.3978</version> + </dependency> + <dependency> + <groupId>com.adobe.blazeds</groupId> + <artifactId>blazeds-remoting</artifactId> + <version>3.2.0.3978</version> + </dependency> + <dependency> + <groupId>com.adobe.blazeds</groupId> + <artifactId>blazeds-common</artifactId> + <version>3.2.0.3978</version> + </dependency> + <dependency> + <groupId>com.adobe.blazeds</groupId> + <artifactId>blazeds-proxy</artifactId> + <version>3.2.0.3978</version> + </dependency> + <dependency> + <groupId>com.adobe.blazeds</groupId> + <artifactId>blazeds-opt</artifactId> + <version>3.2.0.3978</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>2.7.1</version> + </dependency> - </dependencies> - <build> - <finalName>mme</finalName> - <testResources> - <testResource> - <directory>src/main/webapp</directory> - </testResource> - </testResources> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>tomcat-maven-plugin</artifactId> - <configuration> - <server>myserver</server> - </configuration> + </dependencies> + <build> + <finalName>mme</finalName> + <testResources> + <testResource> + <directory>src/main/webapp</directory> + </testResource> + </testResources> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>tomcat-maven-plugin</artifactId> + <configuration> + <server>myserver</server> + </configuration> - </plugin> - <plugin> - <groupId>org.mortbay.jetty</groupId> - <artifactId>maven-jetty-plugin</artifactId> - <configuration> - <connectors> - <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> - <port>8080</port> - <maxIdleTime>60000</maxIdleTime> - </connector> - </connectors> - <scanIntervalSeconds>10</scanIntervalSeconds> - <stopKey>tdar</stopKey> - <stopPort>12919</stopPort> - </configuration> - </plugin> - </plugins> - </build> - <profiles> - <profile> - <id>ant</id> - <build> - <defaultGoal>antrun:run</defaultGoal> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <goals> - <goal>load</goal> - </goals> - <configuration> - <tasks> - <!-- - can be invoked via - mvn -P ant -D target=initialize-data - --> - <property name="compile.classpath" refid="maven.compile.classpath"/> - <property name="runtime.classpath" refid="maven.runtime.classpath"/> - <property name="test.classpath" refid="maven.test.classpath"/> - <property name="plugin.classpath" refid="maven.plugin.classpath"/> - <ant antfile="${basedir}/init-db.ant.xml" inheritRefs="true" inheritAll="true"> - <target name="${target}"/> - </ant> - </tasks> - </configuration> - </plugin> - </plugins> - </build> - <dependencies> - <dependency> - <groupId>ant-contrib</groupId> - <artifactId>ant-contrib</artifactId> - <version>1.0b2</version> - </dependency> - </dependencies> - </profile> - </profiles> + </plugin> + <plugin> + <groupId>org.mortbay.jetty</groupId> + <artifactId>maven-jetty-plugin</artifactId> + <configuration> + <connectors> + <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> + <port>8080</port> + <maxIdleTime>60000</maxIdleTime> + </connector> + </connectors> + <scanIntervalSeconds>10</scanIntervalSeconds> + <stopKey>tdar</stopKey> + <stopPort>12919</stopPort> + </configuration> + </plugin> + </plugins> + </build> + <profiles> + <profile> + <id>ant</id> + <build> + <defaultGoal>antrun:run</defaultGoal> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <goals> + <goal>load</goal> + </goals> + <configuration> + <tasks> + <!-- + can be invoked via mvn -P ant -D target=initialize-data + --> + <property name="compile.classpath" refid="maven.compile.classpath" /> + <property name="runtime.classpath" refid="maven.runtime.classpath" /> + <property name="test.classpath" refid="maven.test.classpath" /> + <property name="plugin.classpath" refid="maven.plugin.classpath" /> + <ant antfile="${basedir}/init-db.ant.xml" inheritRefs="true" + inheritAll="true"> + <target name="${target}" /> + </ant> + </tasks> + </configuration> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>ant-contrib</groupId> + <artifactId>ant-contrib</artifactId> + <version>1.0b2</version> + </dependency> + </dependencies> + </profile> + </profiles> </project> Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartGame.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartGame.java 2009-08-21 23:37:51 UTC (rev 268) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartGame.java 2009-08-25 00:20:46 UTC (rev 269) @@ -70,12 +70,13 @@ //roundService.test(); - MessageBroker msgBroker = MessageBroker.getMessageBroker(null); + MessageBroker msgBroker = MessageBroker.getMessageBroker("_messageBroker"); String clientID = UUIDUtils.createUUID(); int i=0; - while (running) { + while (i<3) { i++; + String msgDestination = roundService.getCurrentGame().getDescription(); /*if(getCurrentModuleRoundConfig() == null) { setCurrentModuleRoundConfig(new ModuleRoundConfig()); @@ -84,19 +85,21 @@ //Push the first block to the clients AsyncMessage msg = new AsyncMessage(); - msg.setDestination("DataPush"); + msg.setDestination("mme"); //msg.setHeader("DSSubtopic", "hello"); msg.setClientId(clientID); msg.setMessageId(UUIDUtils.createUUID()); msg.setTimestamp(System.currentTimeMillis()); - System.out.println("in while loop: "); + +// System.out.println("in while loop: "); block = roundService.getBlock(); - System.out.println("after block "); - msg.setBody("Here is a block!!!" + block); + // System.out.println("after block "); + msg.setBody(block); + msgBroker.routeMessageToService(msg, null); System.out.println("Message broker is: "+ msgBroker); System.out.println("Message is: "+ block.getDescription()); - msgBroker.routeMessageToService(msg, null); - if(block.getDescription().equalsIgnoreCase("Day-by-day decisions game")) + + /* if(block.getDescription().equalsIgnoreCase("Day-by-day decisions game")) { //start day by day decision //getDayBydayDecisionService(). @@ -106,13 +109,13 @@ { //start communication round - } + }*/ //get the timer for the block Integer timer = roundService.getTimerforBlock(block); //start the timer for the block sent try { //for testing purpose 5000 is given as an argument - Thread.sleep(5000); + Thread.sleep(10000); if(block == null) { running = false; Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-08-21 23:37:51 UTC (rev 268) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-08-25 00:20:46 UTC (rev 269) @@ -62,7 +62,7 @@ public void startGame() { //push assign groups to all the students - assignGroups(); + //assignGroups(); //start the game this.startGame.run(); Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-08-21 23:37:51 UTC (rev 268) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-08-25 00:20:46 UTC (rev 269) @@ -26,7 +26,11 @@ <!-- Flex related information started --> - <flex:message-broker /> + <flex:message-broker> +<flex:message-service + default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" /> + +</flex:message-broker> <!-- XXX: Split these out into separate XML files and import them if this file gets too large --> <!-- spring managed daos --> @@ -109,7 +113,7 @@ <property name='moduleDao' ref='moduleDao'/> <property name='gameDao' ref='gameDao' /> <property name='moduleRoundDao' ref='moduleRoundDao' /> - <property name='blockDao' ref='blockDao'/> + <!-- <property name='blockDao' ref='blockDao'/> --> </bean> @@ -168,14 +172,17 @@ <!-- Expose services for Flex/BlazeDS remoting --> - <flex:remote-service ref="studentService" /> - <flex:remote-service ref="moduleService" /> - <flex:remote-service ref="questionCreatorService" /> - <flex:remote-service ref="roundService" /> - <flex:remote-service ref="startupService" /> - <flex:remote-service ref="answeringService" /> - <flex:remote-service ref="locationService" /> - <flex:remote-service ref="feed" /> + <flex:remoting-destination ref="studentService" /> + <flex:remoting-destination ref="moduleService" /> + <flex:remoting-destination ref="questionCreatorService" /> + <flex:remoting-destination ref="roundService" /> + <flex:remoting-destination ref="startupService" /> + <flex:remoting-destination ref="answeringService" /> + <flex:remoting-destination ref="locationService" /> + <flex:remoting-destination ref="feed" /> + + <!-- Expose services for Flex/BlazeDS messaging --> + <flex:message-destination id="mme" allow-subtopics="true" subtopic-separator="." /> <!-- Flex related information ended--> Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/flex/messaging-config.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/flex/messaging-config.xml 2009-08-21 23:37:51 UTC (rev 268) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/flex/messaging-config.xml 2009-08-25 00:20:46 UTC (rev 269) @@ -1,28 +1,34 @@ <?xml version="1.0" encoding="UTF-8"?> -<service id="message-service" - class="flex.messaging.services.MessageService" - messageTypes="flex.messaging.messages.AsyncMessage" > +<service id="message-service" class="flex.messaging.services.MessageService" + messageTypes="flex.messaging.messages.AsyncMessage"> - <adapters> - <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default ="true"/> - <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> --> - <adapter-definition id="DataPushAdapter" class="Feed"/> - </adapters> + <adapters> + <adapter-definition id="actionscript" + class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" + default="true" /> + <!-- + <adapter-definition id="jms" + class="flex.messaging.services.messaging.adapters.JMSAdapter"/> + --> + <adapter-definition id="DataPushAdapter" class="StartupService" /> + </adapters> - <default-channels> - <channel ref="my-polling-amf"/> - <channel ref="my-streaming-amf"/> - </default-channels> - - <destination id="DataPush"> -<channels> -<channel ref="my-polling-amf"/> -</channels> -<!--<adapter ref="DataPushAdapter"/> - ---></destination> - + <default-channels> + <channel ref="my-polling-amf" /> + <channel ref="my-streaming-amf" /> + </default-channels> - + <!--<destination id="mme"> + <properties> + <server> + <allow-subtopics>true</allow-subtopics> + <subtopic-separator>.</subtopic-separator> + </server> + </properties> + <channels> + <channel ref="my-streaming-amf" /> + </channels> + <adapter ref="DataPushAdapter"/> -</service> + </destination> --> + </service> Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/flex/services-config.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/flex/services-config.xml 2009-08-21 23:37:51 UTC (rev 268) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/flex/services-config.xml 2009-08-25 00:20:46 UTC (rev 269) @@ -39,6 +39,7 @@ <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="3"/> <user-agent match-on="Firefox" kickstart-bytes="2048" max-streaming-connections-per-session="3"/> </user-agent-settings> + </properties> </channel-definition> <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |