[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [jboss-user] [IronJacamar] - Test connection through CLI when <allow-multiple-users/> is applied to
From:       anuragdebnath <do-not-reply () jboss ! com>
Date:       2013-02-27 13:11:21
Message-ID: 2-799863-3-75131-1361970673301.jivesbs.jivemailuser () https://community ! jboss ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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]



[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; \
margin: 0; padding: 20px;">

<div>
	<table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: \
1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tbody>
			<tr>

				<td>

					<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" \
style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: \
6px; -webkit-border-radius: 6px;">  <tbody>
							<tr>
								<td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px \
solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; \
-moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; \
                -webkit-border-top-left-radius: 5px;">
									<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; \
                margin: 0; display: block !important;">
									<!-- To have a header image/logo replace the name below with your img tag \
                -->
									<!-- Email clients will render the images when the message is read so any \
                image -->
									<!-- must be made available on a public server, so that all recipients can \
                load the image. -->
									<a href="https://community.jboss.org/index.jspa" style="text-decoration: \
none; color: #E1E1E1">JBoss Community</a></h1>  </td>

							</tr>
							<tr>
								<td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; \
color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; \
-moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; \
-webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: \
17px; font-weight: normal;">  Test connection through CLI when \
<allow-multiple-users/> is applied to a datasource </h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/anuragdebnath">anuragdebnath</a> \
in <i>IronJacamar</i> - <a \
href="https://community.jboss.org/message/799863#799863">View the full discussion</a> \
</span> <hr style="margin: 20px 0; border: none; background-color: #dadada; height: \
1px;">

<div class="jive-rendered-content"><p><strong>Environment :</strong></p><p \
style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>JBoss \
EAP-6.0.1</p><p>JBoss AS 7.1.3</p><p>IronJacamar version used in above JBoss version \
- <span class="value editable-field inactive" id="versions-val" title="Click to \
edit"><span class="shorten" id="versions-field"><span title="1.0.13.Final 13th patch \
release of 1.0">1.0.13.Final</span></span></span></p><p style="min-height: 8pt; \
height: 8pt; padding: 0px;">&#160;</p><p><strong><span class="value editable-field \
inactive" title="Click to edit"><span class="shorten"><span title="1.0.13.Final 13th \
patch release of 1.0">Issue :</span></span></span></strong></p><p style="min-height: \
8pt; height: 8pt; padding: 0px;">&#160;</p><p>Create a XA data-source(via CLI) which \
has the attribute &lt;allow-multiple-users/&gt; defined to true.</p><p>Testing the \
connection using CLI shows the below error - <br/> \
**************************************<br/> <span \
class="error">[standalone@localhost:9999 /]</span> \
/subsystem=datasources/xa-data-source=OracleXA_DS:test-connection-in-pool()</p><p> { \
"outcome" =&gt; "failed", "failure-description" =&gt; "JBAS010440: failed to invoke \
operation: JBAS010447: Connection is not valid", "rolled-back" =&gt; true } \
</p><p>**************************************</p><p>On checking the description of \
the attribute ( /subsystem=datasources/xa-data-source=OracleXA_DS:read-resource-description(recursive=true) \
)&#160; it says -</p><p>"allow-multiple-users" =&gt; {<br/> "type" =&gt; \
BOOLEAN,<br/> "description" =&gt; "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"</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;">&#160;</p><p>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.</p><p>To confirm if applying \
&lt;allow-multiple-users/&gt; 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-</p><p>InitialContext ic = new \
InitialContext();</p><p>Datasource ds = \
(DataSource)ic.lookup("java:/etsDataSourcexa");</p><p>Connection con = \
ds.getConnection("jboss","jboss");</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>I have raised a JIRA [1] but would like to know the expert's \
thought <span> :) </span></p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p><span>[1] </span><a class="jive-link-external-small" \
href="https://issues.jboss.org/browse/JBJCA-990" \
target="_blank">https://issues.jboss.org/browse/JBJCA-990</a></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a \
href="https://community.jboss.org/message/799863#799863">going to Community</a></p>  \
<p style="margin: 0;">Start a new discussion in IronJacamar at <a \
href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098">Community</a></p>
 </div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>



_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic