Close

JNDI in POJO

If you have used JNDI lookup in your services, JSPs or servlets, it was as easy as looking it up using some code like this: InitialContext ctx;ctx = new InitialContext();MyBean hello = (MyBean) ctx.lookup(“MyBean”); However, if you want to use this code in a POJO style, you won’t be successful, looking up that JNDI. In…