Sunday, April 22, 2007

ejb-jar.xml

In a normal EJB jar file,we will need to include a ejb-jar.xml in the META-INF folder.For EJB3,we can use annotation to configure the bean instead of writing it in ejb-jar.xml.Information such as bean name,mapped name etc can be configured through annotation.For more information,please refer to EJB3 javadoc.However,can we use an empty descriptor,a ejb-jar.xml without any configuration in our jar file.According to what I know,the configuration in ejb-jar.xml will overwrite the configuration done using annotations.This give the user flexibilities to change the configuration whenever its necessary without changing the code.

No comments: