Created
January 14, 2015 18:07
-
-
Save abhirockzz/f9da989a2fd465c203ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmbeddedEJBExample{ | |
//inject an EJB available on the classpath | |
@EJB | |
MyLocalEJB local; | |
//use JNDI to talk to remotely deployed EJBs (via RMI) | |
EJBContainer container = EJBContainer.createEJBContainer(); | |
Context context = container.getContext(); | |
ARemoteEJB remote = (ARemoteEJB) context.lookup(<provide JNDI name here >) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment