Bug 1119531

Summary: [GSS] (6.4.0) Spurious ":" in @Resource annotation 'name' value results in invalid binding but no deployment error
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Lyle Wang <lywang>
Component: EEAssignee: baranowb <bbaranow>
Status: CLOSED WONTFIX QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.4CC: bbaranow, bmaxwell, cdewolf, istudens, jmartisk, myarboro
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1139188 (view as bug list) Environment:
Last Closed: 2014-12-16 15:19:04 UTC 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:
Bug Depends On:    
Bug Blocks: 1139188    
Attachments:
Description Flags
Reproducer deployment with source code none

Description Lyle Wang 2014-07-15 02:18:49 UTC
Created attachment 918046 [details]
Reproducer deployment with source code

Description of problem:


An @Resource annotation with a spurious ":" in the name attribute value results in an incorrect binding but no deployment failure.

@Resources({
	@Resource(
//			name="java:jboss/ResourceTestEJB", // ==> this works fine 
			name="java:jboss:/ResourceTestEJB",  // ==> this will not bind the JNDI correctly, and there is no error on deploying EJB
			
			type=com.test.ResourceEJB.class,
			lookup="java:global/01134324/ResourceEJBImpl")
})


Version-Release number of selected component (if applicable):


How reproducible:

Always

Steps to Reproduce:

1. See attached jar for a reproducer. Just deploy it. The jar includes it's own source.
2. There is no error reported in the log.
3. Any time the jndi-view op is run, the following is logged in the server.log:
10:52:02,985 ERROR [org.jboss.as.naming] (management-handler-thread - 5) WFLYNAM0013: Failed to obtain jndi view value for entry java:jboss:.: javax.naming.NameNotFoundException: jboss: -- service jboss.naming.context.java.jboss.jboss:
	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:106) [wildfly-naming-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]


Actual results:

"java:jboss:" is bound as JNDI name and the resource cannot be looked up.


Expected results:

If a proper binding can't be done per the annotation value, there should be an exception thrown triggering deployment rollback.

Additional info:

Comment 1 JBoss JIRA Server 2014-07-31 10:12:59 UTC
Bartosz Baranowski <bbaranow> updated the status of jira WFLY-3623 to Coding In Progress