You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/10/23 20:11:53 UTC
svn commit: r707432 - in /servicemix/smx4/kernel/trunk:
client/src/main/java/org/apache/servicemix/kernel/client/
gshell/gshell-config/src/main/resources/org/
gshell/gshell-config/src/main/resources/org/apache/
gshell/gshell-config/src/main/resources/o...
Author: gnodet
Date: Thu Oct 23 11:11:51 2008
New Revision: 707432
URL: http://svn.apache.org/viewvc?rev=707432&view=rev
Log:
Various fixes and improvements
Added:
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/CancelCommand.properties
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/EditCommand.properties
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/ListCommand.properties
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropDelCommand.properties
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropListCommand.properties
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropSetCommand.properties
servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/UpdateCommand.properties
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayException.properties
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayLog.properties
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/GetLogLevel.properties
servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/SetLogLevel.properties
Modified:
servicemix/smx4/kernel/trunk/client/src/main/java/org/apache/servicemix/kernel/client/Main.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/LocalConsole.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/OsgiCommandRegistry.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/remote/RshServerFactory.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-vfs.xml
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
Modified: servicemix/smx4/kernel/trunk/client/src/main/java/org/apache/servicemix/kernel/client/Main.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/client/src/main/java/org/apache/servicemix/kernel/client/Main.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/client/src/main/java/org/apache/servicemix/kernel/client/Main.java (original)
+++ servicemix/smx4/kernel/trunk/client/src/main/java/org/apache/servicemix/kernel/client/Main.java Thu Oct 23 11:11:51 2008
@@ -29,7 +29,9 @@
import org.apache.geronimo.gshell.whisper.transport.TransportException;
import org.apache.geronimo.gshell.whisper.transport.TransportFactory;
import org.apache.geronimo.gshell.whisper.transport.TransportFactoryLocator;
+import org.apache.geronimo.gshell.whisper.transport.Transport;
import org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransportFactory;
+import org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransport;
import org.apache.geronimo.gshell.whisper.stream.StreamFeeder;
import org.apache.geronimo.gshell.notification.ExitNotification;
import org.apache.geronimo.gshell.security.crypto.CryptoContextImpl;
@@ -126,11 +128,15 @@
}
private static class Locator implements TransportFactoryLocator {
- TcpTransportFactory factory = new TcpTransportFactory();
-
- public TransportFactory locate(URI arg0) throws TransportException {
- return factory;
+ public TransportFactory locate(URI uri) throws TransportException {
+ return new SimpleTcpTransportFactory();
}
}
+
+ private static class SimpleTcpTransportFactory extends TcpTransportFactory {
+ protected TcpTransport createTransport() {
+ return new TcpTransport();
+ }
+ }
}
Added: servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/CancelCommand.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/CancelCommand.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/CancelCommand.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/CancelCommand.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Change the changes to the configuration being edited.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/EditCommand.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/EditCommand.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/EditCommand.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/EditCommand.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Create or edit a configuration.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/ListCommand.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/ListCommand.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/ListCommand.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/ListCommand.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=List existing configurations.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropDelCommand.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropDelCommand.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropDelCommand.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropDelCommand.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Delete a property from the edited configuration.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropListCommand.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropListCommand.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropListCommand.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropListCommand.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=List properties from the edited configuration.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropSetCommand.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropSetCommand.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropSetCommand.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/PropSetCommand.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Set a property on the edited configuration.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/UpdateCommand.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/UpdateCommand.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/UpdateCommand.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-config/src/main/resources/org/apache/servicemix/kernel/gshell/config/UpdateCommand.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Save and propagate changes from the configuration being edited.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/pom.xml Thu Oct 23 11:11:51 2008
@@ -45,6 +45,7 @@
org.aopalliance.aop,
org.apache.commons.vfs.provider.temp,
org.apache.commons.vfs.provider.ram,
+ org.apache.ivy*;resolution:=optional,
org.apache.servicemix.kernel.jaas.config;resolution:=optional,
org.apache.servicemix.kernel.main.spi;resolution:=optional;version="1.0.0",
com.thoughtworks.xstream*;resolution:=optional,
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationImpl.java Thu Oct 23 11:11:51 2008
@@ -24,7 +24,7 @@
import org.apache.geronimo.gshell.application.ClassPath;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.command.Variables;
-import org.apache.geronimo.gshell.model.application.ApplicationModel;
+import org.apache.geronimo.gshell.application.model.ApplicationModel;
public class ApplicationImpl implements Application {
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ApplicationManagerImpl.java Thu Oct 23 11:11:51 2008
@@ -45,14 +45,17 @@
private final Logger log = LoggerFactory.getLogger(getClass());
- @Autowired
private EventPublisher eventPublisher;
- @Autowired
private Application application;
private ApplicationContext applicationContext;
+ public ApplicationManagerImpl(EventPublisher eventPublisher, Application application) {
+ this.eventPublisher = eventPublisher;
+ this.application = application;
+ }
+
@PostConstruct
public void init() throws Exception {
if (!SystemOutputHijacker.isInstalled()) {
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/CommandBundle.java Thu Oct 23 11:11:51 2008
@@ -10,6 +10,8 @@
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.ApplicationContext;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.apache.geronimo.gshell.command.Command;
@@ -19,14 +21,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class CommandBundle implements BundleContextAware, InitializingBean, DisposableBean {
+public class CommandBundle implements BundleContextAware, InitializingBean, DisposableBean, ApplicationContextAware {
private final Logger log = LoggerFactory.getLogger(getClass());
- @Autowired(required = false)
private CommandRegistry commandRegistry;
- @Autowired(required = false)
private AliasRegistry aliasRegistry;
private BundleContext bundleContext;
@@ -35,11 +35,17 @@
private Map<String,String> aliases;
+ private ApplicationContext applicationContext;
+
private List<ServiceRegistration> registrations = new ArrayList<ServiceRegistration>();
public CommandBundle() {
}
+ public void setApplicationContext(ApplicationContext applicationContext) {
+ this.applicationContext = applicationContext;
+ }
+
public List<Command> getCommands() {
return commands;
}
@@ -66,6 +72,18 @@
public void afterPropertiesSet() throws Exception {
log.debug("Initializing command bundle");
+ if (commandRegistry == null) {
+ String[] names = applicationContext.getBeanNamesForType(CommandRegistry.class);
+ if (names.length == 1) {
+ commandRegistry = (CommandRegistry) applicationContext.getBean(names[0], CommandRegistry.class);
+ }
+ }
+ if (aliasRegistry == null) {
+ String[] names = applicationContext.getBeanNamesForType(AliasRegistry.class);
+ if (names.length == 1) {
+ aliasRegistry = (AliasRegistry) applicationContext.getBean(names[0], AliasRegistry.class);
+ }
+ }
if (commandRegistry != null && aliasRegistry != null) {
log.debug("Command bundle is using the auto wired command/alias registry");
for (Command command : commands) {
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/LocalConsole.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/LocalConsole.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/LocalConsole.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/LocalConsole.java Thu Oct 23 11:11:51 2008
@@ -1,16 +1,24 @@
package org.apache.servicemix.kernel.gshell.core;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.Arrays;
+
import javax.annotation.PreDestroy;
import javax.annotation.PostConstruct;
import org.apache.geronimo.gshell.shell.Shell;
import org.apache.geronimo.gshell.notification.ExitNotification;
+import org.apache.servicemix.kernel.main.spi.MainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.osgi.context.BundleContextAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.FrameworkListener;
+import org.osgi.framework.FrameworkEvent;
public class LocalConsole implements Runnable, BundleContextAware {
@@ -22,6 +30,10 @@
private BundleContext bundleContext;
+ private MainService mainService;
+
+ private CountDownLatch frameworkStarted;
+
public BundleContext getBundleContext() {
return bundleContext;
}
@@ -30,6 +42,14 @@
this.bundleContext = bundleContext;
}
+ public MainService getMainService() {
+ return mainService;
+ }
+
+ public void setMainService(MainService mainService) {
+ this.mainService = mainService;
+ }
+
public Shell getShell() {
return shell;
}
@@ -48,6 +68,15 @@
@PostConstruct
public void init() {
+ frameworkStarted = new CountDownLatch(1);
+ getBundleContext().addFrameworkListener(new FrameworkListener(){
+ public void frameworkEvent(FrameworkEvent event) {
+ log.debug("Got event: " + event.getType());
+ if( event.getType() == FrameworkEvent.STARTED ) {
+ frameworkStarted.countDown();
+ }
+ }
+ });
if (createLocalShell) {
new Thread(this, "localShell").start();
}
@@ -62,22 +91,70 @@
public void run() {
try {
- shell.run();
- } catch (ExitNotification e) {
- new Thread() {
- public void run() {
- try {
- Bundle bundle = getBundleContext().getBundle(0);
- bundle.stop();
- } catch (Exception e) {
- log.error("Error when shutting down ServiceMix Kernel", e);
+ String[] args = mainService.getArgs();
+ // If a command was specified on the command line, then just execute that command.
+ if (args != null && args.length > 0) {
+ waitForFrameworkToStart();
+ log.info("Executing Shell with arguments: " + Arrays.toString(args));
+ StringBuilder sb = new StringBuilder();
+ for (String arg : args) {
+ sb.append(arg).append(" ");
+ }
+ Object value = shell.execute(sb.toString());
+ if (mainService != null) {
+ if (value instanceof Number) {
+ mainService.setExitCode(((Number) value).intValue());
+ } else {
+ mainService.setExitCode(value != null ? 1 : 0);
}
+ log.info("Exiting shell due to terminated command");
}
- }.start();
+ } else {
+ shell.run();
+ }
+ } catch (ExitNotification e) {
+ if (mainService != null) {
+ mainService.setExitCode(0);
+ }
+ log.info("Exiting shell due received exit notification");
} catch (Throwable e) {
- log.error("Error running shell", e);
+ if (mainService != null) {
+ mainService.setExitCode(-1);
+ }
+ log.error("Exiting shell due to caught exception " + e, e);
} finally {
- shell.close();
+ try {
+ shell.close();
+ } catch (Throwable t) {}
+ asyncShutdown();
}
}
+
+ /**
+ * Blocks until the framework has finished starting. We do this so that any installed
+ * bundles for commands get fully registered.
+ *
+ * @throws InterruptedException
+ */
+ private void waitForFrameworkToStart() throws InterruptedException {
+ log.info("Waiting from framework to start.");
+ if (frameworkStarted.await(60, TimeUnit.SECONDS)) {
+ log.info("System completed startup.");
+ } else {
+ log.warn("System took too long startup... continuing");
+ }
+ }
+
+ private void asyncShutdown() {
+ new Thread() {
+ public void run() {
+ try {
+ getBundleContext().getBundle(0).stop();
+ } catch (BundleException e) {
+ log.info("Caught exception while shutting down framework: " + e, e);
+ }
+ }
+ }.start();
+ }
+
}
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/OsgiCommandRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/OsgiCommandRegistry.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/OsgiCommandRegistry.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/OsgiCommandRegistry.java Thu Oct 23 11:11:51 2008
@@ -10,9 +10,12 @@
public static final String NAME = "name";
- @Autowired
private CommandRegistry commandRegistry;
+ public OsgiCommandRegistry(CommandRegistry commandRegistry) {
+ this.commandRegistry = commandRegistry;
+ }
+
public void register(final Command command, Map<String, ?> properties) throws Exception {
commandRegistry.registerCommand(command);
}
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/ServiceMixBranding.java Thu Oct 23 11:11:51 2008
@@ -22,7 +22,7 @@
import org.apache.geronimo.gshell.ansi.Buffer;
import org.apache.geronimo.gshell.ansi.Code;
import org.apache.geronimo.gshell.ansi.RenderWriter;
-import org.apache.geronimo.gshell.model.application.Branding;
+import org.apache.geronimo.gshell.application.model.Branding;
public class ServiceMixBranding extends Branding {
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/commands/InfoAction.java Thu Oct 23 11:11:51 2008
@@ -15,18 +15,17 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.geronimo.gshell.command.CommandAction;
-import org.apache.geronimo.gshell.command.CommandContext;
import org.apache.geronimo.gshell.ansi.Renderer;
import org.apache.geronimo.gshell.ansi.Code;
-import org.apache.geronimo.gshell.model.application.Branding;
+import org.apache.geronimo.gshell.application.model.Branding;
+import org.apache.geronimo.gshell.command.CommandAction;
+import org.apache.geronimo.gshell.command.CommandContext;
import org.apache.geronimo.gshell.io.IO;
-import org.springframework.beans.factory.annotation.Autowired;
import org.codehaus.plexus.util.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
public class InfoAction implements CommandAction {
- @Autowired
private Branding branding;
private IO io;
@@ -35,10 +34,12 @@
private NumberFormat fmtI = new DecimalFormat("###,###", new DecimalFormatSymbols(Locale.ENGLISH));
private NumberFormat fmtD = new DecimalFormat("###,##0.000", new DecimalFormatSymbols(Locale.ENGLISH));
+ public InfoAction(Branding branding) {
+ this.branding = branding;
+ }
+
public Object execute(CommandContext context) throws Exception {
int maxNameLen;
- String name;
- Map<String, String> props = new HashMap<String, String>();
RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
OperatingSystemMXBean os = ManagementFactory.getOperatingSystemMXBean();
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/config/CommandParser.java Thu Oct 23 11:11:51 2008
@@ -420,6 +420,7 @@
for (Element child : children) {
BeanDefinitionBuilder link = BeanDefinitionBuilder.rootBeanDefinition(LinkCommand.class);
+ link.addConstructorArgReference("commandRegistry");
link.addConstructorArgValue(child.getAttribute(TARGET));
String name = child.getAttribute(NAME);
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/remote/RshServerFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/remote/RshServerFactory.java?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/remote/RshServerFactory.java (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/remote/RshServerFactory.java Thu Oct 23 11:11:51 2008
@@ -10,13 +10,16 @@
public class RshServerFactory {
- @Autowired
private RshServer server;
private String location;
private boolean start;
+ public RshServerFactory(RshServer server) {
+ this.server = server;
+ }
+
public String getLocation() {
return location;
}
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-commands.xml Thu Oct 23 11:11:51 2008
@@ -33,11 +33,15 @@
<gshell:command-bundle>
<gshell:command name="about">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtins.AboutAction"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.builtins.AboutAction">
+ <constructor-arg ref="applicationManager"/>
+ </gshell:action>
</gshell:command>
<gshell:command name="help">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtins.HelpAction"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.builtins.HelpAction">
+ <constructor-arg ref="commandResolver"/>
+ </gshell:action>
<gshell:completers>
<bean class="org.apache.geronimo.gshell.console.completer.AggregateCompleter">
<constructor-arg>
@@ -72,7 +76,10 @@
</gshell:command>
<gshell:command name="source">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtins.SourceAction"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.builtins.SourceAction">
+ <constructor-arg ref="commandLineExecutor"/>
+ <constructor-arg ref="fileSystemAccess"/>
+ </gshell:action>
<gshell:completers>
<ref bean="fileObjectNameCompleter"/>
<null/>
@@ -86,17 +93,21 @@
<gshell:command name="unset">
<gshell:action class="org.apache.geronimo.gshell.commands.builtins.UnsetAction"/>
<gshell:completers>
- <bean class="org.apache.geronimo.gshell.wisdom.completer.VariableNameCompleter"/>
+ <ref bean="variableNameCompleter"/>
<null/>
</gshell:completers>
</gshell:command>
<gshell:command name="alias">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtins.AliasAction"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.builtins.AliasAction">
+ <constructor-arg ref="aliasRegistry"/>
+ </gshell:action>
</gshell:command>
<gshell:command name="unalias">
- <gshell:action class="org.apache.geronimo.gshell.commands.builtins.UnaliasAction"/>
+ <gshell:action class="org.apache.geronimo.gshell.commands.builtins.UnaliasAction">
+ <constructor-arg ref="aliasRegistry"/>
+ </gshell:action>
<gshell:completers>
<ref bean="aliasNameCompleter"/>
<null/>
@@ -108,7 +119,9 @@
</gshell:command>
<gshell:command name="info">
- <gshell:action class="org.apache.servicemix.kernel.gshell.core.commands.InfoAction" />
+ <gshell:action class="org.apache.servicemix.kernel.gshell.core.commands.InfoAction">
+ <constructor-arg ref="branding" />
+ </gshell:action>
</gshell:command>
</gshell:command-bundle>
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-local.xml Thu Oct 23 11:11:51 2008
@@ -29,16 +29,14 @@
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi.xsd">
+ <bean id="localShell" factory-bean="applicationManager" factory-method="create"/>
- <!--
- <osgi:reference id="mainService" interface="org.apache.servicemix.kernel.main.spi.MainService" />
+ <osgi:reference id="mainService" interface="org.apache.servicemix.kernel.main.spi.MainService"/>
- <bean id="gshell" class="org.apache.geronimo.gshell.spring.GShell"
- init-method="start" destroy-method="stop">
- <constructor-arg ref="interactiveShell" />
- <property name="start" value="${startLocalConsole}" />
+ <bean id="localConsole" class="org.apache.servicemix.kernel.gshell.core.LocalConsole">
+ <property name="createLocalShell" value="${startLocalConsole}"/>
+ <property name="shell" ref="localShell"/>
<property name="mainService" ref="mainService" />
</bean>
- -->
</beans>
\ No newline at end of file
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-osgi.xml Thu Oct 23 11:11:51 2008
@@ -32,7 +32,9 @@
http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd">
- <bean id="osgiCommandRegistry" class="org.apache.servicemix.kernel.gshell.core.OsgiCommandRegistry" />
+ <bean id="osgiCommandRegistry" class="org.apache.servicemix.kernel.gshell.core.OsgiCommandRegistry">
+ <constructor-arg ref="commandRegistry" />
+ </bean>
<osgi:list id="osgiCommands" interface="org.apache.geronimo.gshell.command.Command" cardinality="0..N">
<osgi:listener ref="osgiCommandRegistry" bind-method="register" unbind-method="unregister" />
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-remote.xml Thu Oct 23 11:11:51 2008
@@ -35,10 +35,17 @@
<bean id="timeoutManager" class="org.apache.geronimo.gshell.remote.server.timeout.TimeoutManagerImpl" lazy-init="true"/>
<bean id="rshServer" class="org.apache.geronimo.gshell.remote.server.RshServer" scope="prototype">
+ <constructor-arg ref="timeoutManager"/>
+ <constructor-arg ref="transportFactoryLocator"/>
<constructor-arg>
<list>
- <bean class="org.apache.geronimo.gshell.remote.server.handler.ConnectHandler"/>
- <bean class="org.apache.geronimo.gshell.remote.server.handler.LoginHandler"/>
+ <bean class="org.apache.geronimo.gshell.remote.server.handler.ConnectHandler">
+ <constructor-arg ref="cryptoContext"/>
+ <constructor-arg ref="timeoutManager"/>
+ </bean>
+ <bean class="org.apache.geronimo.gshell.remote.server.handler.LoginHandler">
+ <constructor-arg ref="timeoutManager"/>
+ </bean>
<bean class="org.apache.servicemix.kernel.gshell.core.remote.OpenShellHandler"/>
<bean class="org.apache.geronimo.gshell.remote.server.handler.ExecuteHandler"/>
<bean class="org.apache.geronimo.gshell.remote.server.handler.CloseShellHandler"/>
@@ -47,9 +54,13 @@
</constructor-arg>
</bean>
- <bean id="remoteShell" class="org.apache.geronimo.gshell.remote.server.RemoteShellImpl" scope="prototype"/>
+ <bean id="remoteShell" class="org.apache.geronimo.gshell.remote.server.RemoteShellImpl" scope="prototype">
+ <constructor-arg ref="commandLineExecutor"/>
+ </bean>
<bean class="org.apache.geronimo.gshell.remote.client.RshClient" scope="prototype">
+ <constructor-arg ref="cryptoContext"/>
+ <constructor-arg ref="transportFactoryLocator"/>
<constructor-arg>
<list>
<bean class="org.apache.geronimo.gshell.remote.client.handler.EchoHandler"/>
@@ -107,6 +118,7 @@
<bean id="rshServerFactory" class="org.apache.servicemix.kernel.gshell.core.remote.RshServerFactory">
+ <constructor-arg ref="rshServer" />
<property name="location" value="${remoteShellLocation}" />
<property name="start" value="${startRemoteShell}" />
</bean>
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-vfs.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-vfs.xml?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-vfs.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-vfs.xml Thu Oct 23 11:11:51 2008
@@ -28,16 +28,14 @@
http://servicemix.apache.org/schema/servicemix-gshell
http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
- <bean id="metaFileProviderConfigurer" class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
- <property name="scheme" value="meta"/>
- <property name="provider">
- <bean class="org.apache.geronimo.gshell.vfs.provider.meta.MetaFileProvider"/>
- </property>
+ <bean id="fileSystemAccess" class="org.apache.geronimo.gshell.vfs.FileSystemAccessImpl">
+ <constructor-arg ref="applicationManager"/>
+ <constructor-arg ref="fileSystemManager"/>
</bean>
- <bean id="fileSystemAccess" class="org.apache.geronimo.gshell.vfs.FileSystemAccessImpl"/>
-
- <bean id="fileObjectNameCompleter" class="org.apache.geronimo.gshell.vfs.FileObjectNameCompleter"/>
+ <bean id="fileObjectNameCompleter" class="org.apache.geronimo.gshell.vfs.FileObjectNameCompleter">
+ <constructor-arg ref="fileSystemAccess"/>
+ </bean>
<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
<property name="customEditors">
@@ -84,6 +82,7 @@
</bean>
<bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="tmp"/>
<property name="provider">
<bean class="org.apache.commons.vfs.provider.temp.TemporaryFileProvider"/>
@@ -91,6 +90,7 @@
</bean>
<bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="ram"/>
<property name="provider">
<bean class="org.apache.commons.vfs.provider.ram.RamFileProvider"/>
@@ -98,10 +98,31 @@
</bean>
<bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <property name="fileSystemManager" ref="fileSystemManager"/>
+ <property name="scheme" value="file"/>
+ <property name="provider">
+ <bean class="org.apache.geronimo.gshell.vfs.provider.local.LocalFileProvider"/>
+ </property>
+ </bean>
+
+ <bean class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <property name="fileSystemManager" ref="fileSystemManager"/>
<property name="scheme" value="mvn"/>
<property name="provider">
<bean class="org.apache.servicemix.kernel.gshell.core.vfs.mvn.MvnFileProvider"/>
</property>
</bean>
+ <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"/>
+
+ <bean id="metaFileProviderConfigurer" class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
+ <property name="fileSystemManager" ref="fileSystemManager"/>
+ <property name="scheme" value="meta"/>
+ <property name="provider">
+ <bean class="org.apache.geronimo.gshell.vfs.provider.meta.MetaFileProvider">
+ <constructor-arg ref="metaDataRegistry"/>
+ </bean>
+ </property>
+ </bean>
+
</beans>
\ No newline at end of file
Modified: servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml?rev=707432&r1=707431&r2=707432&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml (original)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell.xml Thu Oct 23 11:11:51 2008
@@ -19,62 +19,91 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
+ xmlns:util="http://www.springframework.org/schema/util" xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://servicemix.apache.org/schema/servicemix-gshell
- http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
+ http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd
+ http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd">
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"/>
- <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>
<bean id="io" class="org.apache.geronimo.gshell.io.IO">
- <property name="verbosity" value="DEBUG" />
+ <property name="verbosity" value="DEBUG"/>
</bean>
+ <bean id="branding" class="org.apache.servicemix.kernel.gshell.core.ServiceMixBranding"/>
+
<bean id="application" class="org.apache.servicemix.kernel.gshell.core.ApplicationImpl">
- <property name="id" value="servicemix" />
- <property name="io" ref="io" />
+ <property name="id" value="servicemix"/>
+ <property name="io" ref="io"/>
<property name="model">
- <bean class="org.apache.geronimo.gshell.model.application.ApplicationModel">
+ <bean class="org.apache.geronimo.gshell.application.model.ApplicationModel">
<!-- TODO: fix version -->
- <property name="version" value="1.0.0" />
- <property name="branding" ref="branding" />
+ <property name="version" value="1.0.0"/>
+ <property name="branding" ref="branding"/>
</bean>
</property>
<property name="variables">
- <bean class="org.apache.geronimo.gshell.command.Variables" />
+ <bean class="org.apache.geronimo.gshell.command.Variables"/>
</property>
</bean>
- <bean id="branding" class="org.apache.servicemix.kernel.gshell.core.ServiceMixBranding" />
-
<bean id="eventManager" class="org.apache.geronimo.gshell.event.EventManagerImpl"/>
+ <bean id="applicationManager" class="org.apache.servicemix.kernel.gshell.core.ApplicationManagerImpl">
+ <constructor-arg ref="eventManager" />
+ <constructor-arg ref="application" />
+ </bean>
+
<bean id="commandLineParser" class="org.apache.geronimo.gshell.parser.CommandLineParser"/>
- <bean id="aliasRegistry" class="org.apache.geronimo.gshell.wisdom.registry.AliasRegistryImpl"/>
+ <bean id="aliasRegistry" class="org.apache.geronimo.gshell.wisdom.registry.AliasRegistryImpl">
+ <constructor-arg ref="eventManager"/>
+ </bean>
- <bean id="aliasMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.AliasMetaMapper"/>
+ <bean id="aliasMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.AliasMetaMapper">
+ <constructor-arg ref="eventManager"/>
+ <constructor-arg ref="metaDataRegistry"/>
+ <constructor-arg ref="aliasRegistry"/>
+ </bean>
- <bean id="commandRegistry" class="org.apache.geronimo.gshell.wisdom.registry.CommandRegistryImpl"/>
+ <bean id="commandRegistry" class="org.apache.geronimo.gshell.wisdom.registry.CommandRegistryImpl">
+ <constructor-arg ref="eventManager"/>
+ </bean>
- <bean id="commandMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.CommandMetaMapper"/>
+ <bean id="commandMetaMapper" class="org.apache.geronimo.gshell.wisdom.registry.CommandMetaMapper">
+ <constructor-arg ref="eventManager"/>
+ <constructor-arg ref="metaDataRegistry"/>
+ <constructor-arg ref="commandRegistry"/>
+ </bean>
- <bean id="commandResolver" class="org.apache.geronimo.gshell.wisdom.registry.CommandResolverImpl"/>
+ <bean id="commandResolver" class="org.apache.geronimo.gshell.wisdom.registry.CommandResolverImpl">
+ <constructor-arg ref="fileSystemAccess"/>
+ </bean>
- <bean class="org.apache.geronimo.gshell.wisdom.command.AliasCommand" scope="prototype"/>
+ <bean class="org.apache.geronimo.gshell.wisdom.command.AliasCommand" scope="prototype">
+ <constructor-arg ref="commandLineExecutor"/>
+ </bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.GroupCommand" scope="prototype"/>
- <bean id="commandLineBuilder" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl"/>
+ <bean id="commandLineBuilder" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl">
+ <constructor-arg ref="commandLineParser"/>
+ </bean>
- <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl"/>
+ <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl">
+ <constructor-arg ref="commandResolver"/>
+ <constructor-arg ref="commandLineBuilder"/>
+ </bean>
<bean id="shell" class="org.apache.geronimo.gshell.wisdom.shell.ShellImpl" scope="prototype">
+ <constructor-arg ref="application"/>
+ <constructor-arg ref="commandLineExecutor"/>
+
<property name="completers">
<list>
<ref bean="commandsCompleter"/>
@@ -82,31 +111,45 @@
</list>
</property>
<property name="prompter">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl"/>
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsolePrompterImpl">
+ <constructor-arg ref="application"/>
+ </bean>
</property>
<property name="errorHandler">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl"/>
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.ConsoleErrorHandlerImpl">
+ <constructor-arg ref="eventManager"/>
+ <constructor-arg ref="application"/>
+ </bean>
</property>
<property name="history">
- <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl"/>
+ <bean class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl">
+ <constructor-arg ref="application"/>
+ </bean>
</property>
</bean>
- <bean id="commandNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandNameCompleter"/>
-
- <bean id="aliasNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.AliasNameCompleter"/>
-
- <bean id="commandsCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandsCompleter"/>
-
- <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"/>
+ <bean id="commandNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandNameCompleter"
+ lazy-init="true">
+ <constructor-arg ref="eventManager"/>
+ <constructor-arg ref="commandRegistry"/>
+ </bean>
- <bean id="applicationManager" class="org.apache.servicemix.kernel.gshell.core.ApplicationManagerImpl" />
+ <bean id="aliasNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.AliasNameCompleter"
+ lazy-init="true">
+ <constructor-arg ref="eventManager"/>
+ <constructor-arg ref="aliasRegistry"/>
+ </bean>
- <bean id="localShell" factory-bean="applicationManager" factory-method="create" />
+ <bean id="commandsCompleter" class="org.apache.geronimo.gshell.wisdom.completer.CommandsCompleter" lazy-init="true">
+ <constructor-arg ref="eventManager"/>
+ <constructor-arg ref="commandRegistry"/>
+ </bean>
- <bean id="localConsole" class="org.apache.servicemix.kernel.gshell.core.LocalConsole">
- <property name="createLocalShell" value="${startLocalConsole}" />
- <property name="shell" ref="localShell" />
+ <bean id="variableNameCompleter" class="org.apache.geronimo.gshell.wisdom.completer.VariableNameCompleter"
+ lazy-init="true">
+ <constructor-arg ref="applicationManager"/>
</bean>
+ <bean id="metaDataRegistry" class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"/>
+
</beans>
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayException.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayException.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayException.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayException.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Display the last exception from the log.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayLog.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayLog.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayLog.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/DisplayLog.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Display log entries.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file
Added: servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/GetLogLevel.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/GetLogLevel.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/GetLogLevel.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/GetLogLevel.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Show log level.
+
+command.manual=\
+ TODO: date manual
Added: servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/SetLogLevel.properties
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/SetLogLevel.properties?rev=707432&view=auto
==============================================================================
--- servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/SetLogLevel.properties (added)
+++ servicemix/smx4/kernel/trunk/gshell/gshell-log/src/main/resources/org/apache/servicemix/kernel/gshell/log/SetLogLevel.properties Thu Oct 23 11:11:51 2008
@@ -0,0 +1,27 @@
+##
+## 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.
+##
+
+##
+## $Rev: 703511 $ $Date: 2008-10-10 18:07:36 +0200 (Fri, 10 Oct 2008) $
+##
+
+command.description=Set log level.
+
+command.manual=\
+ TODO: date manual
\ No newline at end of file