[jboss-cvs] JBossAS SVN: r65502 - trunk/ejb3/src/main/org/jboss/ejb3/iiop.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 20 12:09:31 EDT 2007
Author: reverbel
Date: 2007-09-20 12:09:31 -0400 (Thu, 20 Sep 2007)
New Revision: 65502
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java
Log:
Remove the hardcoded dependency to TxServerInterceptor, use the SPI InboundTransactionCurrent instead.
Modified: trunk/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java 2007-09-20 15:55:42 UTC (rev 65501)
+++ trunk/ejb3/src/main/org/jboss/ejb3/iiop/BeanCorbaServant.java 2007-09-20 16:09:31 UTC (rev 65502)
@@ -39,12 +39,12 @@
import org.jboss.iiop.rmi.OperationAnalysis;
import org.jboss.iiop.rmi.RmiIdlUtil;
import org.jboss.iiop.rmi.marshal.strategy.SkeletonStrategy;
+import org.jboss.iiop.tm.InboundTransactionCurrent;
import org.jboss.invocation.iiop.ReferenceData;
import org.jboss.logging.Logger;
import org.jboss.security.SecurityAssociation;
import org.jboss.security.SimplePrincipal;
import org.jboss.tm.TransactionManagerLocator;
-import org.jboss.tm.iiop.TxServerInterceptor;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.InterfaceDef;
import org.omg.CORBA.SystemException;
@@ -61,6 +61,7 @@
* Comment
*
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author <a href="mailto:reverbel at ime.usp.br">Francisco Reverbel</a>
* @version $Revision$
*/
public class BeanCorbaServant extends Servant
@@ -74,6 +75,7 @@
private final InterfaceDef interfaceDef;
private final String repositoryIds[];
private SASCurrent sasCurrent;
+ private InboundTransactionCurrent inboundTxCurrent;
private HashMap<String, SkeletonStrategy> methodMap;
@@ -101,6 +103,16 @@
log.warn("Can't find SASCurrent");
this.sasCurrent = null;
}
+ try
+ {
+ this.inboundTxCurrent = (InboundTransactionCurrent)
+ CorbaORB.getInstance().resolve_initial_references(InboundTransactionCurrent.NAME);
+ }
+ catch (InvalidName e)
+ {
+ log.warn("Can't find InboundTransactionCurrent");
+ this.inboundTxCurrent = null;
+ }
this.methodMap = new HashMap<String, SkeletonStrategy>();
AttributeAnalysis[] attrs = interfaceAnalysis.getAttributes();
@@ -161,7 +173,9 @@
Object id = ReferenceData.extractObjectId(poaCurrent.get_object_id());
log.trace("id = " + id);
- Transaction tx = TxServerInterceptor.getCurrentTransaction();
+ Transaction tx = null;
+ if (inboundTxCurrent != null)
+ tx = inboundTxCurrent.getCurrentTransaction();
log.trace("tx = " + tx);
if(sasCurrent != null)
More information about the jboss-cvs-commits
mailing list