Is there any advantage over xml configuration file by using annotation class(added from jdk 1.5?
I mean to say that i am writing a program to use annotations of type marker and non marker but i am not able to understand where i am getting wrong so i am giving you a hyperlink.
Leonardo Silva Vidal
Annotations increase code understanding as configuration is closer to the classes that use them. If you are writing an EJB whose JNDI name is static, it is faster and clearer to annotate the EJB than to write it in ejb.xml. The only drawback of annotations it is its static nature, so if the JNDI is not know in advance, you are stuck with configuration files.