[JBoss JIRA] Created: (JBAS-5908) ClientUserTransactionObjectFactory is inefficient
by Adrian Brock (JIRA)
ClientUserTransactionObjectFactory is inefficient
-------------------------------------------------
Key: JBAS-5908
URL: https://jira.jboss.org/jira/browse/JBAS-5908
Project: JBoss Application Server
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Transaction Manager (JBossTM)
Affects Versions: JBossAS-4.2.3.GA, JBossAS-5.0.0.CR1
Reporter: Adrian Brock
Assignee: Galder Zamarreno
Fix For: JBossAS-5.0.0.CR2, JBossAS-4.2.4.GA
The ClientUserTransactionObjectFactory is inefficient.
1) It is doing initialisation based on a static cached instance
Since nothing holds a hard reference to this class, it can be garbage collected meaning the
initialisation can be done multiple times.
2) The determination and resolving of the ServerVMClientUserTransaction does the lookup
for the transaction twice. Once when initialising the singleton and again to see whether it should
use the singleton.
Both issues could be resolved by simplifying ClientUserTransactionObjectFactory.getUserTransaction()
to be something (which removes the need for the cached object)
static private UserTransaction getUserTransaction()
{
ServerVMClientUserTransaction serverUserTransaction = ServerVMClientUserTransaction.getSingleton();
if (serverUserTranasction.isServer())
return serverUserTransaction;
else
return ClientUserTransaction.getSingleton();
}
This would require a new method on ServerVMClientUserTransaction to detect whether it can be used,
i.e. it can locate a local transaction manager.
public boolean isServer()
{
return tm != null;
}
--
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
15 years, 7 months
[JBoss JIRA] Created: (JBAS-6194) Move transaction sticky logic in proxy to interceptors to avoid bottleneck
by Galder Zamarreno (JIRA)
Move transaction sticky logic in proxy to interceptors to avoid bottleneck
--------------------------------------------------------------------------
Key: JBAS-6194
URL: https://jira.jboss.org/jira/browse/JBAS-6194
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Clustering, Transaction Manager (JBossTM)
Affects Versions: JBossAS-5.0.0.CR2
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Fix For: JBossAS-5.0.0.GA
With the current user transaction sticky tpc retrieval method, a bottleneck can be formed when invocation
returns are too big. To avoid such bottleneck, we'll separate the transaction sticky logic in proxy into two
separate interceptors, one for EJBs, one for ClientUserTransactionService's clustered proxy.
By doing this, we're able to provide a cleaner solution, separating this logic from the proxy, and making it
even more optional, reducing the risks of affecting normal (non user transaction sticky) invocations.
Another interesting idea for the future would be to use a synchronised version of a weak IdentiyHashMap.
--
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
15 years, 7 months