1 45 46 package org.openejb.core; 47 48 import org.openejb.RpcContainer; 49 import org.openejb.OpenEJBException; 50 import org.openejb.core.transaction.TransactionContainer; 51 52 import javax.ejb.EnterpriseBean ; 53 import java.lang.reflect.Method ; 54 import java.util.HashMap ; 55 import java.util.Properties ; 56 57 60 public class RpcContainerWrapper implements RpcContainer, TransactionContainer { 61 62 private final RpcContainer container; 63 64 public RpcContainerWrapper(RpcContainer container) { 65 this.container = container; 66 } 67 68 public Object invoke(Object deployID, Method callMethod, Object [] args, Object primKey, Object securityIdentity) throws OpenEJBException { 69 return container.invoke(deployID, callMethod, args, primKey, securityIdentity); 70 } 71 72 public void init(Object containerId, HashMap deployments, Properties properties) throws OpenEJBException { 73 container.init(containerId, deployments, properties); 74 } 75 76 public int getContainerType( ) { 77 return container.getContainerType(); 78 } 79 80 public Object getContainerID() { 81 return container.getContainerID(); 82 } 83 84 public org.openejb.DeploymentInfo getDeploymentInfo(Object deploymentID) { 85 return container.getDeploymentInfo(deploymentID); 86 } 87 88 public org.openejb.DeploymentInfo [] deployments() { 89 return container.deployments(); 90 } 91 92 public void deploy(Object deploymentID, org.openejb.DeploymentInfo info) throws OpenEJBException { 93 container.deploy(deploymentID, info); 94 } 95 96 public void discardInstance(EnterpriseBean instance, ThreadContext context) { 97 ((TransactionContainer)container).discardInstance(instance, context); 98 } 99 100 public RpcContainer getContainer() { 101 return container; 102 } 103 104 } 105 | Popular Tags |