tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r629776 [1/2] - in /openejb/trunk/openejb3: ./ container/openejb-core/src/main/java/org/apache/openejb/ container/openejb-core/src/main/java/org/apache/openejb/config/ container/openejb-core/src/main/java/org/apache/openejb/core/stateful/ c...
Date Thu, 21 Feb 2008 13:29:00 GMT
Author: gdamour
Date: Thu Feb 21 05:28:54 2008
New Revision: 629776

URL: http://svn.apache.org/viewvc?rev=629776&view=rev
Log:
* Refactor StatefulInstanceManager and StatefulContainer to provide
necessary hooks to plug-in clustering logic for SFSB. The main refactoring
are done to StatefulInstanceManager where activation and passivation methods
have been extracted so that cluster aware sub-classes can invoke activation
and passivation logic at the appropriate time.
* Improve the protocol between EJB clients and EJB servers: JNDI and EJB 
requests carry a non collision free integer resulting from the ServerMetaData
locations attached to EJB clients. Server-side, if the request is served by
a ClusteredRPCContainer container, then this integer is campared with the
integer resulting from the locations attached to the ClusteredRPCContainer
container. If these integers differ, then the CRPCC locations are attached
to the JNDI or EJB responses. Locations propagated back to the EJB client
override the EJB client locations definition.
* Support new substitution group element openejb-clustering-wadi which has
been added to geronimo-openejb-2.0.xsd schema.

Added:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/ClusteredRPCContainer.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/OpenejbClusteringWadiType.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableRequest.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableResponse.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionFactoryStrategy.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/StickToLastServerConnectionFactoryStrategy.java
    openejb/trunk/openejb3/server/openejb-client/src/test/java/org/apache/openejb/client/ConnectionManagerTest.java
    openejb/trunk/openejb3/server/openejb-client/src/test/java/org/apache/openejb/client/ServerMetaDataTest.java
    openejb/trunk/openejb3/server/openejb-client/src/test/java/org/apache/openejb/client/StickToLastServerConnectionFactoryStrategyTest.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandler.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/ClusterableRequestHandler.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/
    openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/
    openejb/trunk/openejb3/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/BasicClusterableRequestHandlerTest.java
Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/BeanEntry.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulInstanceManager.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/GeronimoEjbJarType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/ObjectFactory.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/geronimo-openejb-full.xml
    openejb/trunk/openejb3/pom.xml
    openejb/trunk/openejb3/server/openejb-client/pom.xml
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionManager.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBInvocationHandler.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBRequest.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBResponse.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIRequest.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIResponse.java
    openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ServerMetaData.java
    openejb/trunk/openejb3/server/openejb-ejbd/pom.xml
    openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/EjbRequestHandler.java
    openejb/trunk/openejb3/server/openejb-ejbd/src/main/java/org/apache/openejb/server/ejbd/JndiRequestHandler.java

Added: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/ClusteredRPCContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/ClusteredRPCContainer.java?rev=629776&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/ClusteredRPCContainer.java (added)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/ClusteredRPCContainer.java Thu Feb 21 05:28:54 2008
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb;
+
+import java.net.URI;
+
+public interface ClusteredRPCContainer extends RpcContainer {
+    URI[] getLocations(DeploymentInfo info);
+}

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java Thu Feb 21 05:28:54 2008
@@ -100,10 +100,17 @@
     }
 
     public ConfigurationFactory(boolean offline, OpenEjbConfiguration configuration) {
-        this(offline);
+        this(offline, (DynamicDeployer) null);
         sys = configuration;
     }
 
+    public ConfigurationFactory(boolean offline,
+        DynamicDeployer preAutoConfigDeployer,
+        OpenEjbConfiguration configuration) {
+        this(offline, preAutoConfigDeployer);
+        sys = configuration;
+    }
+    
     public static List<HandlerChainInfo> toHandlerChainInfo(HandlerChains chains) {
         List<HandlerChainInfo> handlerChains = new ArrayList<HandlerChainInfo>();
         if (chains == null) return handlerChains;
@@ -145,6 +152,10 @@
     }
 
     public ConfigurationFactory(boolean offline) {
+        this(offline, (DynamicDeployer) null);
+    }
+    
+    public ConfigurationFactory(boolean offline, DynamicDeployer preAutoConfigDeployer) {
         this.offline = offline;
         deploymentLoader = new DeploymentLoader();
 
@@ -180,6 +191,10 @@
         if (System.getProperty("duct tape") != null){
             // must be after CmpJpaConversion since it adds new persistence-context-refs
             chain.add(new GeronimoMappedName());
+        }
+        
+        if (null != preAutoConfigDeployer) {
+            chain.add(preAutoConfigDeployer);
         }
 
         if (offline) {

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/BeanEntry.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/BeanEntry.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/BeanEntry.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/BeanEntry.java Thu Feb 21 05:28:54 2008
@@ -32,7 +32,7 @@
     protected final Object primaryKey;
     protected boolean inQueue = false;
     private long timeStamp;
-    private long timeOutInterval;
+    protected long timeOutInterval;
     protected transient Transaction beanTransaction;
     // todo if we keyed by an entity manager factory id we would not have to make this transient and rebuild the index below
     // This would require that we crete an id and that we track it
@@ -48,6 +48,14 @@
         timeOutInterval = timeOut;
     }
 
+    protected BeanEntry(BeanEntry prototype) {
+        bean = prototype.bean;
+        primaryKey = prototype.primaryKey;
+        beanTransaction = null;
+        timeStamp = prototype.timeStamp;
+        timeOutInterval = prototype.timeOutInterval;
+    }
+    
     protected boolean isTimedOut() {
         if (timeOutInterval == 0) {
             return false;
@@ -82,4 +90,13 @@
             entityManagerArray = null;
         }
     }
+
+    public Object getPrimaryKey() {
+        return primaryKey;
+    }
+
+    public Object getBean() {
+        return bean;
+    }
+
 }

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java Thu Feb 21 05:28:54 2008
@@ -68,9 +68,9 @@
     private final Object containerID;
     private final TransactionManager transactionManager;
     private final SecurityService securityService;
-    private final StatefulInstanceManager instanceManager;
+    protected final StatefulInstanceManager instanceManager;
     // todo this should be part of the constructor
-    private final JtaEntityManagerRegistry entityManagerRegistry = SystemInstance.get().getComponent(JtaEntityManagerRegistry.class);
+    protected final JtaEntityManagerRegistry entityManagerRegistry = SystemInstance.get().getComponent(JtaEntityManagerRegistry.class);
 
     /**
      * Index used for getDeployments() and getDeploymentInfo(deploymentId).
@@ -78,15 +78,41 @@
     protected final Map<Object, DeploymentInfo> deploymentsById = new HashMap<Object, DeploymentInfo>();
 
 
-    public StatefulContainer(Object id, TransactionManager transactionManager, SecurityService securityService, Class passivator, int timeOut, int poolSize, int bulkPassivate) throws OpenEJBException {
+    public StatefulContainer(Object id,
+        TransactionManager transactionManager,
+        SecurityService securityService,
+        Class passivator,
+        int timeOut,
+        int poolSize,
+        int bulkPassivate) throws OpenEJBException {
         this.containerID = id;
         this.transactionManager = transactionManager;
         this.securityService = securityService;
 
-        instanceManager = new StatefulInstanceManager(transactionManager, securityService, entityManagerRegistry, passivator, timeOut, poolSize, bulkPassivate);
+        instanceManager = newStatefulInstanceManager(transactionManager,
+            securityService,
+            passivator,
+            timeOut,
+            poolSize,
+            bulkPassivate);
+    }
+
+    protected StatefulInstanceManager newStatefulInstanceManager(TransactionManager transactionManager,
+        SecurityService securityService,
+        Class passivator,
+        int timeOut,
+        int poolSize,
+        int bulkPassivate) throws OpenEJBException {
+        return new StatefulInstanceManager(transactionManager,
+            securityService,
+            entityManagerRegistry,
+            passivator,
+            timeOut,
+            poolSize,
+            bulkPassivate);
     }
 
-    private Map<Method, MethodType> getLifecycelMethodsOfInterface(CoreDeploymentInfo deploymentInfo) {
+    private Map<Method, MethodType> getLifecycleMethodsOfInterface(CoreDeploymentInfo deploymentInfo) {
         Map<Method, MethodType> methods = new HashMap<Method, MethodType>();
 
         List<Method> removeMethods = deploymentInfo.getRemoveMethods();
@@ -174,7 +200,7 @@
         return methods;
     }
 
-    static enum MethodType {
+    public static enum MethodType {
         CREATE, REMOVE, BUSINESS
     }
 
@@ -214,7 +240,7 @@
     }
 
     private synchronized void deploy(CoreDeploymentInfo deploymentInfo) throws OpenEJBException {
-        Map<Method, MethodType> methods = getLifecycelMethodsOfInterface(deploymentInfo);
+        Map<Method, MethodType> methods = getLifecycleMethodsOfInterface(deploymentInfo);
 
         deploymentsById.put(deploymentInfo.getDeploymentID(), deploymentInfo);
         deploymentInfo.setContainer(this);
@@ -238,14 +264,11 @@
 
         switch (methodType) {
             case CREATE:
-                ProxyInfo proxyInfo = createEJBObject(deployInfo, callInterface, callMethod, args);
-                return proxyInfo;
+                return createEJBObject(deployInfo, callInterface, callMethod, args);
             case REMOVE:
-                Object o = removeEJBObject(deployInfo, primKey, callInterface, callMethod, args);
-                return o;
+                return removeEJBObject(deployInfo, primKey, callInterface, callMethod, args);
             default:
-                Object value = businessMethod(deployInfo, primKey, callInterface, callMethod, args);
-                return value;
+                return businessMethod(deployInfo, primKey, callInterface, callMethod, args);
         }
     }
 
@@ -369,7 +392,7 @@
         }
     }
 
-    private Object businessMethod(CoreDeploymentInfo deploymentInfo, Object primKey, Class callInterface, Method callMethod, Object[] args) throws OpenEJBException {
+    protected Object businessMethod(CoreDeploymentInfo deploymentInfo, Object primKey, Class callInterface, Method callMethod, Object[] args) throws OpenEJBException {
         ThreadContext callContext = new ThreadContext(deploymentInfo, primKey);
         ThreadContext oldCallContext = ThreadContext.enter(callContext);
         try {

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulInstanceManager.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulInstanceManager.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulInstanceManager.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulInstanceManager.java Thu Feb 21 05:28:54 2008
@@ -62,7 +62,7 @@
 public class StatefulInstanceManager {
     public static final Logger logger = Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources");
 
-    private final long timeOut;
+    protected final long timeOut;
 
     // queue of beans for LRU algorithm
     private final BeanEntryQueue lruQueue;
@@ -201,7 +201,7 @@
             InterceptorStack interceptorStack = new InterceptorStack(bean, null, Operation.POST_CONSTRUCT, callbackInterceptors, interceptorInstances);
             interceptorStack.invoke();
             
-            bean = new Instance(bean, interceptorInstances);
+            bean = newInstance(primaryKey, bean, interceptorInstances);
 
         } catch (Throwable callbackException) {
             /*
@@ -218,12 +218,20 @@
         }
 
         // add to index
-        BeanEntry entry = new BeanEntry(bean, primaryKey, timeOut);
+        BeanEntry entry = newBeanEntry(primaryKey, bean);
         getBeanIndex(threadContext).put(primaryKey, entry);
 
         return bean;
     }
 
+    protected Instance newInstance(Object primaryKey, Object bean, Map<String, Object> interceptorInstances) {
+        return new Instance(bean, interceptorInstances);
+    }
+
+    protected BeanEntry newBeanEntry(Object primaryKey, Object bean) {
+        return new BeanEntry(bean, primaryKey, timeOut);
+    }
+    
     private static void fillInjectionProperties(ObjectRecipe objectRecipe, Class clazz, CoreDeploymentInfo deploymentInfo, Context context) {
         for (Injection injection : deploymentInfo.getInjections()) {
             if (!injection.getTarget().isAssignableFrom(clazz)) continue;
@@ -307,6 +315,11 @@
             throw new InvalidateReferenceException(new NoSuchObjectException("Not Found"));
         }
 
+        return activateInstance(callContext, entry);
+    }
+
+    public Object activateInstance(ThreadContext callContext, BeanEntry entry)
+        throws SystemException, ApplicationException {
         if (entry.isTimedOut()) {
             // Since the bean instance hasn't had its ejbActivate() method called yet,
             // it is still considered to be passivated at this point. Instances that timeout
@@ -328,7 +341,6 @@
             InterceptorStack interceptorStack = new InterceptorStack(instance.bean, remove, Operation.ACTIVATE, callbackInterceptors, instance.interceptors);
 
             interceptorStack.invoke();
-
         } catch (Throwable callbackException) {
             /*
             In the event of an exception, OpenEJB is required to log the exception, evict the instance,
@@ -343,7 +355,7 @@
         }
 
         // add it to the index
-        getBeanIndex(callContext).put(primaryKey, entry);
+        getBeanIndex(callContext).put(entry.primaryKey, entry);
 
         return entry.bean;
     }
@@ -413,10 +425,15 @@
             if (entry.beanTransaction == null) {
                 // add it to end of Queue; the most reciently used bean
                 lruQueue.add(entry);
+                
+                onPoolInstanceWithoutTransaction(callContext, entry);
             }
         }
     }
 
+    protected void onPoolInstanceWithoutTransaction(ThreadContext callContext, BeanEntry entry) {
+    }
+
     public Object freeInstance(ThreadContext threadContext) throws SystemException {
         Object primaryKey = threadContext.getPrimaryKey();
         BeanEntry entry = getBeanIndex(threadContext).remove(primaryKey);// remove frm index
@@ -430,9 +447,14 @@
             return null;
         }
 
+        onFreeBeanEntry(threadContext, entry);
+        
         return entry.bean;
     }
 
+    protected void onFreeBeanEntry(ThreadContext threadContext, BeanEntry entry) {
+    }
+
     protected void passivate() throws SystemException {
         final ThreadContext threadContext = ThreadContext.getThreadContext();
         Hashtable<Object, BeanEntry> stateTable = new Hashtable<Object, BeanEntry>(bulkPassivationSize);
@@ -451,24 +473,7 @@
                 if (currentEntry.isTimedOut()) {
                     handleTimeout(currentEntry, threadContext);
                 } else {
-                    threadContext.setCurrentOperation(Operation.PASSIVATE);
-                    try {
-                        StatefulInstanceManager.Instance instance = (StatefulInstanceManager.Instance) currentEntry.bean;
-
-                        Method passivate = instance.bean instanceof SessionBean? SessionBean.class.getMethod("ejbPassivate"): null;
-
-                        List<InterceptorData> callbackInterceptors = deploymentInfo.getCallbackInterceptors();
-                        InterceptorStack interceptorStack = new InterceptorStack(instance.bean, passivate, Operation.PASSIVATE, callbackInterceptors, instance.interceptors);
-
-                        interceptorStack.invoke();
-
-                    } catch (Throwable e) {
-
-                        String logMessage = "An unexpected exception occured while invoking the ejbPassivate method on the Stateful SessionBean instance; " + e.getClass().getName() + " " + e.getMessage();
-
-                        /* [1] Log the exception or error */
-                        logger.error(logMessage);
-                    }
+                    passivate(threadContext, currentEntry);
                     stateTable.put(currentEntry.primaryKey, currentEntry);
                 }
             }
@@ -493,6 +498,28 @@
         }
     }
 
+    public void passivate(ThreadContext threadContext, BeanEntry currentEntry) {
+        CoreDeploymentInfo deploymentInfo = threadContext.getDeploymentInfo();
+        threadContext.setCurrentOperation(Operation.PASSIVATE);
+        try {
+            StatefulInstanceManager.Instance instance = (StatefulInstanceManager.Instance) currentEntry.bean;
+
+            Method passivate = instance.bean instanceof SessionBean? SessionBean.class.getMethod("ejbPassivate"): null;
+
+            List<InterceptorData> callbackInterceptors = deploymentInfo.getCallbackInterceptors();
+            InterceptorStack interceptorStack = new InterceptorStack(instance.bean, passivate, Operation.PASSIVATE, callbackInterceptors, instance.interceptors);
+
+            interceptorStack.invoke();
+
+        } catch (Throwable e) {
+
+            String logMessage = "An unexpected exception occured while invoking the ejbPassivate method on the Stateful SessionBean instance; " + e.getClass().getName() + " " + e.getMessage();
+
+            /* [1] Log the exception or error */
+            logger.error(logMessage);
+        }
+    }
+
     protected BeanEntry activate(Object primaryKey) throws SystemException {
         return (BeanEntry) passivator.activate(primaryKey);
     }
@@ -535,7 +562,7 @@
         return entry;
     }
 
-    private Hashtable<Object, BeanEntry> getBeanIndex(ThreadContext threadContext) {
+    protected Hashtable<Object, BeanEntry> getBeanIndex(ThreadContext threadContext) {
         CoreDeploymentInfo deployment = threadContext.getDeploymentInfo();
         Data data = (Data) deployment.getContainerData();
         return data.getBeanIndex();

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/GeronimoEjbJarType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/GeronimoEjbJarType.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/GeronimoEjbJarType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/GeronimoEjbJarType.java Thu Feb 21 05:28:54 2008
@@ -38,9 +38,40 @@
 import java.util.List;
 import java.util.ArrayList;
 
+/**
+ * <p>Java class for geronimo-ejb-jarType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="geronimo-ejb-jarType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}environment" minOccurs="0"/>
+ *         &lt;element ref="{http://geronimo.apache.org/xml/ns/j2ee/application-2.0}clustering" minOccurs="0"/>
+ *         &lt;element name="openejb-jar" type="{http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0}openejb-jarType" minOccurs="0"/>
+ *         &lt;group ref="{http://geronimo.apache.org/xml/ns/naming-1.2}jndiEnvironmentRefsGroup" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element ref="{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="tss-link" type="{http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0}tss-linkType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="web-service-binding" type="{http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0}web-service-bindingType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element ref="{http://geronimo.apache.org/xml/ns/j2ee/application-2.0}security" minOccurs="0"/>
+ *         &lt;choice maxOccurs="unbounded" minOccurs="0">
+ *           &lt;element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}service"/>
+ *           &lt;element ref="{http://java.sun.com/xml/ns/persistence}persistence"/>
+ *         &lt;/choice>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "geronimo-ejb-jarType", namespace = "http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0", propOrder = {
     "environment",
+    "clustering",
     "openejbJar",
     "abstractNamingEntry",
     "persistenceContextRef",
@@ -62,6 +93,9 @@
     @XmlElement(namespace = "http://geronimo.apache.org/xml/ns/deployment-1.2")
     protected EnvironmentType environment;
 
+    @XmlElementRef(name="clustering", namespace = "http://geronimo.apache.org/xml/ns/j2ee/application-1.2", type = JAXBElement.class)
+    protected JAXBElement<? extends AbstractClusteringType> clustering;
+
     @XmlAnyElement(lax = true)
     protected Object openejbJar;
 
@@ -131,7 +165,33 @@
         this.environment = value;
     }
 
+    /**
+     * 
+     *                         Reference to abstract clustering element defined in
+     *                         imported "geronimo-application-2.0.xsd"
+     *                     
+     * 
+     * @return
+     *     possible object is
+     *     {@link AbstractClusteringType }
+     *     
+     */
+    public JAXBElement<? extends AbstractClusteringType> getClustering() {
+        return clustering;
+    }
 
+    /**
+     * Sets the value of the clustering property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link AbstractClusteringType }
+     *     
+     */
+    public void setClustering(JAXBElement<? extends AbstractClusteringType> value) {
+        this.clustering = value;
+    }
+    
     /**
      * Gets the value of the jndiEnvironmentRefsGroup property.
      *

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/ObjectFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/ObjectFactory.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/ObjectFactory.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/ObjectFactory.java Thu Feb 21 05:28:54 2008
@@ -73,6 +73,7 @@
     private final static QName _OpenejbJar_QNAME = new QName("http://openejb.apache.org/xml/ns/openejb-jar-2.2", "openejb-jar");
     private final static QName _EjbRef_QNAME = new QName("http://geronimo.apache.org/xml/ns/naming-1.2", "ejb-ref");
     private final static QName _WebContainer_QNAME = new QName("http://geronimo.apache.org/xml/ns/naming-1.2", "web-container");
+    private final static QName _OpenejbClusteringWadi_QNAME = new QName("http://geronimo.apache.org/xml/ns/openejb-clustering-wadi-1.2", "openejb-clustering-wadi");
 
     /**
      * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.openejb.jee.oej2
@@ -876,6 +877,23 @@
     @XmlElementDecl(namespace = "http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0", name = "ejb-jar")
     public JAXBElement<GeronimoEjbJarType> createEjbJar(GeronimoEjbJarType value) {
         return new JAXBElement<GeronimoEjbJarType>(_EjbJar_QNAME, GeronimoEjbJarType.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link OpenejbClusteringWadiType }
+     * 
+     */
+    public OpenejbClusteringWadiType createOpenejbClusteringWadiType() {
+        return new OpenejbClusteringWadiType();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link OpenejbClusteringWadiType }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://geronimo.apache.org/xml/ns/openejb-clustering-wadi-1.2", name = "openejb-clustering-wadi", substitutionHeadNamespace = "http://geronimo.apache.org/xml/ns/j2ee/application-1.2", substitutionHeadName = "clustering")
+    public JAXBElement<OpenejbClusteringWadiType> createOpenejbClusteringWadi(OpenejbClusteringWadiType value) {
+        return new JAXBElement<OpenejbClusteringWadiType>(_OpenejbClusteringWadi_QNAME, OpenejbClusteringWadiType.class, null, value);
     }
 
 }

Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/OpenejbClusteringWadiType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/OpenejbClusteringWadiType.java?rev=629776&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/OpenejbClusteringWadiType.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/OpenejbClusteringWadiType.java Thu Feb 21 05:28:54 2008
@@ -0,0 +1,216 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openejb.jee.oejb2;
+
+import java.math.BigInteger;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for openejb-clustering-wadiType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="openejb-clustering-wadiType">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://geronimo.apache.org/xml/ns/j2ee/application-2.0}abstract-clusteringType">
+ *       &lt;sequence>
+ *         &lt;element name="sweepInterval" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *         &lt;element name="numPartitions" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
+ *         &lt;element name="cluster" type="{http://geronimo.apache.org/xml/ns/naming-1.2}patternType" minOccurs="0"/>
+ *         &lt;element name="disableReplication" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         &lt;element name="deltaReplication" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         &lt;element name="backing-strategy-factory" type="{http://geronimo.apache.org/xml/ns/naming-1.2}patternType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "openejb-clustering-wadiType", propOrder = {
+    "sweepInterval",
+    "numPartitions",
+    "cluster",
+    "disableReplication",
+    "deltaReplication",
+    "backingStrategyFactory"
+}, namespace = "http://geronimo.apache.org/xml/ns/openejb-clustering-wadi-1.2")
+public class OpenejbClusteringWadiType
+    extends AbstractClusteringType
+{
+
+    protected BigInteger sweepInterval;
+    protected BigInteger numPartitions;
+    protected PatternType cluster;
+    protected Boolean disableReplication;
+    protected Boolean deltaReplication;
+    @XmlElement(name = "backing-strategy-factory")
+    protected PatternType backingStrategyFactory;
+
+    /**
+     * Gets the value of the sweepInterval property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getSweepInterval() {
+        return sweepInterval;
+    }
+
+    /**
+     * Sets the value of the sweepInterval property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setSweepInterval(BigInteger value) {
+        this.sweepInterval = value;
+    }
+
+    /**
+     * Gets the value of the numPartitions property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getNumPartitions() {
+        return numPartitions;
+    }
+
+    /**
+     * Sets the value of the numPartitions property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setNumPartitions(BigInteger value) {
+        this.numPartitions = value;
+    }
+
+    /**
+     * Gets the value of the cluster property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PatternType }
+     *     
+     */
+    public PatternType getCluster() {
+        return cluster;
+    }
+
+    /**
+     * Sets the value of the cluster property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PatternType }
+     *     
+     */
+    public void setCluster(PatternType value) {
+        this.cluster = value;
+    }
+
+    /**
+     * Gets the value of the disableReplication property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isDisableReplication() {
+        return disableReplication;
+    }
+
+    /**
+     * Sets the value of the disableReplication property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setDisableReplication(Boolean value) {
+        this.disableReplication = value;
+    }
+
+    /**
+     * Gets the value of the deltaReplication property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isDeltaReplication() {
+        return deltaReplication;
+    }
+
+    /**
+     * Sets the value of the deltaReplication property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setDeltaReplication(Boolean value) {
+        this.deltaReplication = value;
+    }
+
+    /**
+     * Gets the value of the backingStrategyFactory property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PatternType }
+     *     
+     */
+    public PatternType getBackingStrategyFactory() {
+        return backingStrategyFactory;
+    }
+
+    /**
+     * Sets the value of the backingStrategyFactory property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PatternType }
+     *     
+     */
+    public void setBackingStrategyFactory(PatternType value) {
+        this.backingStrategyFactory = value;
+    }
+
+}

Modified: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/geronimo-openejb-full.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/geronimo-openejb-full.xml?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/geronimo-openejb-full.xml (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/geronimo-openejb-full.xml Thu Feb 21 05:28:54 2008
@@ -19,7 +19,7 @@
 
 <!-- $Rev$ $Date$ -->
 
-<ns4:ejb-jar xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ns2="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:ns3="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:ns4="http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0" xmlns:ns5="http://geronimo.apache.org/xml/ns/j2ee/application-1.2" xmlns:ns6="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:ns7="http://java.sun.com/xml/ns/persistence" xmlns:ns8="http://openejb.apache.org/xml/ns/pkgen-2.1">
+<ns6:ejb-jar xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ns2="http://geronimo.apache.org/xml/ns/j2ee/application-1.2" xmlns:ns3="http://geronimo.apache.org/xml/ns/openejb-clustering-wadi-1.2" xmlns:ns4="http://geronimo.apache.org/xml/ns/naming-1.2" xmlns:ns5="http://openejb.apache.org/xml/ns/openejb-jar-2.2" xmlns:ns6="http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0" xmlns:ns7="http://geronimo.apache.org/xml/ns/security-2.0" xmlns:ns8="http://java.sun.com/xml/ns/persistence" xmlns:ns9="http://openejb.apache.org/xml/ns/pkgen-2.1">
     <environment>
         <moduleId>
             <groupId>String</groupId>
@@ -54,363 +54,375 @@
         <inverse-classloading/>
         <suppress-default-environment/>
     </environment>
-    <ns4:openejb-jar xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
-	</ns4:openejb-jar>
-    <ns2:persistence-context-ref>
-        <ns2:persistence-context-ref-name>String</ns2:persistence-context-ref-name>
-        <ns2:persistence-unit-name>String</ns2:persistence-unit-name>
-        <ns2:persistence-context-type>transaction-scoped</ns2:persistence-context-type>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-    </ns2:persistence-context-ref>
-    <ns2:persistence-context-ref>
-        <ns2:persistence-context-ref-name>String</ns2:persistence-context-ref-name>
-        <ns2:persistence-unit-name>String</ns2:persistence-unit-name>
-        <ns2:persistence-context-type>transaction-scoped</ns2:persistence-context-type>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-    </ns2:persistence-context-ref>
-    <ns2:persistence-context-ref>
-        <ns2:persistence-context-ref-name>String</ns2:persistence-context-ref-name>
-        <ns2:persistence-unit-name>String</ns2:persistence-unit-name>
-        <ns2:persistence-context-type>transaction-scoped</ns2:persistence-context-type>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-    </ns2:persistence-context-ref>
-    <ns2:persistence-context-ref>
-        <ns2:persistence-context-ref-name>String</ns2:persistence-context-ref-name>
-        <ns2:persistence-unit-name>String</ns2:persistence-unit-name>
-        <ns2:persistence-context-type>transaction-scoped</ns2:persistence-context-type>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-        <ns2:property>
-            <ns2:key>String</ns2:key>
-            <ns2:value>String</ns2:value>
-        </ns2:property>
-    </ns2:persistence-context-ref>
-    <ns2:ejb-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-ref>
-    <ns2:ejb-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-ref>
-    <ns2:ejb-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-ref>
-    <ns2:ejb-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-ref>
-    <ns2:ejb-local-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-local-ref>
-    <ns2:ejb-local-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-local-ref>
-    <ns2:ejb-local-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-local-ref>
-    <ns2:ejb-local-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:ejb-local-ref>
-    <ns2:service-ref>
-        <ns2:service-ref-name>String</ns2:service-ref-name>
-        <ns2:service-completion>
-            <ns2:service-name>String</ns2:service-name>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-        </ns2:service-completion>
-    </ns2:service-ref>
-    <ns2:service-ref>
-        <ns2:service-ref-name>String</ns2:service-ref-name>
-        <ns2:service-completion>
-            <ns2:service-name>String</ns2:service-name>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-        </ns2:service-completion>
-    </ns2:service-ref>
-    <ns2:service-ref>
-        <ns2:service-ref-name>String</ns2:service-ref-name>
-        <ns2:service-completion>
-            <ns2:service-name>String</ns2:service-name>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-        </ns2:service-completion>
-    </ns2:service-ref>
-    <ns2:service-ref>
-        <ns2:service-ref-name>String</ns2:service-ref-name>
-        <ns2:service-completion>
-            <ns2:service-name>String</ns2:service-name>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-            <ns2:port-completion>
-                <ns2:port>
-                    <ns2:port-name>String</ns2:port-name>
-                    <ns2:protocol>String</ns2:protocol>
-                    <ns2:host>String</ns2:host>
-                    <ns2:port>0</ns2:port>
-                    <ns2:uri>String</ns2:uri>
-                    <ns2:credentials-name>String</ns2:credentials-name>
-                </ns2:port>
-                <ns2:binding-name>String</ns2:binding-name>
-            </ns2:port-completion>
-        </ns2:service-completion>
-    </ns2:service-ref>
-    <ns2:resource-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-ref>
-    <ns2:resource-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-ref>
-    <ns2:resource-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-ref>
-    <ns2:resource-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-ref>
-    <ns2:resource-env-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-env-ref>
-    <ns2:resource-env-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-env-ref>
-    <ns2:resource-env-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-env-ref>
-    <ns2:resource-env-ref>
-        <ns2:ref-name>String</ns2:ref-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:resource-env-ref>
-    <ns2:message-destination>
-        <ns2:message-destination-name>String</ns2:message-destination-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:message-destination>
-    <ns2:message-destination>
-        <ns2:message-destination-name>String</ns2:message-destination-name>
-        <ns2:pattern>
-            <ns2:groupId>String</ns2:groupId>
-            <ns2:artifactId>String</ns2:artifactId>
-            <ns2:version>String</ns2:version>
-            <ns2:module>String</ns2:module>
-            <ns2:name>String</ns2:name>
-        </ns2:pattern>
-    </ns2:message-destination>
-    <ns4:web-service-binding>
-        <ns4:ejb-name>FooBean</ns4:ejb-name>
-        <ns4:web-service-address>/foo/bean</ns4:web-service-address>
-        <ns4:web-service-virtual-host>http://host</ns4:web-service-virtual-host>
-        <ns4:web-service-security>
-            <ns4:security-realm-name>securityfoo</ns4:security-realm-name>
-            <ns4:realm-name>foorealm</ns4:realm-name>
-            <ns4:transport-guarantee>NONE</ns4:transport-guarantee>
-            <ns4:auth-method>BASIC</ns4:auth-method>
-        </ns4:web-service-security>
-    </ns4:web-service-binding>
+    <ns3:openejb-clustering-wadi>
+        <ns3:sweepInterval>10</ns3:sweepInterval>
+        <ns3:numPartitions>12</ns3:numPartitions>
+        <ns3:cluster>
+            <ns4:name>SpecificClusterName</ns4:name>
+        </ns3:cluster>
+        <ns3:disableReplication>true</ns3:disableReplication>
+        <ns3:deltaReplication>true</ns3:deltaReplication>
+        <ns3:backing-strategy-factory>
+            <ns4:name>SpecificFactoryName</ns4:name>
+        </ns3:backing-strategy-factory>
+    </ns3:openejb-clustering-wadi>
+    <ns6:openejb-jar xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
+	</ns6:openejb-jar>
+    <ns4:persistence-context-ref>
+        <ns4:persistence-context-ref-name>String</ns4:persistence-context-ref-name>
+        <ns4:persistence-unit-name>String</ns4:persistence-unit-name>
+        <ns4:persistence-context-type>transaction-scoped</ns4:persistence-context-type>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+    </ns4:persistence-context-ref>
+    <ns4:persistence-context-ref>
+        <ns4:persistence-context-ref-name>String</ns4:persistence-context-ref-name>
+        <ns4:persistence-unit-name>String</ns4:persistence-unit-name>
+        <ns4:persistence-context-type>transaction-scoped</ns4:persistence-context-type>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+    </ns4:persistence-context-ref>
+    <ns4:persistence-context-ref>
+        <ns4:persistence-context-ref-name>String</ns4:persistence-context-ref-name>
+        <ns4:persistence-unit-name>String</ns4:persistence-unit-name>
+        <ns4:persistence-context-type>transaction-scoped</ns4:persistence-context-type>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+    </ns4:persistence-context-ref>
+    <ns4:persistence-context-ref>
+        <ns4:persistence-context-ref-name>String</ns4:persistence-context-ref-name>
+        <ns4:persistence-unit-name>String</ns4:persistence-unit-name>
+        <ns4:persistence-context-type>transaction-scoped</ns4:persistence-context-type>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+        <ns4:property>
+            <ns4:key>String</ns4:key>
+            <ns4:value>String</ns4:value>
+        </ns4:property>
+    </ns4:persistence-context-ref>
+    <ns4:ejb-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-ref>
+    <ns4:ejb-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-ref>
+    <ns4:ejb-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-ref>
+    <ns4:ejb-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-ref>
+    <ns4:ejb-local-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-local-ref>
+    <ns4:ejb-local-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-local-ref>
+    <ns4:ejb-local-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-local-ref>
+    <ns4:ejb-local-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:ejb-local-ref>
+    <ns4:service-ref>
+        <ns4:service-ref-name>String</ns4:service-ref-name>
+        <ns4:service-completion>
+            <ns4:service-name>String</ns4:service-name>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+        </ns4:service-completion>
+    </ns4:service-ref>
+    <ns4:service-ref>
+        <ns4:service-ref-name>String</ns4:service-ref-name>
+        <ns4:service-completion>
+            <ns4:service-name>String</ns4:service-name>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+        </ns4:service-completion>
+    </ns4:service-ref>
+    <ns4:service-ref>
+        <ns4:service-ref-name>String</ns4:service-ref-name>
+        <ns4:service-completion>
+            <ns4:service-name>String</ns4:service-name>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+        </ns4:service-completion>
+    </ns4:service-ref>
+    <ns4:service-ref>
+        <ns4:service-ref-name>String</ns4:service-ref-name>
+        <ns4:service-completion>
+            <ns4:service-name>String</ns4:service-name>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+            <ns4:port-completion>
+                <ns4:port>
+                    <ns4:port-name>String</ns4:port-name>
+                    <ns4:protocol>String</ns4:protocol>
+                    <ns4:host>String</ns4:host>
+                    <ns4:port>0</ns4:port>
+                    <ns4:uri>String</ns4:uri>
+                    <ns4:credentials-name>String</ns4:credentials-name>
+                </ns4:port>
+                <ns4:binding-name>String</ns4:binding-name>
+            </ns4:port-completion>
+        </ns4:service-completion>
+    </ns4:service-ref>
+    <ns4:resource-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-ref>
+    <ns4:resource-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-ref>
+    <ns4:resource-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-ref>
+    <ns4:resource-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-ref>
+    <ns4:resource-env-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-env-ref>
+    <ns4:resource-env-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-env-ref>
+    <ns4:resource-env-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-env-ref>
+    <ns4:resource-env-ref>
+        <ns4:ref-name>String</ns4:ref-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:resource-env-ref>
+    <ns4:message-destination>
+        <ns4:message-destination-name>String</ns4:message-destination-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:message-destination>
+    <ns4:message-destination>
+        <ns4:message-destination-name>String</ns4:message-destination-name>
+        <ns4:pattern>
+            <ns4:groupId>String</ns4:groupId>
+            <ns4:artifactId>String</ns4:artifactId>
+            <ns4:version>String</ns4:version>
+            <ns4:module>String</ns4:module>
+            <ns4:name>String</ns4:name>
+        </ns4:pattern>
+    </ns4:message-destination>
+    <ns6:web-service-binding>
+        <ns6:ejb-name>FooBean</ns6:ejb-name>
+        <ns6:web-service-address>/foo/bean</ns6:web-service-address>
+        <ns6:web-service-virtual-host>http://host</ns6:web-service-virtual-host>
+        <ns6:web-service-security>
+            <ns6:security-realm-name>securityfoo</ns6:security-realm-name>
+            <ns6:realm-name>foorealm</ns6:realm-name>
+            <ns6:transport-guarantee>NONE</ns6:transport-guarantee>
+            <ns6:auth-method>BASIC</ns6:auth-method>
+        </ns6:web-service-security>
+    </ns6:web-service-binding>
     <gbean name="String" class="String">
         <attribute type="String" name="String">String</attribute>
         <attribute type="String" name="String">String</attribute>
@@ -419,4 +431,4 @@
         <attribute type="String" name="String">String</attribute>
         <attribute type="String" name="String">String</attribute>
     </gbean>
-</ns4:ejb-jar>
+</ns6:ejb-jar>

Modified: openejb/trunk/openejb3/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/pom.xml?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/pom.xml (original)
+++ openejb/trunk/openejb3/pom.xml Thu Feb 21 05:28:54 2008
@@ -498,6 +498,12 @@
         <version>4.4</version>
         <scope>test</scope>
       </dependency>
+       <dependency>
+        <groupId>com.agical.rmock</groupId>
+        <artifactId>rmock</artifactId>
+        <version>2.0.0</version>
+        <scope>test</scope>
+      </dependency>
       <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
@@ -854,4 +860,4 @@
       </plugin>
     </plugins>
   </reporting>
-</project>
\ No newline at end of file
+</project>

Modified: openejb/trunk/openejb3/server/openejb-client/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/pom.xml?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/pom.xml (original)
+++ openejb/trunk/openejb3/server/openejb-client/pom.xml Thu Feb 21 05:28:54 2008
@@ -105,5 +105,10 @@
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>com.agical.rmock</groupId>
+      <artifactId>rmock</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java (original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java Thu Feb 21 05:28:54 2008
@@ -17,12 +17,11 @@
 package org.apache.openejb.client;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
-import java.io.InputStream;
-import java.net.URI;
 import java.rmi.RemoteException;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -56,31 +55,7 @@
             /*----------------------------*/
             /* Get a connection to server */
             /*----------------------------*/
-            URI[] uris = server.getLocations();
-            for (int i = 0; i < uris.length; i++) {
-                URI uri = uris[i];
-                try {
-                    conn = ConnectionManager.getConnection(uri);
-                } catch (IOException e) {
-                    if (uris.length == 1){
-                        throw new RemoteException("Cannot connect to server '"+uri+'"', e);                        
-                    } else {
-                        logger.log(Level.WARNING, "Cannot connect to server(s): " + uri.getHost() + ":" + uri.getPort() + " Exception: ", e);
-                    }
-                } catch (Throwable e) {
-                    throw new RemoteException("Cannot connect to server: " + uri.getHost() + ":" + uri.getPort() + " due to an unkown exception in the OpenEJB client: ", e);
-                }
-            }
-            
-            // If no servers responded, throw an error
-            if (conn == null) {
-                StringBuffer buffer = new StringBuffer();
-                for (int i = 0; i < uris.length; i++) {
-                    URI uri = uris[i];
-                    buffer.append((i != 0 ? ", " : "") + "Server #" + i + ": " + uri);
-                }
-                throw new RemoteException("Cannot connect to any servers: " + buffer.toString());
-            }
+            conn = server.connect(req);
 
             /*----------------------------------*/
             /* Get output streams */
@@ -216,4 +191,5 @@
         }
         return res;
     }
+
 }

Added: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableRequest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableRequest.java?rev=629776&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableRequest.java (added)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableRequest.java Thu Feb 21 05:28:54 2008
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.client;
+
+
+public interface ClusterableRequest extends Request {
+    void setServerHash(int serverHash);
+
+    int getServerHash();
+}
+

Added: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableResponse.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableResponse.java?rev=629776&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableResponse.java (added)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ClusterableResponse.java Thu Feb 21 05:28:54 2008
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.client;
+
+
+public interface ClusterableResponse extends Response {
+    void setServer(ServerMetaData server);
+}

Added: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionFactoryStrategy.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionFactoryStrategy.java?rev=629776&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionFactoryStrategy.java (added)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionFactoryStrategy.java Thu Feb 21 05:28:54 2008
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.client;
+
+import java.io.Serializable;
+import java.net.URI;
+import java.rmi.RemoteException;
+
+public interface ConnectionFactoryStrategy extends Serializable {
+    Connection connect(URI[] locations, Request request) throws RemoteException;
+}

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionManager.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionManager.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionManager.java (original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/ConnectionManager.java Thu Feb 21 05:28:54 2008
@@ -48,6 +48,14 @@
         installFactory(factoryName);
     }
 
+    public static void setFactory(ConnectionFactory factory) throws IOException {
+        if (null == factory) {
+            throw new IllegalArgumentException("factory is required");
+        }
+        ConnectionManager.factory = factory;
+        factoryName = factory.getClass().getName();
+    }
+    
     public static ConnectionFactory getFactory() {
         return factory;
     }

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBInvocationHandler.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBInvocationHandler.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBInvocationHandler.java (original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBInvocationHandler.java Thu Feb 21 05:28:54 2008
@@ -121,7 +121,15 @@
 
     protected EJBResponse request(EJBRequest req) throws Exception {
         req.setClientIdentity(getClientIdentity());
-        return (EJBResponse) Client.request(req, new EJBResponse(), server);
+
+        req.setServerHash(server.buildHash());
+
+        EJBResponse response = new EJBResponse();
+        Client.request(req, response, server);
+        if (null != response.getServer()) {
+            server.merge(response.getServer());
+        }
+        return response;
     }
 
     protected Object getClientIdentity() {

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBRequest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBRequest.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBRequest.java (original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBRequest.java Thu Feb 21 05:28:54 2008
@@ -30,12 +30,13 @@
 
 import org.omg.CORBA.ORB;
 
-public class EJBRequest implements Request {
+public class EJBRequest implements ClusterableRequest {
 
     private transient int requestMethod;
     private transient int deploymentCode = 0;
     private transient Object clientIdentity;
     private transient String deploymentId;
+    private transient int serverHash;
 
     private transient Body body;
 
@@ -449,6 +450,14 @@
         this.deploymentCode = deploymentCode;
     }
 
+    public void setServerHash(int serverHash) {
+        this.serverHash = serverHash;
+    }
+
+    public int getServerHash() {
+        return serverHash;
+    }
+
     public String toString() {
         StringBuffer s = null;
         switch (requestMethod) {
@@ -525,6 +534,7 @@
         } catch (ClassNotFoundException cnfe) {
             if (result == null) result = cnfe;
         }
+        serverHash = in.readInt();
         if (result != null)
             throw result;
     }
@@ -540,6 +550,7 @@
 
         out.writeShort(deploymentCode);
         out.writeObject(clientIdentity);
+        out.writeInt(serverHash);
         body.writeExternal(out);
     }
 

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBResponse.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBResponse.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBResponse.java (original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/EJBResponse.java Thu Feb 21 05:28:54 2008
@@ -20,10 +20,11 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-public class EJBResponse implements Response {
+public class EJBResponse implements ClusterableResponse {
 
     private transient int responseCode = -1;
     private transient Object result;
+    private transient ServerMetaData server;
 
     public EJBResponse() {
 
@@ -47,6 +48,14 @@
         this.result = result;
     }
 
+    public void setServer(ServerMetaData server) {
+        this.server = server;
+    }
+
+    public ServerMetaData getServer() {
+        return server;
+    }
+    
     public String toString() {
         StringBuffer s = null;
         switch (responseCode) {
@@ -88,6 +97,12 @@
     public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         byte version = in.readByte(); // future use
 
+        boolean readServer = in.readBoolean();
+        if (readServer) {
+            server = new ServerMetaData();
+            server.readExternal(in);
+        }
+
         responseCode = in.readByte();
 
         result = in.readObject();
@@ -97,6 +112,13 @@
         // write out the version of the serialized data for future use
         out.writeByte(1);
 
+        if (null != server) {
+            out.writeBoolean(true);
+            server.writeExternal(out);
+        } else {
+            out.writeBoolean(false);
+        }
+
         out.writeByte(responseCode);
 
         switch (responseCode) {
@@ -110,4 +132,5 @@
         }
         out.writeObject(result);
     }
+
 }

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java (original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java Thu Feb 21 05:28:54 2008
@@ -79,7 +79,14 @@
     }
 
     private JNDIResponse request(JNDIRequest req) throws Exception {
-        return (JNDIResponse) Client.request(req, new JNDIResponse(), server);
+        req.setServerHash(server.buildHash());
+        
+        JNDIResponse response = new JNDIResponse();
+        Client.request(req, response, server);
+        if (null != response.getServer()) {
+            server.merge(response.getServer());
+        }
+        return response;
     }
 
     public static void print(String s) {

Modified: openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIRequest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIRequest.java?rev=629776&r1=629775&r2=629776&view=diff
==============================================================================
--- openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIRequest.java (original)
+++ openejb/trunk/openejb3/server/openejb-client/src/main/java/org/apache/openejb/client/JNDIRequest.java Thu Feb 21 05:28:54 2008
@@ -20,11 +20,12 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
-public class JNDIRequest implements Request {
+public class JNDIRequest implements ClusterableRequest {
 
     private transient int requestMethod = -1;
     private transient String requestString;
     private transient String moduleId;
+    private transient int serverHash;
 
     public JNDIRequest() {
     }
@@ -62,12 +63,21 @@
         this.requestString = requestString;
     }
 
+    public void setServerHash(int serverHash) {
+        this.serverHash = serverHash;
+    }
+
+    public int getServerHash() {
+        return serverHash;
+    }
+
     public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         byte version = in.readByte(); // future use
 
         requestMethod = in.readByte();
         requestString = in.readUTF();
         moduleId = (String) in.readObject();
+        serverHash = in.readInt();
     }
 
     public void writeExternal(ObjectOutput out) throws IOException {
@@ -77,6 +87,7 @@
         out.writeByte((byte) requestMethod);
         out.writeUTF(requestString);
         out.writeObject(moduleId);
+        out.writeInt(serverHash);
     }
 
     public String toString() {
@@ -91,5 +102,6 @@
         sb.append(this.requestString);
         return sb.toString();
     }
+
 }
 



Mime
View raw message