[
https://jira.jboss.org/jira/browse/JBAS-5906?page=com.atlassian.jira.plug...
]
Galder Zamarreno commented on JBAS-5906:
----------------------------------------
This was already fixed in integration project used by trunk
so removing fix/affect for AS 5.0.x. It still affects AS 4.2.x.
Client user transaction lookups aren't closing initial contexts
---------------------------------------------------------------
Key: JBAS-5906
URL:
https://jira.jboss.org/jira/browse/JBAS-5906
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Transaction Manager (JBossTM)
Affects Versions: JBossAS-5.0.0.CR1, JBossAS-4.2.3.GA
Reporter: Adrian Brock
Assignee: Galder Zamarreno
Fix For: JBossAS-5.0.0.CR2, JBossAS-4.2.4.GA
There are a number of places in the UserTransaction initialisation and
TxPropogationContextUtil
that are doing jndi lookups() without closing the initial context.
Typically
new InitialContext().lookup(...);
This is inefficient since on the client side this will mean an rmi connection is open
until it gets garbage collected.
This has already been fixed in JBoss5 for the TxPropogationContextUtil (correct code
should look like this)
try
{
InitialContext ctx = new InitialContext();
try
{
tpcFactory = (TransactionPropagationContextFactory)
ctx.lookup(EXPORTER_JNDI_NAME);
}
finally
{
ctx.close();
}
}
catch (NamingException e)
{
throw new RuntimeException("Unable to lookup " +
EXPORTER_JNDI_NAME, e);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira