VTS中使用Equinox Console

1. 启动Equinox Console

    对user region and kernel,VTS均提供了支持。

    (1)userregion:修改user region shell port:修改repository/ext下的: osgi.console.telnet.properties

    osgi.console.ssh.properties;

    (2)kernel:修改config目录下的 osgi.console.telnet.propertiesosgi.console.ssh.properties;

    若需上述端口的修改生效,需要修改enabled的值为true。

    (3)连接:telnet localhost 2501

2. Using the Equinox Console Extension (vsh)

    调用Equinox Console Extension 命令:vsh help
3. Equinox Console Extension Subcommand Reference

    (1)bundel:挂不能力部署到VTS中的BUndle的生命周期并获取Bundle依赖的信息

    浏览所有安装的Bundle:vsh bundle list

    查看Bundle的Header信息:vsh bundle examine 118

    (2)config:浏览并管理安装至VTS中的configuration artifacts

    浏览已经安装的configuration artifacts:vsh config list

    查看某个configuration artifacts的属性或当前值:vsh config examine org.eclipse.virgo.repository

    (3)package:浏览或查看VTS中所有Bundle的完整包

    浏览所有Export的Package:vsh package list

    浏览某个Bundle的Package:vsh package examine org.slf4j 1.6.1

    (4)par:浏览VTS中所有已经安装的PARs,并管理它的生命周期

    查看已经安装的:vsh par list

    查看某个Par信息:vsh par examine org.eclipse.virgo.apps.repository 3.0.0.RELEASE

    刷新某个Par:vsh par refresh org.eclipse.virgo.apps.repository 3.0.0.RELEASE

    (5)plan:浏览VTS中所有已经安装的plans,并管理它的生命周期

    查看已经安装的:vsh plan list

    查看某个Plan信息:vsh plan examine org.eclipse.virgo.web.tomcat 3.0.0

    停止某个Par:vsh plan stop org.eclipse.virgo.web.tomcat 3.0.0

    启动某个Par:vsh plan start org.eclipse.virgo.web.tomcat 3.0.0

    (6)service:查看VTS的OSGi service registry中已经注册的Service

    查看所有已经注册的服务:vsh service list

    查看摸个特定的Service信息:vsh service examine 268

    (7)install:部署一个Artifact(bundle,PAR,plan,configuration)至服务器

    安装swf-booking-mvc.war:vsh install file://home/apps/swf-booking-mvc.war ,安装完后,VTS会判断当

    前安装的Artifact依赖是否满足,如果满足,则状态为Resolved。

    从发VTS Repository中安装:vsh install repository:bundle/my.bundle/1.0

    (8)shutdown

    (9)help

    查看某个命令的信息:vsh help bundle

    (10)exit

4. Class Loading Commands

    共三个:clhas,clexport,clload

    (1)clhas:列出VTS中的Bundle包含指定参数的类名

    clhas javax.servelt.Servlet

    (2)clexport:检查指定的类是否包含在某个Bundle中,如果类没找到,但是Package被Export,则提示:

    [class not found,package only]

    clexport java.servlet.Servlet

    (3)clload:列出Bundle成功加载的类以及提供该类的Bundle

    列出加载javax.servlet.Servlet类的Bundle:clload javax.servlet.Servlet

    检查Bundle Id为72的Bundle是否Export指定的类:clload javax.servlet.Servlet 72

    或者通过下面的反方式:clload javax.servlet.Servlet com.springsource.org.apache.commons.fileupload

5. For PARs and plans, the Admin Console also displays whether the artifact is:

    Scope: Scoping specifies whether Web Server should deploy the members of the PAR/plan in their

    own scope; when scoping is disabled, Web Server deploys the artifacts into the global scope and
    they are accessible by all other artifacts.

    Atomic: When a PAR/plan is atomic, Web Server manages the lifecycle of all its member artifacts
    as a single entity, which means if one artifact member is started, then Web Server starts all the

    PAR/plan artifacts. If one artifact fails to start, then Web Server stops all other artifacts in the

    PAR/plan.

你可能感兴趣的:(equinox)