If you mean alternatives to JNDI lookups, then often there is none. What is important to understand is that all EJBs have a default JNDI context called the environment context. The scope of this context is for all beans from the same home. The default context exists in the name space called "java:comp/env" and its subcontexts. When the bean is deployed, any beans it uses are mapped into the subcontext "java:comp/env/ejb".
Furthermore, The
EJB specification recommends that all resource manager connection factory references be organised in the subcontexts of the bean�s environment, using a different subcontext for each resource manager type. So, typically you get this:
java:comp/env/jdbc - for
JDBC DataSource references
java:comp/env/jms - for JMS connection factories
java:comp/env/mail - for JavaMail connection factories
java:comp/env/url - for URL connection factories