Oracle Weblogic Server (MOSC)

MOSC Banner

@Resource annotation is not injecting dependency in EJB running in Weblogic 12.2.1.2.0 with Java 1.8

edited May 2, 2019 5:52AM in Oracle Weblogic Server (MOSC) 3 commentsAnswered

is there any bug in weblogic 12.2.1.2.0 that @resource is not injecting any dependency?

Below is the workmanager code and wm is always null when calling startThread method.

the method I am calling with below code:

ThreadExecutorEJB threadExecEjb = new ThreadExecutorEJB();

threadExecEjb.startThread(new IpspBatchExecutor(idLabel, idLabel.toString() + "." + (ii+1)));

i have tried with name property also like @Resource(name="wm") but no luck. Please help here.

----------------------------------------

import java.io.Serializable;

import java.util.Collection;

import javax.annotation.Resource;

import javax.ejb.EJB;

import javax.ejb.Singleton;

import javax.ejb.Stateless;

import javax.ejb.TransactionAttribute;

import javax.ejb.TransactionAttributeType;

import javax.inject.Inject;

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center