Hi friend,
@EJB annotation can use to inject server side beans such as Stateless, Stateful or MessageDriven into a another server side bean such as
java server side application client, another
EJB or or web components like
servlets,
JSP. But you can't use @EJB annotation in a not server side java application. Therefore you have to use JNDI lookup to inject server side beans into non server side java applications.
So vijayakrishna in your case we can't figure out what you are going to inject using @EJB. So if you post your code it will be easy to figure out what the problem is.