anuragdebnath [https://community.jboss.org/people/anuragdebnath] created the 
discussion

"Test connection through CLI when <allow-multiple-users/> is applied to a 
datasource"

To view the discussion, visit: https://community.jboss.org/message/799863#799863

--------------------------------------------------------------
*Environment :*

JBoss EAP-6.0.1
JBoss AS 7.1.3
IronJacamar version used in above JBoss version - 1.0.13.Final

*Issue :*

Create a XA data-source(via CLI) which has the attribute 
<allow-multiple-users/> defined to true.
Testing the connection using CLI shows the below error - 
 **************************************
 [standalone@localhost:9999 /] 
/subsystem=datasources/xa-data-source=OracleXA_DS:test-connection-in-pool()
 { "outcome" => "failed", "failure-description" => "JBAS010440: failed to 
invoke operation: JBAS010447: Connection is not valid", "rolled-back" => true } 
**************************************
On checking the description of the attribute ( 
/subsystem=datasources/xa-data-source=OracleXA_DS:read-resource-description(recursive=true)
 )  it says -
"allow-multiple-users" => {
 "type" => BOOLEAN,
 "description" => "Specifies if multiple users will access the datasource 
through the getConnection(user, password) method and hence if the internal pool 
type should account for that"

When testing the connection through "test-connection-in-pool" there is no way 
to provide username/password for the above mentioned getConnection() and hence 
connection fails.
To confirm if applying <allow-multiple-users/> is a valid attribute to a 
datasource, i tested the same using a simple JDBC code and supplied the 
credentials to the .getConnection() like below and it works well-
InitialContext ic = new InitialContext();
Datasource ds = (DataSource)ic.lookup("java:/etsDataSourcexa");
Connection con = ds.getConnection("jboss","jboss");


I have raised a JIRA [1] but would like to know the expert's thought  :) 

[1]  https://issues.jboss.org/browse/JBJCA-990 
https://issues.jboss.org/browse/JBJCA-990
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799863#799863]

Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to