serviceMix(karaf)中常用命令

1、查看命令

headers bundlerId 可以查看包的詳細信息,包括可以引入什麼包和暴露什麼包

smx@root> headers 800

Apache Commons Logging (594)
----------------------------
Archiver-Version = Plexus Archiver
Implementation-Title = Apache Commons Logging
X-Compile-Source-JDK = 1.2
Specification-Version = 1.2
Implementation-Version = 1.2
Created-By = Apache Maven Bundle Plugin
Manifest-Version = 1.0
Bnd-LastModified = 1404583913415
X-Compile-Target-JDK = 1.2
Include-Resource = META-INF/NOTICE.txt=NOTICE.txt,META-INF/LICENSE.txt=LICENSE.txt
Implementation-Vendor-Id = org.apache
Build-Jdk = 1.7.0_55
Specification-Vendor = The Apache Software Foundation
Implementation-Vendor = The Apache Software Foundation
Implementation-Build = tags/LOGGING_1_2_RC2@r1608092; 2014-07-05 20:11:44+0200
Specification-Title = Apache Commons Logging
Built-By = tn
Tool = Bnd-2.1.0.20130426-122213

Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion = 2
Bundle-SymbolicName = org.apache.commons.logging
Bundle-Version = 1.2.0
Bundle-Name = Apache Commons Logging
Bundle-Description = Apache Commons Logging is a thin adapter allowing configurable bridging to other,    well known logging systems.
Bundle-DocURL = http://commons.apache.org/proper/commons-logging/
Bundle-Vendor = The Apache Software Foundation

Export-Package = 
	org.apache.commons.logging;version=1.2,
	org.apache.commons.logging.impl;version=1.2
Import-Package = 
	javax.servlet;resolution:=optional;version="[2.1.0,3.0.0)",
	org.apache.avalon.framework.logger;resolution:=optional;version="[4.1.3,4.1.5]",
	org.apache.log;resolution:=optional;version="[1.0.1,1.0.1]",
	org.apache.log4j;resolution:=optional;version="[1.2.15,2.0.0)"


features:info 可以查看features的詳細信息

smx@root> features:info camel-http4

Description of camel-http4 2.15.2 feature
----------------------------------------------------------------
Feature has no configuration
Feature has no configuration files
Feature depends on:
  camel-core 2.15.2
Feature contains followed bundles:
 mvn:org.apache.httpcomponents/httpcore-osgi/4.3.3 start-level=50
 mvn:org.apache.httpcomponents/httpclient-osgi/4.3.6 start-level=50
 mvn:org.apache.geronimo.specs/geronimo-servlet_3.0_spec/1.0 start-level=50
 mvn:org.apache.camel/camel-http4/2.15.2 start-level=50
Feature has no conditionals.
smx@root> 


ls bundleId 查看提供的服務

smx@root> ls 762

objectClass = [org.osgi.service.blueprint.container.BlueprintListener]
service.id = 1138
----
camel.context.managementname = Com.Common.DataImport.Dafei.CashService
camel.context.name = dfCreditCamelContext
camel.context.symbolicname = <span style="font-family: Arial, Helvetica, sans-serif;">Com</span><span style="font-family: Arial, Helvetica, sans-serif;">.Common.DataImport.Dafei.CashService</span>
camel.context.version = 1.2.0.SNAPSHOT
objectClass = [org.apache.camel.CamelContext]
service.id = 1139
----
objectClass = [org.osgi.service.blueprint.container.BlueprintContainer]
osgi.blueprint.container.symbolicname = <span style="font-family: Arial, Helvetica, sans-serif;">Com</span><span style="font-family: Arial, Helvetica, sans-serif;">.Common.DataImport.Dafei.CashService</span>
osgi.blueprint.container.version = 1.2.0.SNAPSHOT
service.id = 1140

2、修改命令

修改日誌級別
 log:set INFO

查看和修改配置文件(注意以下的順序)

//編輯配置文件
smx@root> config:edit service.register.ws

//查看property
smx@root> proplist 
   felix.fileinstall.filename = file:/opt/servicemix-5.5.0/deploy/service.register.ws.cfg
   service.pid = service.register.ws
   ws.server.port = 9955
//修改
smx@root>  propset ws.server.port = 9955

//取消複製
smx@root> config:cancel 

更多的命令可以參考這裏




發佈了80 篇原創文章 · 獲贊 10 · 訪問量 19萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章