@EJB annotation on WebLogic 12 by default

When using the @EJB annotation, WebLogic 12 by default assigns the name to the bean

public class PoolOracleBean {
/** some code **/
and it can be access by the code:
InitialContext initialContext = new InitialContext();
Context context = (Context)initialContext.lookup("java:global/web");
PoolOracleBean pool = (PoolOracleBean)context.lookup("PoolOracleBean");
Connection connection = pool.getConnection();
to get a list of all annotated @EJB, in the console:
Environement --> Servers --> "server name" --> View JNDI Tree
there is java:global node with web sub-node
Post a Comment

Featured Post

Updated Coupons / promo codes for Google Apps for Work / Business

To redeem: 1. Sign up for Google Apps   2. Go to your billing settings  3. Choose your payment plan  4. Enter your promo code ...