Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1232781

Summary: [GSS](6.4.z) When expression is used in jndi name attribute of datasource then test-connection-in-pool operation is not working.
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ranjith Pulluru <rpulluru>
Component: JCAAssignee: Chao Wang <chaowan>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Simka <msimka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.3CC: bmaxwell, cdewolf, chaowan, hsvabek, istudens, jawilson, jpederse
Target Milestone: CR1   
Target Release: EAP 6.4.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 10:34:41 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: 1231259    

Description Ranjith Pulluru 2015-06-17 13:11:49 UTC
Description of problem:
========================

- Expression is added in the datasource JNDI name attribute as below:
-----
  <datasource jndi-name="${ds}" pool-name="ExampleDS" enabled="true" use-java-context="true">
-----

- Value for the expression is passed to the JBoss server during the JBoss startup as below:
-----
  ./standalone.sh -Dds=java:jboss/datasources/ExampleDS
-----

- In the server.log file below is the information regarding the datasource.
-----
  INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [${ds}]
----- 

- Test the datasource using the below command and here is the result:
----
[standalone@localhost:9999 /] /subsystem=datasources/data-source=ExampleDS:test-connection-in-pool()
{
    "outcome" => "failed",
    "failure-description" => "JBAS010440: failed to invoke operation: JBAS010442: failed to match pool. Check JndiName: java:/${ds}",
    "rolled-back" => true
}
----

- Here is the information regarding the JNDI name attribute:
----
[standalone@localhost:9999 /] /subsystem=datasources/data-source=ExampleDS:read-resource-description(recursive=true)
{
    "outcome" => "success",
    "result" => {
        	  :
            "jndi-name" => {
                "type" => STRING,
                "description" => "Specifies the JNDI name for the datasource",
                "expressions-allowed" => true,
                "nillable" => false,
                "access-type" => "read-write",
                "storage" => "configuration",
                "restart-required" => "no-services"
            },
		  :
}
-----

Comment 1 Chao Wang 2015-06-18 04:38:46 UTC
This also presents in upstream. For some reason, jndi value is not resolved.

Comment 3 hsvabek 2015-08-03 06:14:05 UTC
Verified 6.4.3.CP.CR1
It is ok now.

Comment 4 Petr Penicka 2017-01-17 10:34:41 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.