ch.elca.el4j.services.debug
Class BshCommandLineLauncher
java.lang.Object
   ch.elca.el4j.services.debug.BshCommandLineLauncher
ch.elca.el4j.services.debug.BshCommandLineLauncher
- All Implemented Interfaces: 
- InitializingBean, ApplicationContextAware
- public class BshCommandLineLauncher 
- extends Object- implements ApplicationContextAware, InitializingBean
Class to evaluate a bsh string in a sub-shell of this JVM.
 Sample uses:
   java -Del4j.bsh.launchstr="server(2000);"   anyClass    makes the JVM accessible from
                                                           remote (std bean shell)
    * bsh.show=true; // shows output
    * debug();
    * see directory bsh.commands in the bsh.jar file for more ideas
  You can add scriptets in the directory /resources/mandatory: they are directly available as command.
 Scripts that could be added (ideas):
    * dump all cfg of spring app ctxt
    * regularly print mem and thread status (e.g. all 30'' to track issues)
    * status info about the JVM
    * save an object serialized to disk/ load it again
    * start a new spring bean
  
 
  How to demo this module:
   (1) Add the following to your MAVEN_OPTS environment variable:
          -Del4j.bsh.launchstr=server(2000); 
   (2) Add a dependency to this module. 
   (3) Launch your application 
   (4) Open in a browser the following URL: http://localhost:2000/remote/jconsole.html 
   (5) type   threadInfo();    ENTER       
    
 Limitation: cut and paste (with external info) is currently not supported.
- Author:
- Philipp H. Oser (POS)
- File-location:
- BshCommandLineLauncher
- Last check-in date:
- 2009-08-04 13:59:45 +0200 (Di, 04. Aug 2009)  by  swismer  for revision  3873 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
BSH_LAUNCH_STRING
public static final String BSH_LAUNCH_STRING
- See Also:
- Constant Field Values
BSH_SCRIPLET_CLASSPATH
public static final String BSH_SCRIPLET_CLASSPATH
- See Also:
- Constant Field Values
shell
protected ShellExecutorImpl shell
m_ac
protected ApplicationContext m_ac
BshCommandLineLauncher
public BshCommandLineLauncher()
getShellExecutor
public ShellExecutor getShellExecutor()
- 
 
- 
 
addScriptletClasspath
public void addScriptletClasspath(String cp)
- 
 
- 
 
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
- 
- Specified by:
- setApplicationContextin interface- ApplicationContextAware
 
- 
- Throws:
- BeansException
 
afterPropertiesSet
public void afterPropertiesSet()
                        throws Exception
- 
- Specified by:
- afterPropertiesSetin interface- InitializingBean
 
- 
- Throws:
- Exception
 
Copyright © 2005-2011 ELCA. All Rights Reserved.