/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
EMBEDDING KARAF IN A WEB APPLICATION
====================================
Purpose
-------
To embed Karaf in a web application.
Prerequisites for Running the Example
-------------------------------------
You must have the following installed on your machine:
- JDK 1.5 or higher
- Maven 2.0.9 or higher
Building and Deploying
----------------------
You can build and deploy this example in two ways:
- A. Using Jetty: Quick and Easy
This option is useful if you want to see the example up and
running quickly.
- B. Using Your Favorite Web Container
This option is useful if you want to see Karaf running
as a web application inside your favorite web container.
A. Using Jetty: Quick and Easy
------------------------------
To build the example and deploy to Jetty, complete the
following steps:
1. In a command prompt/shell, change to the directory
that contains this README.txt file.
2. Enter the following Maven command:
mvn package jetty:run
This Maven command builds the example web application, starts
Jetty and deploys the web application to Jetty. Once complete,
you should see the following printed to the console:
[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 10 seconds.
Running a Client
----------------
To test the example, you can use the Apache Karaf client
to connect to the server and issue a Karaf command. For example,
try executing the "features:list" command as follows:
1. In a command prompt/shell, change to your product
installation directory.
2. Run the following commands:
Unix:
${KARAF_HOME}/bin/client features:list
Windows:
%KARAF_HOME%\bin\client.bat features:list
Using JDK:
java -jar lib/bin/karaf-client.jar features:list
In this case, you should see output similar to the following:
State Version Name Repository
[uninstalled] [2.5.6.SEC01] spring karaf-2.2.3
[uninstalled] [1.2.0 ] spring-dm karaf-2.2.3
[uninstalled] [2.2.3] wrapper karaf-2.2.3
[uninstalled] [2.2.3] obr karaf-2.2.3
[uninstalled] [2.2.3] http karaf-2.2.3
[uninstalled] [2.2.3] webconsole karaf-2.2.3
[installed ] [2.2.3] ssh karaf-2.2.3
[installed ] [2.2.3] management karaf-2.2.3
B. Using Your Favorite Web Container
------------------------------------
You can deploy the web application to your favorite web
container, by completing the following steps:
1. In a command prompt/shell, change to the directory
that contains this README.txt file.
2. Enter the following command:
mvn package
Maven builds the web application, web-2.2.3.war, and
saves it in the target directory of this example. Deploy this
WAR file to your favorite web container. Once the application
is running, you can test it using the Apache Karaf client
as described in the "Running a Client" section above.
没有合适的资源?快使用搜索试试~ 我知道了~
apache-karaf-2.2.3.zip
共97个文件
jar:47个
xml:9个
cfg:9个
5星 · 超过95%的资源 需积分: 9 9 下载量 45 浏览量
2013-01-14
00:07:54
上传
评论
收藏 5.81MB ZIP 举报
温馨提示
apache-karaf-2.2.3.zip java Karaf是Apache旗下的一个开源项目.Karaf同时也是一个基于OSGi的运行环境,Karaf提供了一个轻量级的OSGi容器,可以用于部署 各种组件,应用程序.Karaf提供了很多特性用于帮助开发者和用户更加灵活的部署应用,例如:热部署,动态配置,几种日志处理系统,本地系统集 成,可编程扩展控制台,ssh远程访问,内置安装认证机制等等.同时Karaf作为一款成熟而且优秀的OSGi运行环境以及容器已经被诸多Apache项 目作为基础容器,例如:Apache Geronimo, Apache ServiceMix, Fuse ESB,由此可见Karaf在性能,功能和稳定性上都是个不错的选择.
资源推荐
资源详情
资源评论
收起资源包目录
apache-karaf-2.2.3.zip (97个子文件)
apache-karaf-2.2.3
karaf-manual-2.2.3.html 225KB
demos
branding
pom.xml 2KB
shell
src
main
resources
org
apache
karaf
branding
branding.properties 1KB
README.txt 2KB
pom.xml 3KB
NOTICE 1KB
web
src
main
webapp
WEB-INF
web.xml 1KB
index.jsp 1KB
java
org
apache
karaf
web
WebAppListener.java 2KB
README.txt 4KB
pom.xml 6KB
NOTICE 1KB
dump
src
main
resources
OSGI-INF
blueprint
screenshot.xml 1KB
java
org
apache
karaf
diagnostic
demo
ScreenshotDumpProvider.java 2KB
pom.xml 2KB
pom.xml 2KB
lib
endorsed
org.apache.karaf.exception-2.2.3.jar 8KB
README 1KB
karaf-jaas-boot.jar 11KB
karaf.jar 155KB
ext
README 1KB
README 2KB
bin
karaf-client.jar 44KB
etc
org.apache.karaf.jaas.cfg 2KB
org.apache.karaf.features.obr.cfg 1KB
config.properties 4KB
shell.init.script 1KB
org.ops4j.pax.url.mvn.cfg 4KB
jre.properties 13KB
users.properties 1KB
org.apache.karaf.management.cfg 2KB
org.apache.karaf.shell.cfg 1KB
org.apache.karaf.features.cfg 1KB
org.apache.felix.fileinstall-deploy.cfg 1KB
java.util.logging.properties 1KB
startup.properties 5KB
org.ops4j.pax.logging.cfg 2KB
system.properties 3KB
org.apache.karaf.log.cfg 2KB
custom.properties 1KB
LICENSE 11KB
NOTICE 1KB
RELEASE-NOTES 75KB
deploy
README 891B
README 4KB
bin
shell.bat 3KB
admin.bat 4KB
karaf.bat 9KB
client.bat 3KB
start.bat 2KB
stop.bat 2KB
karaf-manual-2.2.3.pdf 426KB
system
org
eclipse
osgi
3.6.2.R36x_v20110210
osgi-3.6.2.R36x_v20110210.jar 1.1MB
ops4j
pax
url
pax-url-mvn
1.2.8
pax-url-mvn-1.2.8.jar 110KB
pax-url-wrap
1.2.8
pax-url-wrap-1.2.8.jar 332KB
logging
pax-logging-api
1.6.3
pax-logging-api-1.6.3.jar 94KB
pax-logging-service
1.6.3
pax-logging-service-1.6.3.jar 529KB
apache
servicemix
bundles
org.apache.servicemix.bundles.asm
3.3_2
org.apache.servicemix.bundles.asm-3.3_2.jar 213KB
karaf
org.apache.karaf.management
2.2.3
org.apache.karaf.management-2.2.3.jar 22KB
deployer
org.apache.karaf.deployer.spring
2.2.3
org.apache.karaf.deployer.spring-2.2.3.jar 32KB
org.apache.karaf.deployer.blueprint
2.2.3
org.apache.karaf.deployer.blueprint-2.2.3.jar 32KB
org.apache.karaf.deployer.wrap
2.2.3
org.apache.karaf.deployer.wrap-2.2.3.jar 23KB
org.apache.karaf.deployer.features
2.2.3
org.apache.karaf.deployer.features-2.2.3.jar 32KB
org.apache.karaf.deployer.kar
2.2.3
org.apache.karaf.deployer.kar-2.2.3.jar 16KB
diagnostic
org.apache.karaf.diagnostic.core
2.2.3
org.apache.karaf.diagnostic.core-2.2.3.jar 13KB
org.apache.karaf.diagnostic.common
2.2.3
org.apache.karaf.diagnostic.common-2.2.3.jar 15KB
org.apache.karaf.diagnostic.management
2.2.3
org.apache.karaf.diagnostic.management-2.2.3.jar 12KB
org.apache.karaf.diagnostic.command
2.2.3
org.apache.karaf.diagnostic.command-2.2.3.jar 12KB
admin
org.apache.karaf.admin.command
2.2.3
org.apache.karaf.admin.command-2.2.3.jar 28KB
org.apache.karaf.admin.management
2.2.3
org.apache.karaf.admin.management-2.2.3.jar 17KB
org.apache.karaf.admin.core
2.2.3
org.apache.karaf.admin.core-2.2.3.jar 60KB
features
org.apache.karaf.features.command
2.2.3
org.apache.karaf.features.command-2.2.3.jar 37KB
org.apache.karaf.features.core
2.2.3
org.apache.karaf.features.core-2.2.3.jar 66KB
org.apache.karaf.features.management
2.2.3
org.apache.karaf.features.management-2.2.3.jar 30KB
jaas
org.apache.karaf.jaas.config
2.2.3
org.apache.karaf.jaas.config-2.2.3.jar 29KB
org.apache.karaf.jaas.modules
2.2.3
org.apache.karaf.jaas.modules-2.2.3.jar 68KB
org.apache.karaf.jaas.command
2.2.3
org.apache.karaf.jaas.command-2.2.3.jar 25KB
assemblies
features
enterprise
2.2.3
enterprise-2.2.3-features.xml 4KB
standard
2.2.3
standard-2.2.3-features.xml 13KB
shell
org.apache.karaf.shell.dev
2.2.3
org.apache.karaf.shell.dev-2.2.3.jar 155KB
org.apache.karaf.shell.osgi
2.2.3
org.apache.karaf.shell.osgi-2.2.3.jar 85KB
org.apache.karaf.shell.packages
2.2.3
org.apache.karaf.shell.packages-2.2.3.jar 17KB
org.apache.karaf.shell.config
2.2.3
org.apache.karaf.shell.config-2.2.3.jar 41KB
org.apache.karaf.shell.commands
2.2.3
org.apache.karaf.shell.commands-2.2.3.jar 66KB
org.apache.karaf.shell.ssh
2.2.3
org.apache.karaf.shell.ssh-2.2.3.jar 38KB
org.apache.karaf.shell.console
2.2.3
org.apache.karaf.shell.console-2.2.3.jar 336KB
org.apache.karaf.shell.log
2.2.3
org.apache.karaf.shell.log-2.2.3.jar 45KB
sshd
sshd-core
0.5.0
sshd-core-0.5.0.jar 303KB
felix
org.apache.felix.configadmin
1.2.8
org.apache.felix.configadmin-1.2.8.jar 92KB
org.apache.felix.fileinstall
3.1.10
org.apache.felix.fileinstall-3.1.10.jar 71KB
org.apache.felix.framework
3.0.9
org.apache.felix.framework-3.0.9.jar 383KB
aries
proxy
org.apache.aries.proxy
0.3
org.apache.aries.proxy-0.3.jar 40KB
blueprint
org.apache.aries.blueprint
0.3.1
org.apache.aries.blueprint-0.3.1.jar 362KB
jmx
org.apache.aries.jmx
0.3
org.apache.aries.jmx-0.3.jar 120KB
org.apache.aries.jmx.blueprint
0.3
org.apache.aries.jmx.blueprint-0.3.jar 67KB
org.apache.aries.util
0.3
org.apache.aries.util-0.3.jar 43KB
mina
mina-core
2.0.1
mina-core-2.0.1.jar 626KB
共 97 条
- 1
资源评论
- 猪头虾2016-09-07不错。可以使用
jimson
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- QuestionTwo.java
- QuestionOne.java
- OA办公自动化管理系统(Struts1.2+Hibernate3.0+Spring2+DWR).rar
- 简历-求职简历-word-文件-简历模版免费分享-应届生-高颜值简历模版-个人简历模版-简约大气-大学生在校生-求职-实习
- 南京邮电大学数学实验:熟练掌握 Matlab 软件的基本命令和操作
- 简历-求职简历-word-文件-简历模版免费分享-应届生-高颜值简历模版-个人简历模版-简约大气-大学生在校生-求职-实习
- 2017校招真题校园招聘真题算法题(37道)Python源码.zip
- 基于单片机protues仿真的多功能自动饮水机系统设计(仿真图、源代码、演示视频)
- 论文《一种修复流程挖掘事件日志中缺失活动标签的深度学习方法》翻译
- 智慧电厂相关资料发电控制的方式
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功