Bugs item #722078, was opened at 2003-04-15 20:10
Message generated for change (Settings changed) made by ejort
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=722078&group_id=22866
Category: JBossCX
Group: v3.2
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Scott Rehorn (rehorn)
>Assigned to: Adrian Brock (ejort)
Summary: criteria tag ignored in *-ds.xml
Initial Comment:
(win2k, jdk1.4)
When using a login module with a *-ds.xml datasource
descriptor, the login module will fail to authenticate
because criteria setting does not get set correctly. This
login module is derived from
AbstractPasswordCredentialLoginModule.
The ConnectionFactoryTemplate.xsl ignores user settings
for the criteria attribute but generates criteria values in
response to existence of tags, so if you need to set
criteria to be "ByContainer" there is no way to do that in
a -ds.xml file.
Original pertinent item in ConnectionFactoryTemplate.xsl:
<attribute name="Criteria">
<xsl:choose>
<xsl:when
test="application-managed-security">ByApplication</xsl:
when>
<xsl:when
test="security-domain">ByContainerAndApplication</xsl:
when>
<xsl:otherwise>ByNothing</xsl:otherwise>
</xsl:choose>
</attribute>
Should be this(?): (this fixes my problem, but don't know
if it's sufficient for the general case.)
<attribute name="Criteria">
<xsl:choose>
<xsl:when test="application-managed-security">
ByApplication
</xsl:when>
<xsl:when test="criteria">
<xsl:value-of select="criteria"/>
</xsl:when>
<xsl:otherwise>
ByNothing
</xsl:otherwise>
</xsl:choose>
</attribute>
So the user config is responsible for setting the
security-domain tag and a criteria setting to use with a
login module, e.g.,
<datasources>
<local-tx-datasource>
<jndi-name>SomeDataSource</jndi-name>
<connection-url>urlstuff</connection-url>
<driver-class>oracle.jdbc.driver.
OracleDriver</driver-class>
<min-pool-size>5</min-pool-size>
<max-pool-size>110</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>14</idle-timeout-minutes>
<security-domain>SomeDSRealm</security-domain>
<criteria>ByContainer</criteria>
</local-tx-datasource>
</datasources>
Stack trace error attached using the stock stylesheet for
our login module.
----------------------------------------------------------------------
Comment By: Scott Rehorn (rehorn)
Date: 2003-04-17 00:37
Message:
Logged In: YES
user_id=56617
Thanks for responding David.
We are using CMP and these beans, when deployed, use the
login module set by the <security-domain> tag. It turns out
that for the datasource in question, *only* the container ever
uses it so our login module never uses getConnection(user,pw)
, and only does getConnection() with a subject.
If ByContainerAndApplication is set as a result of using a login
module by realm, then JBossManagedConnectionPool complains
if no criteria is set when this call happens:
if ("ByContainerAndApplication".equals(criteria))
{
poolingStrategy =
new PoolBySubjectAndCri(mcf, poolParams, log);
...
(maybe PoolBySubjectAndCri needs to be "or" so you can have
a null criteria...)
We need to be able to set the criteria to "ByContainer" so this
line happens instead:
if ("ByContainer".equals(criteria))
{
poolingStrategy =
new PoolBySubject(mcf, poolParams, log);
Or let me know if we are doing it wrong ;^)
Thanks David
----------------------------------------------------------------------
Comment By: David Jencks (d_jencks)
Date: 2003-04-16 13:34
Message:
Logged In: YES
user_id=60525
Before I go changing anything, can you explain why the ByContainerAndApplication
doesn't work for you? After some thought I couldn't see why the "ByContainer" choice
was ever needed, so didn't include any way to set it.
Thanks
david jencks
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=722078&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development