Bug 908195

Summary: JNDI View does not work after binding EJB to java:global/MyBean
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: James Livingston <jlivings>
Component: EJBAssignee: Jaikiran Pai <jpai>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: dimitris, joallen, ochaloup, pgier
Target Milestone: ER2   
Target Release: EAP 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Livingston 2013-02-06 06:15:10 UTC
If you specify the name attribute in the @EJB annotation to bind it directly under java:global (and not a sub context), the JNDI view operation in the management console will fail.


To reproduce, follow the steps at https://docs.jboss.org/author/display/AS71/JNDI+Reference and deploy an EJB like:
--
package com.example;
 
import javax.ejb.EJB;
import javax.ejb.Stateless;
 
@Stateless
@EJB(name = "java:global/MyBean", beanInterface = MyBean.class)
public class MyBean
{
}
--


Then go to the management console, and JNDI View. If the @EJB name specifies a sub-context (e.g. java:global/xxx/MyBean) it will work, so that is a work-around

Comment 1 James Livingston 2013-02-06 06:17:47 UTC
This is fixed by AS7-6060, in the master (AS 7.2) branch

Comment 2 Ondrej Chaloupka 2013-03-07 14:11:49 UTC
Verified on EAP 6.1.0.ER2.

Just a note. The problematic case is more likely this one:
@Stateless
@EJB(name = "java:global/MyBean", beanInterface = MyBeanInterface.class)
public class MyBean implements MyBeanInterface {
  ...	
}