Hi,

I'm working on WFLY-11808 (Unable to do jndi lookup when starting batch job from web console), and would like to get some help from team, especially naming and management experts.  

The failure occurred when a batch job is started from management console or CLI, and during the batch job execution it does some jndi lookup.  The lookup failed with NameNotFoundException.

In batch subsystem, it assigns the name context for the job execution by calling:

NamespaceContextSelector.getCurrentSelector();

For a management-started job execution, it selected the one associated with the current thread which is an external management request thread, and apparently has no knowledge of the deployment.

Is there a way to select the name context associated with the deployment that contains the batch job?

Thanks,
Cheng