[jboss-user] [IronJacamar] - Test connection through CLI when <allow-multiple-users/> is applied to a datasource

anuragdebnath do-not-reply at jboss.com
Wed Feb 27 08:11:21 EST 2013


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 at 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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130227/5153f16e/attachment.html 


More information about the jboss-user mailing list