Basically SAR (service archive) file is used to deploy the JBoss services. A SAR file or directory contains a JBoss service definition file (META-INF/jboss-service.xml) and other resources needed by the service.
You should use SAR file only, if you like to add your own services to JBoss. This can be done by writing your own MBean services and deploy it as SAR file.
Jboss registers and load the defined MBean service at startup time or during it's deployment.
As the MBean services are written using MBean interface (org.jboss.util.Service), I don't think Mbean services (SAR files) are portable.
Visolve JBoss Team
Thank you for the reply.
just want to confirm if I understand correctly:
.sar are always loaded when the JBoss start., and this is the biggest benifit of using .sar.
The MBean is the same thing as .sar
Hibernate configuration files can be created as a .sar,this will make all of objects defined in mapping files loaded from database when JBoss start.
This alomot get down to basement. any body can answer the questions?