With
EJB 3.0 (and I think you'll be using version 3.0 if you're using annotations) you have to possibilities to give deployment and container instructions. You can use the mentioned annotations and you can still use an XML descriptor file as used in older versions of EJB, i.e version 2.x.
If you need or want to specify other parameters after compilation you can use the XML descriptor for these tasks. The options specified in the descriptor file take precedence over the same options already specified with annotations directly in the source code files.
So it's perhaps the best to give reasonable default values in the source code with annotations and use the XML descriptor only where really necessary to override parameters or give additional ones to the container. This is pretty much the same Ulf already told you for the web.xml descriptor of JSPs and
servlets.
Marco
[ May 28, 2008: Message edited by: Marco Ehrentreich ]