servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r602105 - in /servicemix/branches/servicemix-4.0: ./ runtime/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ runtime/gshell/gshell-core/src/main/resources/META-INF/spring/
Date Fri, 07 Dec 2007 14:16:56 GMT
Author: gnodet
Date: Fri Dec  7 06:16:55 2007
New Revision: 602105

URL: http://svn.apache.org/viewvc?rev=602105&view=rev
Log:
Use non patched mina version and fix the remote shell closing

Added:
    servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringCloseShellHandler.java
Modified:
    servicemix/branches/servicemix-4.0/pom.xml
    servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml

Modified: servicemix/branches/servicemix-4.0/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/branches/servicemix-4.0/pom.xml?rev=602105&r1=602104&r2=602105&view=diff
==============================================================================
--- servicemix/branches/servicemix-4.0/pom.xml (original)
+++ servicemix/branches/servicemix-4.0/pom.xml Fri Dec  7 06:16:55 2007
@@ -82,7 +82,7 @@
         <pax.logging.version>0.9.8-SNAPSHOT</pax.logging.version>
         <servicemix3.version>3.2.1</servicemix3.version>
         <bundlerepository.version>1.1.0-SNAPSHOT</bundlerepository.version>
-        <mina.version>1.1.6-r601820-patched</mina.version>
+        <mina.version>1.1.6-r602102</mina.version>
     </properties>
 
     <repositories>

Added: servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringCloseShellHandler.java
URL: http://svn.apache.org/viewvc/servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringCloseShellHandler.java?rev=602105&view=auto
==============================================================================
--- servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringCloseShellHandler.java
(added)
+++ servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/remote/server/handler/SpringCloseShellHandler.java
Fri Dec  7 06:16:55 2007
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.gshell.remote.server.handler;
+
+import org.apache.geronimo.gshell.remote.message.CloseShellMessage;
+import org.apache.geronimo.gshell.remote.message.EchoMessage;
+import org.apache.geronimo.gshell.whisper.transport.Session;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: gnodet
+ * Date: Dec 7, 2007
+ * Time: 3:12:48 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class SpringCloseShellHandler
+    extends ServerMessageHandlerSupport<CloseShellMessage>
+{
+    public SpringCloseShellHandler() {
+        super(CloseShellMessage.class);
+    }
+
+    public void handle(final Session session, final ServerSessionContext context, final CloseShellMessage
message) throws Exception {
+        context.shell.close();
+        context.shell = null;
+
+        //
+        // TODO: Send a meaningful response
+        //
+
+        EchoMessage reply = new EchoMessage("CLOSE SHELL SUCCESS");
+        reply.setCorrelationId(message.getId());
+        session.send(reply);
+    }
+}
+

Modified: servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
URL: http://svn.apache.org/viewvc/servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml?rev=602105&r1=602104&r2=602105&view=diff
==============================================================================
--- servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
(original)
+++ servicemix/branches/servicemix-4.0/runtime/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
Fri Dec  7 06:16:55 2007
@@ -31,7 +31,7 @@
         <constructor-arg ref="transportFactoryLocator" />
         <constructor-arg>
             <list>
-                <bean class="org.apache.geronimo.gshell.remote.server.handler.CloseShellHandler"
/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.SpringCloseShellHandler"
/>
                 <bean class="org.apache.geronimo.gshell.remote.server.handler.ConnectHandler">
                     <constructor-arg ref="cryptoContext" />
                     <constructor-arg ref="timeoutManager" />



Mime
View raw message