EAR files are only relevant if you have one or more webcomponents (.WAR files) and EJB components that form an application together. If you don't need this, simple use the JAR's.
Are you familiar with the J2EE deployment structures?
Thanks for the reply,
Actually my EJB doesn't contain any Web stuff.
With J2EE RI which I used before JBoss, the deploytool automatically creates the EAR file for me, since there's no such tool in JBoss, it keeps me wondering, whether I really need that file or not, because right now, my apps runs fine without it. I also find SAR and RAR files in JBoss installation directory, what are they ? Do I need to use them too ?
You don't necessarily need EAR files. SAR stands for Service Archive which is a JBoss specific packaging format for deploying MBeans. RAR stands for resource archive which is used for packaging JCA resource adapters.
Could you recommend sites or books where I can learn about MBean? I'm a total newbie here, so I need sources that explains it right from the bottom.
This one covers the JMX spec pretty extensively:
And the JBoss 3.0 Admin & Development book covers JBoss specific additions (such as the SAR format):
Looks great, thanks a lot.
the following tool greates a EAR with the neccessary JBoss Deployment Descriptors. The GUI is similar the deploytool, but it generates the sourcecode for the EJBs too. The sourcecode contains XDoclet tags. For more information have a look at
Try it, it's very useful.