There is no definition in the specification on how to bind a bean to a specific JNDI name. The LocalBinding is in the org.jboss.annotation.ejb package (from deploy/default/ejb3.deployer/jboss-annotations-ejb3.jar), you should use that one.
Please let me know if it works out.
@LocalBinding works perfectly .... but it's really REALLY lame that Jboss put in this annotation, while the sun EJB3.0 specification says that the mappedName property of @Stateless should do this job.
Vendor specific solutions are evil and wrong!
Please let me know where it says so. I couldn't find it.
Sun JEE5 API, javax.ejb package Stateless annotation:
mappedName public abstract String mappedName A product specific name(e.g. global JNDI name) that this session bean should be mapped to. Application servers are not required to support any particular form or type of mapped name, nor the ability to use mapped names. The mapped name is product-dependent and often installation-dependent. No use of a mapped name is portable. Default: ""
Using this property does absolutely nothing in Jboss, so I guess they don't support it.