SAR (Service Archive)
This tips explains how to create and deploy the SAR file in the JBoss application server. SAR files are only used in the JBoss application server. It cannot be used in the other application server environments. Before looking into creating a SAR file, first let you know what is SAR file.
What is SAR file?
SAR file is created with the .sar extenstion same like how other archive files (JAR, WAR, EAR) created. But the purpose of the SAR file is differenet from the other archive files. It is used for deploying a service component in the application server without dependent on other componenets. You can create a seperate componenet as a SAR file and deploy it in the server. When application server starts, the component will be deployed and started running independently. Most of the times these SAR files are used for writing thread related components which has to be running independently.
JBoss's service archive architecture is based on the Java Extension Management (JMX). During the server bootup process, the service archive deployer (SARDeployer) instantiates the JBoss service classes and exposes them as manageable beans through JMX. You can view all of registered JBoss service components in the JBoss JMX Console web application.
Create SAR file
In this section we will see how to create the SAR file. The following are the steps required to create a SAR file:
Add JAR Files
Jakarta Commons IO, Jakarta Commons Logging, jboss-common.jar, jboss-jmx.jar ,jboss-system.jar, jboss-xml-binding.jar
Create MBean interface as Follows :
public interface JavaBeatMBean implements ServiceMBean{
public void start();
public void stop();
}
Create MBean implementation class as Follows :
public class JavaBeat{
public void start(){
System.out.println("Test Start");
}
public void stop(){
System.out.println("Test Stop");
}
}
Create a new implementation class, JavaBeat, that implements JavaBeatMBean. As prescribed by the standard MBean specs, the implemented class must have the same name as the MBean interface minus the "MBean" suffix. Now we have created the service componenet, its time to package and deploy the componenet.
Create jboss-service.xml as follows:
<server>
<mbean code="JavaBeat"
name="service.javabeat:service=JavaBeat"/>
</server>
This file should be kept inside the META-INF folder.
Build and create SAR file
When you build and creating the SAR file, it should be in the following package structure:
javabeat-service.sar->META-INF/jboss-service.xml
javabeat-service.sar->JavaBeat.class
javabeat-service.sar->JavaBeatMBean.class
javabeat-service.sar->JAR files
when you deploy this SAR file, application server will deploy the componenet and start the JavaBeat class's start methods. start is a callback method in the MBean interfaces.
分享到:
相关推荐
Internal Wave Detection in SAR Image Internal Wave Detection in SAR Image Internal Wave Detection in SAR Image
jboss4版本下,jbossweb-tomcat55.sar升级包,修复Apache Tomcat DIGEST身份验证多个安全漏洞(CVE-2012-3439) 升级包中的jar来源于tomcat5.5.36 使用方法:直接替换jboss中旧的jbossweb-tomcat55.sar
SAPCAR -avf archive.sar file1 file2 file3 提取/验证文件: 如果尝试从一个不满足 SAPCAR 第二版规范的文档中提取文件,SAPCAR 假设它是 旧格式的档案,并自动启动相应的提取例程。如果仍旧无法处理这个档案,它...
1.安装JDK1.6并配置环境变量 2.下载JBOSS,将下载的安装包直接解压到安装...注意:当我安装JDK1.5+JBOSSjboss-5.1.0.GA组合时,报版本冲突错误(Bad version number in .class file错误),我换成JDK1.6就不报错误了。
SAR回波仿真,以星载 SAR 系统为例设计一个 1 米分辨率星载 SAR 系统不考虑地球弯曲和速度变化
We describe techniques for improving ground moving target indication (GMTI) performance in multi-channel synthetic aperture radar (SAR) systems. Our approach employs a combination of moving reference ...
SAR SIFT图像配准算法。yishiliuhuasheng/sar_sift
该代码完成欺骗干扰功能应用于SAR成像,使用语言为matlab
sar目标仿真
如果是在jboss上“像oracle的端口号也是8080”这时我们需要修改jboss的端口号 最主要的端口号为 /opt/jboss-4.0.5.GA/server/default/deploy/jbossweb-tomcat.sar/server.xml中
SAR数据,非原始数据,是处理后的数据,需要看的童鞋可以参考一下。
SAR图像处理1 SAR 课件 SAR学习入门的教材
射频噪声干扰,噪声调频干扰,噪声调幅干扰模式的仿真以及SAR成像的仿真实现
deploy/jbossweb-tomcat55.sar/server.xml prefix="access_log." suffix=".log" pattern="%h %t %r %s %D" directory="${jboss.server.home.dir}/../output/logs" resolveHosts="false" /> ...
两个12bit的SAR_ADC的simulink模型
SAR滤波MATLAB程序,对SAR图像进行滤波
在现有工艺水平下,由于受电容失配、系统失调以及噪声等因素的限制,采用电荷再分配结构的SAR ADC能够达到的精度被限制在12位左右。因此,高精度ADC设计必须依靠校准技术。一般校准技术有两类:模拟校准技术是在模拟...
SAR影像滤波程序