You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by ji...@apache.org on 2004/04/06 17:38:43 UTC
[jira] Created: (GERONIMO-161) LocalXAResourceInsertionInterceptor could use XAResource implementation
Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/GERONIMO-161
Here is an overview of the issue:
---------------------------------------------------------------------
Key: GERONIMO-161
Summary: LocalXAResourceInsertionInterceptor could use XAResource implementation
Type: Improvement
Status: Unassigned
Priority: Major
Project: Apache Geronimo
Components:
core
Assignee:
Reporter: hamilton verissimo
Created: Tue, 6 Apr 2004 8:37 AM
Updated: Tue, 6 Apr 2004 8:37 AM
Description:
LocalXAResourceInsertionInterceptor could use XAResource from ManagedConnection instead of always build a wrapper to a XAResource delegating to LocalTransaction.
Follows the patch.
Index: LocalXAResourceInsertionInterceptor.java
===================================================================
RCS file: /home/cvspublic/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/outbound/LocalXAResourceInsertionInterceptor.java,v
retrieving revision 1.3
diff -u -r1.3 LocalXAResourceInsertionInterceptor.java
--- LocalXAResourceInsertionInterceptor.java 10 Mar 2004 09:58:32 -0000 1.3
+++ LocalXAResourceInsertionInterceptor.java 6 Apr 2004 15:33:54 -0000
@@ -18,6 +18,7 @@
package org.apache.geronimo.connector.outbound;
import javax.resource.ResourceException;
+import javax.transaction.xa.XAResource;
/**
* LocalXAResourceInsertionInterceptor.java
@@ -37,7 +38,20 @@
public void getConnection(ConnectionInfo connectionInfo) throws ResourceException {
next.getConnection(connectionInfo);
+
+
ManagedConnectionInfo mci = connectionInfo.getManagedConnectionInfo();
+
+ try
+ {
+ XAResource resource = mci.getManagedConnection().getXAResource();
+ mci.setXAResource( resource );
+ return;
+ }
+ catch(Exception ignores)
+ {
+ }
+
mci.setXAResource(
new LocalXAResource(
mci.getManagedConnection().getLocalTransaction()));
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (GERONIMO-161) LocalXAResourceInsertionInterceptor could use XAResource implementation
Posted by ji...@apache.org.
The following comment has been added to this issue:
Author: David Jencks
Created: Tue, 6 Apr 2004 9:59 AM
Body:
I can see no reason for this patch.
1. If the adapter supports XA and you want to use 2pc, you should configure the ConnectionManagerDeployment with useLocalTransactions = false. Any transaction that has only one enlisted resource will have XAResource.commit(onePhase= true) called on it anyway.
2. If the adapter supports XA and you want to force it to use 1pc, the LocalTransaction implementation supplied by the adapter is likely to be faster than the XAResource.commit(onePhase = true) call. This patch prevents the use of the LocalTransaction in this situation.
3. If the adapter doesn't support XA, this patch only adds the time to process an exception to the setup time for a connection. (assuming the adapter throws an exception rather than returning null)
Please explain why this patch is a good idea.
thanks
david jencks
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/GERONIMO-161?page=comments#action_27980
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/GERONIMO-161
Here is an overview of the issue:
---------------------------------------------------------------------
Key: GERONIMO-161
Summary: LocalXAResourceInsertionInterceptor could use XAResource implementation
Type: Improvement
Status: Open
Priority: Major
Project: Apache Geronimo
Components:
core
Assignee: David Jencks
Reporter: hamilton verissimo
Created: Tue, 6 Apr 2004 8:37 AM
Updated: Tue, 6 Apr 2004 9:59 AM
Description:
LocalXAResourceInsertionInterceptor could use XAResource from ManagedConnection instead of always build a wrapper to a XAResource delegating to LocalTransaction.
Follows the patch.
Index: LocalXAResourceInsertionInterceptor.java
===================================================================
RCS file: /home/cvspublic/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/outbound/LocalXAResourceInsertionInterceptor.java,v
retrieving revision 1.3
diff -u -r1.3 LocalXAResourceInsertionInterceptor.java
--- LocalXAResourceInsertionInterceptor.java 10 Mar 2004 09:58:32 -0000 1.3
+++ LocalXAResourceInsertionInterceptor.java 6 Apr 2004 15:33:54 -0000
@@ -18,6 +18,7 @@
package org.apache.geronimo.connector.outbound;
import javax.resource.ResourceException;
+import javax.transaction.xa.XAResource;
/**
* LocalXAResourceInsertionInterceptor.java
@@ -37,7 +38,20 @@
public void getConnection(ConnectionInfo connectionInfo) throws ResourceException {
next.getConnection(connectionInfo);
+
+
ManagedConnectionInfo mci = connectionInfo.getManagedConnectionInfo();
+
+ try
+ {
+ XAResource resource = mci.getManagedConnection().getXAResource();
+ mci.setXAResource( resource );
+ return;
+ }
+ catch(Exception ignores)
+ {
+ }
+
mci.setXAResource(
new LocalXAResource(
mci.getManagedConnection().getLocalTransaction()));
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Updated: (GERONIMO-161) LocalXAResourceInsertionInterceptor could use XAResource implementation
Posted by ji...@apache.org.
The following issue has been updated:
Updater: hamilton verissimo (mailto:hammett@apache.org)
Date: Tue, 6 Apr 2004 8:38 AM
Changes:
Attachment changed to LocalXAResourceInsertionInterceptor.patch
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/GERONIMO-161?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/GERONIMO-161
Here is an overview of the issue:
---------------------------------------------------------------------
Key: GERONIMO-161
Summary: LocalXAResourceInsertionInterceptor could use XAResource implementation
Type: Improvement
Status: Unassigned
Priority: Major
Project: Apache Geronimo
Components:
core
Assignee:
Reporter: hamilton verissimo
Created: Tue, 6 Apr 2004 8:37 AM
Updated: Tue, 6 Apr 2004 8:38 AM
Description:
LocalXAResourceInsertionInterceptor could use XAResource from ManagedConnection instead of always build a wrapper to a XAResource delegating to LocalTransaction.
Follows the patch.
Index: LocalXAResourceInsertionInterceptor.java
===================================================================
RCS file: /home/cvspublic/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/outbound/LocalXAResourceInsertionInterceptor.java,v
retrieving revision 1.3
diff -u -r1.3 LocalXAResourceInsertionInterceptor.java
--- LocalXAResourceInsertionInterceptor.java 10 Mar 2004 09:58:32 -0000 1.3
+++ LocalXAResourceInsertionInterceptor.java 6 Apr 2004 15:33:54 -0000
@@ -18,6 +18,7 @@
package org.apache.geronimo.connector.outbound;
import javax.resource.ResourceException;
+import javax.transaction.xa.XAResource;
/**
* LocalXAResourceInsertionInterceptor.java
@@ -37,7 +38,20 @@
public void getConnection(ConnectionInfo connectionInfo) throws ResourceException {
next.getConnection(connectionInfo);
+
+
ManagedConnectionInfo mci = connectionInfo.getManagedConnectionInfo();
+
+ try
+ {
+ XAResource resource = mci.getManagedConnection().getXAResource();
+ mci.setXAResource( resource );
+ return;
+ }
+ catch(Exception ignores)
+ {
+ }
+
mci.setXAResource(
new LocalXAResource(
mci.getManagedConnection().getLocalTransaction()));
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira