[JBoss JIRA] Created: (JBAS-4307) Tag file: Variables from outer tags are not available in inner tags
by Wolfgang Knauf (JIRA)
Tag file: Variables from outer tags are not available in inner tags
-------------------------------------------------------------------
Key: JBAS-4307
URL: http://jira.jboss.com/jira/browse/JBAS-4307
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Web (Tomcat) service
Affects Versions: JBossAS-4.2.0.CR1
Reporter: Wolfgang Knauf
Assigned To: Remy Maucherat
I created two tag files ("outer" and "inner"), in the jsp "inner" is a nested tag of "outer".
In the outer tag file I declare a variable and write it to the jspContext. This variable is available in the jsp, but not in "inner.tag".
outer.tag
<%@ variable name-given="test" scope="NESTED" %>
<%
jspContext.setAttribute ("test", "This is a test !", PageContext.PAGE_SCOPE);
%>
Value before doBody: ${test} <br>
<jsp:doBody/>
Value after doBody: ${test} <br>
inner.tag:
Value in inner tag: ${test} <br>
test.jsp:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="test" tagdir="/WEB-INF/tags" %>
<html>
<body>
<test:outer>
Value in test.jsp: ${test} <br>
<test:inner/>
</test:outer>
</body>
</html>
The output is:
Value before doBody: This is a test !
Value in test.jsp: This is a test !
Value in inner tag:
Value after doBody: This is a test !
The inner tag does not see the attribute.
I don't know whether this is a bug or whether the spec forbids this, but I think it should be possible for the inner tag to see the parent variables.
A usage sample would be some iterator tag which places the current item in a jspContext variable and the inner tags must be able to access the current item (the variable name is an attribute of the inner tag). I could place the current item in the request scope, but this is much too global.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 7 months
[JBoss JIRA] Created: (JBAS-3624) <security-domain> setting in deployment descriptor populates @SecurityDomain annotation incorrectly on EJB3 session beans
by David Green (JIRA)
<security-domain> setting in deployment descriptor populates @SecurityDomain annotation incorrectly on EJB3 session beans
-------------------------------------------------------------------------------------------------------------------------
Key: JBAS-3624
URL: http://jira.jboss.com/jira/browse/JBAS-3624
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: JBossAS-4.0.4.GA
Reporter: David Green
Assigned To: Bill Burke
Specifying a <security-domain> in the jboss-app.xml incorrectly sets the @SecurityDomain on EJB3 session beans.
In the jboss-app.xml the security domain is specified as follows:
<jboss-app>
<security-domain>java:/jaas/hch</security-domain>
</jboss-app>
In Ejb3DescriptorHandler the security-domain is copied directly into the SecurityDomainImpl instance as "java:/jaas/hch", however the @SecurityDomain annotation should be populated with the value "hch" (without the leading "java:/jaas/" prefix). This causes the EJB3 session bean authentication to behave unexpectedly, since the authentication for the bean reverts to the default domain instead of the specified one.
The only way I've found to workaround this issue is to specify the @SecurityDomain individually on every session bean in the project.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 7 months
[JBoss JIRA] Created: (JBAS-3997) getManagedConnection retries
by Adrian Brock (JIRA)
getManagedConnection retries
----------------------------
Key: JBAS-3997
URL: http://jira.jboss.com/jira/browse/JBAS-3997
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: JCA service
Reporter: Adrian Brock
Assigned To: Weston Price
We should add the ability to retry getManagedConnection()
when there is a resource exception from the pool.
This will allow the ConnectionManagers to be more tolerant of transient failures.
I'd suggest two new attributes on the connection manager, with the suggested defaults:
<allocate-retry>1</allocate-retry>
<allocate-retry-wait-millis>5000</allocate-retry-wait-millis>
I also think the connection manager needs a "shutdown" boolean (maintained by start/stop)
i.e. so don't wait 5 seconds if we get a resource exception caused by the CM/Pool getting
undeployed, e.g. at JBoss shutdown.
This would turn into the following *untested* code in BaseConnectionManager2:
protected ConnectionListener getManagedConnection(Transaction transaction, Subject subject, ConnectionRequestInfo cri)
throws ResourceException
{
ResourceException failure = null;
if (shutdown.get())
throw new ResourceException("The connection manager is shutdown " + jndiName);
// First attempt
try
{
return poolingStrategy.getConnection(transaction, subject, cri);
}
catch (ResourceException e)
{
failure = e;
// Retry?
for (int i = 0; i < allocationRetries; ++i)
{
if (shutdown.get())
throw new ResourceException("The connection manager is shutdown " + jndiName);
try
{
if (allocationWait != 0)
wait(allocationWait);
return poolingStrategy.getConnection(transaction, subject, cri);
}
catch (ResourceException e1)
{
failure = e1;
}
catch (InterruptedException e1)
{
JBossResourceException.rethrowAsResourceException("getManagedConnection retry wait was interrupted " + jndiName, e1);
}
}
}
// If we get here all retries failed, throw the lastest failure
throw failure;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 7 months