Manuel L. Santillan | 168ab57 | 2006-09-12 16:38:16 +0000 | [diff] [blame] | 1 | Mishell provides an interactive console
|
| 2 | that executes scripts in different scripting languages.
|
| 3 | Running mishell:
|
| 4 | - Standalone:
|
| 5 | Mishell can be run directly with the "java -jar ${artifactId}-${version}.jar" idiom or as an OSGi bundle. Remember that in both cases
|
| 6 | JRE 6 is needed. Mishell provides some built-in commands and interprets ruby, javascript or any other language that you
|
| 7 | configure. You can also load scripts with the load command. Type 'help' for available commands.
|
| 8 | - Inside OSGi:
|
| 9 | You can see an example of configuring Felix for launching both Jmood and mishell in the same OSGi platform in the FelixLauncher
|
| 10 | class in the src/test/java dir. Remember to change the paths to match your installation.
|
| 11 |
|
| 12 | The initial object that is exported to the scripting engine is a JMoodProxyManager that extends
|
| 13 | the general-purpose MBeanProxyManager (from the jmxintrospector project) to simplify working with JMood.
|
| 14 | For example, when running on OSGi with JMood you can add the mbeans by typing:
|
| 15 | $manager.addLocalServer(nil) #Ruby
|
| 16 | or
|
| 17 | manager.addLocalServer(null) //Javascript
|
| 18 | And you issue commands like
|
| 19 | $manager.objects.each{|mbean| puts mbean.objectName} #this lists the objectnames for all mbeans known to the shell
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 | IMPORTANT:
|
| 25 | Dependencies that need to be manually installed:
|
| 26 | 1. It needs Java 6 to work (as it depends on javax.script API).
|
| 27 | Once that API is stable and released standalone, it should also work in Java 5.
|
| 28 | 2. It needs JMX introspector which in turn needs Javassist to be
|
| 29 | manually installed in your local maven repo.
|
| 30 | 3. It needs both the jruby-javax.script binding and Jruby 0.9 to be manually
|
| 31 | installed in the M2_REPO.
|
| 32 | - The binding is available at https://scripting.dev.java.net/ and licensed
|
| 33 | under the BSD license. Download the jsr223-engines.[zip|tar.gz]
|
| 34 | and install the jruby-engine.jar
|
| 35 | - JRuby is available at http://dist.codehaus.org/jruby/ under a tri-license: CPL/LGPL/GPL
|
| 36 | located at engines/jruby/build/jruby-engine.jar. JRuby implementation
|
| 37 | 4. If you want to use any other language, you should:
|
| 38 | - Install the binding and the implementation in M2_REPO. Use Jruby as an example to do it.
|
| 39 | - Add the dependencies to the pom.
|
| 40 |
|
| 41 |
|