dain 2004/04/13 16:18:49
Modified: modules/core/src/java/org/openejb
AbstractContainerBuilder.java EJBContainer.java
GenericEJBContainer.java
Log:
Added support for ejb-ref and ejb-local-ref
Change EJBProxyFactory to only need a ProxyInfo to construct proxies
Added a hack version of Stateful BMT policy (does not handle holding a tx
open between calls)
Revision Changes Path
1.8 +2 -2
openejb/modules/core/src/java/org/openejb/AbstractContainerBuilder.java
Index: AbstractContainerBuilder.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/AbstractContainerBuilder.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractContainerBuilder.java 11 Apr 2004 05:55:25 -0000 1.7
+++ AbstractContainerBuilder.java 13 Apr 2004 20:18:49 -0000 1.8
@@ -276,7 +276,7 @@
localHomeInterface,
localInterface,
primaryKeyClass);
- return new EJBProxyFactory(proxyInfo, signatures);
+ return new EJBProxyFactory(proxyInfo);
}
protected SoftLimitedInstancePool createInstancePool(InstanceFactory
instanceFactory) {
1.5 +7 -4 openejb/modules/core/src/java/org/openejb/EJBContainer.java
Index: EJBContainer.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/EJBContainer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EJBContainer.java 12 Apr 2004 08:31:40 -0000 1.4
+++ EJBContainer.java 13 Apr 2004 20:18:49 -0000 1.5
@@ -56,6 +56,7 @@
import org.apache.geronimo.core.service.Interceptor;
import org.openejb.proxy.EJBProxyFactory;
+import org.openejb.dispatch.InterfaceMethodSignature;
/**
* Interface exposed by server side EJB Containers to allow the interceptor
@@ -64,7 +65,7 @@
* @version $Revision$ $Date$
*/
public interface EJBContainer extends Interceptor {
-
+
/**
* Unique id used for locating the container
* No assumptions are made about the type of
@@ -72,7 +73,7 @@
* @return the id of the container
*/
Object getContainerID();
-
+
/**
* Return the name of the EJB
* @return the name of the EJB
@@ -130,5 +131,7 @@
ClassLoader getClassLoader();
EJBContainer getUnmanagedReference();
-
+
+ InterfaceMethodSignature[] getSignatures();
+
}
1.8 +12 -7
openejb/modules/core/src/java/org/openejb/GenericEJBContainer.java
Index: GenericEJBContainer.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/GenericEJBContainer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- GenericEJBContainer.java 12 Apr 2004 08:31:40 -0000 1.7
+++ GenericEJBContainer.java 13 Apr 2004 20:18:49 -0000 1.8
@@ -49,9 +49,6 @@
import java.lang.reflect.Method;
import java.rmi.RemoteException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
import javax.ejb.EJBHome;
import javax.ejb.EJBLocalHome;
import javax.ejb.EJBLocalObject;
@@ -72,7 +69,6 @@
import org.openejb.client.EJBObjectProxy;
import org.openejb.dispatch.InterfaceMethodSignature;
import org.openejb.proxy.EJBProxyFactory;
-import org.openejb.proxy.ProxyInfo;
/**
* @version $Revision$ $Date$
@@ -84,6 +80,7 @@
private final Interceptor interceptor;
private final EJBProxyFactory proxyFactory;
+ private final InterfaceMethodSignature[] signatures;
private final String[] jndiNames;
private final String[] localJndiNames;
@@ -116,6 +113,7 @@
this.ejbName = ejbName;
this.jndiNames = copyNames(jndiNames);
this.localJndiNames = copyNames(localJndiNames);
+ this.signatures = signatures;
// initialize the proxy factory
proxyFactory.setContainer(this);
@@ -223,10 +221,17 @@
return proxyFactory;
}
+ public InterfaceMethodSignature[] getSignatures() {
+ // return a copy just to be safe... this method should not be called often
+ InterfaceMethodSignature[] copy = new
InterfaceMethodSignature[signatures.length];
+ System.arraycopy(signatures, 0, copy, 0, signatures.length);
+ return copy;
+ }
+
public EJBContainer getUnmanagedReference(){
return this;
}
-
+
private static String[] copyNames(String[] names) {
if(names == null) {
return null;
@@ -261,7 +266,7 @@
infoFactory.addAttribute("EJBHome", false);
infoFactory.addAttribute("EJBLocalHome", false);
infoFactory.addAttribute("UnmanagedReference", false);
-
+
GBEAN_INFO = infoFactory.getBeanInfo();
}