Author: gnodet
Date: Thu Oct 23 11:24:10 2008
New Revision: 707437
URL: http://svn.apache.org/viewvc?rev=707437&view=rev
Log:
Upgrade to latest gshell
Modified:
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/BeanContainerWrapper.java
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/resources/META-INF/spring/gshell-vfs.xml
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=707437&r1=707436&r2=707437&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:24:10 2008
@@ -16,15 +16,9 @@
*/
package org.apache.servicemix.kernel.gshell.core;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Proxy;
-
import org.apache.geronimo.gshell.application.ApplicationManager;
import org.apache.geronimo.gshell.application.ApplicationConfiguration;
import org.apache.geronimo.gshell.application.Application;
-import org.apache.geronimo.gshell.application.ApplicationSecurityManager;
import org.apache.geronimo.gshell.shell.Shell;
import org.apache.geronimo.gshell.wisdom.application.ShellCreatedEvent;
import org.apache.geronimo.gshell.event.EventPublisher;
@@ -73,51 +67,9 @@
log.debug("Created shell instance: {}", shell);
- InvocationHandler handler = new InvocationHandler()
- {
- //
- // FIXME: Need to resolve how to handle the security manager for
the application,
- // the SM is not thread-specific, but VM specific... so not
sure this is
- // the right approache at all :-(
- //
-
- private final ApplicationSecurityManager sm = new
ApplicationSecurityManager();
-
- public Object invoke(final Object proxy, final Method method,
final Object[] args) throws Throwable {
- assert proxy != null;
- assert method != null;
- // args may be null
-
- if (method.getDeclaringClass() == Object.class) {
- return method.invoke(this, args);
- }
-
- //
- // TODO: This would be a good place to inject the shell or the
shell context into a thread holder
- //
-
- final SecurityManager prevSM = System.getSecurityManager();
- System.setSecurityManager(sm);
- try {
- return method.invoke(shell, args);
- }
- catch (InvocationTargetException e) {
- throw e.getTargetException();
- }
- finally {
- System.setSecurityManager(prevSM);
- }
- }
- };
-
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Shell proxy = (Shell) Proxy.newProxyInstance(cl, new Class[] {
Shell.class }, handler);
-
- log.debug("Create shell proxy: {}", proxy);
-
- eventPublisher.publish(new ShellCreatedEvent(proxy));
+ eventPublisher.publish(new ShellCreatedEvent(shell));
- return proxy;
+ return shell;
}
}
Modified:
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/BeanContainerWrapper.java
URL:
http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/BeanContainerWrapper.java?rev=707437&r1=707436&r2=707437&view=diff
==============================================================================
---
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/BeanContainerWrapper.java
(original)
+++
servicemix/smx4/kernel/trunk/gshell/gshell-core/src/main/java/org/apache/servicemix/kernel/gshell/core/BeanContainerWrapper.java
Thu Oct 23 11:24:10 2008
@@ -99,11 +99,11 @@
return context.getBeanNamesForType(type);
}
- public BeanContainer createChild(String s, Collection<URL> urls) {
+ public BeanContainer createChild(Collection<URL> urls) {
throw new UnsupportedOperationException();
}
- public BeanContainer createChild(String s) {
+ public BeanContainer createChild() {
throw new UnsupportedOperationException();
}
}
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=707437&r1=707436&r2=707437&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:24:10 2008
@@ -117,7 +117,9 @@
</property>
</bean>
- <bean id="metaDataRegistry"
class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl"/>
+ <bean id="metaDataRegistry"
class="org.apache.geronimo.gshell.vfs.provider.meta.data.MetaDataRegistryImpl">
+ <constructor-arg ref="eventManager" />
+ </bean>
<bean id="metaFileProviderConfigurer"
class="org.apache.geronimo.gshell.vfs.config.FileProviderConfigurer">
<property name="fileSystemManager" ref="fileSystemManager"/>