djencks 2004/07/18 18:32:20
Modified: modules/core/src/java/org/openejb/entity
EntityInstanceContext.java
EntityInstanceInterceptor.java
EntityInterceptorBuilder.java
Log:
Add timer support to session and mdbs. (entities still todo). Adapt to
TransactionContextManager. Adapt to deploying with external plan.
Revision Changes Path
1.6 +5 -4
openejb/modules/core/src/java/org/openejb/entity/EntityInstanceContext.java
Index: EntityInstanceContext.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/entity/EntityInstanceContext.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- EntityInstanceContext.java 7 Jul 2004 22:17:33 -0000 1.5
+++ EntityInstanceContext.java 18 Jul 2004 22:32:20 -0000 1.6
@@ -53,12 +53,13 @@
import javax.ejb.EntityContext;
import org.apache.geronimo.core.service.Interceptor;
-import org.apache.geronimo.transaction.TransactionContext;
+import org.apache.geronimo.transaction.context.TransactionContext;
import org.openejb.AbstractInstanceContext;
import org.openejb.EJBInvocation;
import org.openejb.EJBOperation;
import org.openejb.dispatch.SystemMethodIndices;
import org.openejb.proxy.EJBProxyFactory;
+import org.openejb.timer.TimerServiceImpl;
/**
*
@@ -73,8 +74,8 @@
private final EJBInvocation storeInvocation;
private boolean stateValid;
- public EntityInstanceContext(Object containerId, EJBProxyFactory proxyFactory,
EnterpriseBean instance, Interceptor lifecycleInterceptorChain, SystemMethodIndices
systemMethodIndices, Set unshareableResources, Set
applicationManagedSecurityResources) {
- super(systemMethodIndices, lifecycleInterceptorChain, unshareableResources,
applicationManagedSecurityResources, instance, proxyFactory);
+ public EntityInstanceContext(Object containerId, EJBProxyFactory proxyFactory,
EnterpriseBean instance, Interceptor lifecycleInterceptorChain, SystemMethodIndices
systemMethodIndices, Set unshareableResources, Set
applicationManagedSecurityResources, TimerServiceImpl timerService) {
+ super(systemMethodIndices, lifecycleInterceptorChain, unshareableResources,
applicationManagedSecurityResources, instance, proxyFactory, timerService);
this.containerId = containerId;
entityContext = new EntityContextImpl(this);
loadInvocation = systemMethodIndices.getEjbLoadInvocation(this);
1.8 +2 -2
openejb/modules/core/src/java/org/openejb/entity/EntityInstanceInterceptor.java
Index: EntityInstanceInterceptor.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/entity/EntityInstanceInterceptor.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- EntityInstanceInterceptor.java 7 Jul 2004 22:17:33 -0000 1.7
+++ EntityInstanceInterceptor.java 18 Jul 2004 22:32:20 -0000 1.8
@@ -56,7 +56,7 @@
import org.apache.geronimo.core.service.Invocation;
import org.apache.geronimo.core.service.InvocationResult;
import org.apache.geronimo.transaction.InstanceContext;
-import org.apache.geronimo.transaction.TransactionContext;
+import org.apache.geronimo.transaction.context.TransactionContext;
import org.openejb.EJBInvocation;
import org.openejb.EJBOperation;
1.7 +4 -4
openejb/modules/core/src/java/org/openejb/entity/EntityInterceptorBuilder.java
Index: EntityInterceptorBuilder.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/entity/EntityInterceptorBuilder.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- EntityInterceptorBuilder.java 7 Jul 2004 22:17:33 -0000 1.6
+++ EntityInterceptorBuilder.java 18 Jul 2004 22:32:20 -0000 1.7
@@ -69,8 +69,8 @@
public class EntityInterceptorBuilder extends AbstractInterceptorBuilder {
public TwoChains buildInterceptorChains() {
- if (transactionManager == null) {
- throw new IllegalStateException("Transaction manager must be set before
building the interceptor chain");
+ if (transactionContextManager == null) {
+ throw new IllegalStateException("Transaction context manager must be
set before building the interceptor chain");
}
if (instancePool == null) {
throw new IllegalStateException("Pool must be set before building the
interceptor chain");
@@ -96,7 +96,7 @@
firstInterceptor = new
PolicyContextHandlerEJBInterceptor(firstInterceptor);
}
firstInterceptor = new EntityInstanceInterceptor(firstInterceptor,
instancePool);
- firstInterceptor = new TransactionContextInterceptor(firstInterceptor,
transactionManager, transactionPolicyManager);
+ firstInterceptor = new TransactionContextInterceptor(firstInterceptor,
transactionContextManager, transactionPolicyManager);
firstInterceptor = new SystemExceptionInterceptor(firstInterceptor,
ejbName);
return new TwoChains(firstInterceptor, systemChain);
}