You are migrating from EJB2 to EJB3, yes? (witn JB4.0.2 there is no EJB3 deployer)
With EJB3 there is no necessity to use such lookups if you are local.
@EJB PostManager myPostmanager;
to your code and remove the lookup, the container will do the work for you ;-)
Thanks for your response,
in fact this is JBoss i need to migrate, not my EJB2s.
i have installed ejb3.deployer in JBoss 4.0.2, so i loaded these EJB3s with lookups.
Now i cant touch all lookups because there are too many so i search a miracle with JBoss configuration
One is to annotate @LocalBinding(jndiBinding="..."), but that is not what you want (also painful because the annotation change from JB4 => JB5).
But it should possible to overwrite the names via deployment descriptor META-INF/ejb-jar.xml or jboss.xml.
You should only set the local jndi name all other should be taken from annotation due to JEE spec. (convention over configuration)
Thank you for your response,
IMHO, the best solution is the annotation @EJB to inject the bean, this is a big migration but there are only one migration
in this case you are JEE compliant and must not migrate again (also if you migrate the application server, but why ;-) )