By default, JBoss places EJBs in JNDI according to this naming rules:
-"EARName/BeanName/remote" for remote interfaces
-"EARName/BeanName/local" for remote interfaces.
If the EJB jar is not part of an EAR file, then "EARName" is not present.
So, the lookup for "userProfileBean/remote" will find an interface annotated with "@Remote", while "userProfileBean/local" will find an interface annotated with "@Local".
Hope this clears things
Is there any chance to lookup an implementation of a SessionBean using simply the interface and not constructing a JNDI-Name where I would have to care about the prefix wheather it has been deployed in an ear or not?
The packaging-based prefix is a default to ensure unique bindings.
You may use the JBoss-specific (ie. non-portable) @RemoteBinding.jndiBinding annotation to manually specify a JNDI target.