svn commit: r795024 [3/6] - in /ofbiz/branches/executioncontext20090716: ./ applications/content/src/org/ofbiz/content/content/ applications/order/src/org/ofbiz/order/order/ applications/party/src/org/ofbiz/party/party/ applications/product/src/org/ofb...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r795024 [3/6] - in /ofbiz/branches/executioncontext20090716: ./ applications/content/src/org/ofbiz/content/content/ applications/order/src/org/ofbiz/order/order/ applications/party/src/org/ofbiz/party/party/ applications/product/src/org/ofb...

jonesde
Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelEntityInterface.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelEntityInterface.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelEntityInterface.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelEntityInterface.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,158 @@
+/*
+ * 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.ofbiz.context.entity;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public interface ModelEntityInterface extends Serializable {
+
+    public boolean containsAllPkFieldNames(Set<String> fieldNames);
+
+    // ===== GETTERS/SETTERS =====
+    /** The entity-name of the Entity */
+    public String getEntityName();
+
+    public void setEntityName(String entityName);
+
+    /** The plain table-name of the Entity without a schema name prefix */
+    public String getPlainTableName();
+
+    /** The table-name of the Entity including a Schema name if specified in the datasource config */
+    public String getTableName(String helperName);
+
+    public void setTableName(String tableName);
+
+    /** The package-name of the Entity */
+    public String getPackageName();
+
+    public void setPackageName(String packageName);
+
+    /** The default-resource-name of the Entity */
+    public String getDefaultResourceName();
+
+    public void setDefaultResourceName(String defaultResourceName);
+
+    /** The entity-name of the Entity that this Entity is dependent on, if empty then no dependency */
+    public String getDependentOn();
+
+    public void setDependentOn(String dependentOn);
+
+    /** An indicator to specify if this entity is never cached.
+     * If true causes the delegator to not clear caches on write and to not get
+     * from cache on read showing a warning messages to that effect
+     */
+    public boolean getNeverCache();
+
+    public void setNeverCache(boolean neverCache);
+
+    public boolean getAutoClearCache();
+
+    public void setAutoClearCache(boolean autoClearCache);
+
+    public boolean getHasFieldWithAuditLog();
+
+    /* Get the location of this entity's definition */
+    public String getLocation();
+
+    /* Set the location of this entity's definition */
+    public void setLocation(String location);
+
+    /** An indicator to specify if this entity requires locking for updates */
+    public boolean getDoLock();
+
+    public void setDoLock(boolean doLock);
+
+    public boolean lock();
+
+    public Integer getSequenceBankSize();
+
+    public void updatePkLists();
+
+    public boolean isField(String fieldName);
+
+    public boolean areFields(Collection<String> fieldNames);
+
+    public int getPksSize();
+
+    public ModelFieldInterface getOnlyPk();
+
+    public Iterator<ModelFieldInterface> getPksIterator();
+
+    public List<ModelFieldInterface> getPkFieldsUnmodifiable();
+
+    public String getFirstPkFieldName();
+
+    public int getNopksSize();
+
+    public Iterator<ModelFieldInterface> getNopksIterator();
+
+    public List<ModelFieldInterface> getNopksCopy();
+
+    public int getFieldsSize();
+
+    public Iterator<ModelFieldInterface> getFieldsIterator();
+
+    public List<ModelFieldInterface> getFieldsUnmodifiable();
+
+    /** The col-name of the Field, the alias of the field if this is on a view-entity */
+    public String getColNameOrAlias(String fieldName);
+
+    public ModelFieldInterface getField(String fieldName);
+
+    public List<String> getAllFieldNames();
+
+    public List<String> getPkFieldNames();
+
+    public List<String> getNoPkFieldNames();
+
+    public int getRelationsSize();
+
+    public int getRelationsOneSize();
+
+    public ModelRelationInterface getRelation(int index);
+
+    public Iterator<ModelRelationInterface> getRelationsIterator();
+
+    public List<ModelRelationInterface> getRelationsList(boolean includeOne, boolean includeOneNoFk, boolean includeMany);
+
+    public List<ModelRelationInterface> getRelationsOneList();
+
+    public List<ModelRelationInterface> getRelationsManyList();
+
+    public ModelRelationInterface getRelation(String relationName);
+
+    /**
+     * @return Returns the noAutoStamp.
+     */
+    public boolean getNoAutoStamp();
+
+    /**
+     * @param noAutoStamp The noAutoStamp to set.
+     */
+    public void setNoAutoStamp(boolean noAutoStamp);
+
+    public Element toXmlElement(Document document);
+}

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelEntityInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelEntityInterface.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelEntityInterface.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelFieldInterface.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelFieldInterface.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelFieldInterface.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelFieldInterface.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * 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.ofbiz.context.entity;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Generic Entity - Field model class
+ *
+ */
+public interface ModelFieldInterface {
+
+    /** The name of the Field */
+    public String getName();
+
+    public void setName(String name);
+
+    /** The type of the Field */
+    public String getType();
+
+    public void setType(String type);
+
+    /** The col-name of the Field */
+    public String getColName();
+
+    public void setColName(String colName);
+
+    /** boolean which specifies whether or not the Field is a Primary Key */
+    public boolean getIsPk();
+
+    public void setIsPk(boolean isPk);
+
+    public boolean getIsNotNull();
+
+    public void setIsNotNull(boolean isNotNull);
+
+    public boolean getEncrypt();
+
+    public void setEncrypt(boolean encrypt);
+
+    public boolean getEnableAuditLog();
+
+    public boolean getIsAutoCreatedInternal();
+
+    public void setIsAutoCreatedInternal(boolean isAutoCreatedInternal);
+
+    /** validators to be called when an update is done */
+    public String getValidator(int index);
+
+    public int getValidatorsSize();
+
+    public void addValidator(String validator);
+
+    public String removeValidator(int index);
+
+    public Element toXmlElement(Document document);
+}

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelFieldInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelFieldInterface.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelFieldInterface.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelKeyMapInterface.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelKeyMapInterface.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelKeyMapInterface.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelKeyMapInterface.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.ofbiz.context.entity;
+
+import java.io.Serializable;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+
+/**
+ * Generic Entity - KeyMap model class
+ *
+ */
+public interface ModelKeyMapInterface extends Serializable {
+
+    /** name of the field in this entity */
+    public String getFieldName();
+
+    public void setFieldName(String fieldName);
+
+    /** name of the field in related entity */
+    public String getRelFieldName();
+
+    public void setRelFieldName(String relFieldName);
+
+    public Element toXmlElement(Document document);
+}

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelKeyMapInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelKeyMapInterface.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelKeyMapInterface.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelRelationInterface.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelRelationInterface.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelRelationInterface.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelRelationInterface.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,79 @@
+/*
+ * 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.ofbiz.context.entity;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Generic Entity - Relation model class
+ *
+ */
+public interface ModelRelationInterface {
+
+    public String getCombinedName();
+
+    /** the title, gives a name/description to the relation */
+    public String getTitle();
+
+    public void setTitle(String title);
+
+    /** the type: either "one" or "many" or "one-nofk" */
+    public String getType();
+
+    public void setType(String type);
+
+    /** the name of the related entity */
+    public String getRelEntityName();
+
+    public void setRelEntityName(String relEntityName);
+
+    public String getFkName();
+
+    public void setFkName(String fkName);
+
+    /** keyMaps defining how to lookup the relatedTable using columns from this table */
+    public Iterator<ModelKeyMapInterface> getKeyMapsIterator();
+
+    public List<ModelKeyMapInterface> getKeyMapsClone();
+
+    public int getKeyMapsSize();
+
+    public ModelKeyMapInterface getKeyMap(int index);
+
+    /** Find a KeyMap with the specified fieldName */
+    public ModelKeyMapInterface findKeyMap(String fieldName);
+
+    /** Find a KeyMap with the specified relFieldName */
+    public ModelKeyMapInterface findKeyMapByRelated(String relFieldName);
+
+    /**
+     * @return Returns the isAutoRelation.
+     */
+    public boolean isAutoRelation();
+    /**
+     * @param isAutoRelation The isAutoRelation to set.
+     */
+    public void setAutoRelation(boolean isAutoRelation);
+
+    public Element toXmlElement(Document document);
+}

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelRelationInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelRelationInterface.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/entity/ModelRelationInterface.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericRequester.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericRequester.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericRequester.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericRequester.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * 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.ofbiz.context.service;
+
+import java.util.Map;
+import java.io.Serializable;
+
+/**
+ * Generic Requester Interface
+ */
+public interface GenericRequester extends Serializable {
+
+    /**
+     * Receive the result of an asynchronous service call
+     * @param result Map of name, value pairs composing the result
+     */
+    public void receiveResult(Map<String, Object> result);
+
+    /**
+     * Receive an exception (Throwable) from an asynchronous service cell
+     * @param t The Throwable which was received
+     */
+    public void receiveThrowable(Throwable t);
+}
+

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericRequester.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericRequester.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericRequester.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericResultWaiter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericResultWaiter.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericResultWaiter.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericResultWaiter.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,129 @@
+/*******************************************************************************
+ * 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.ofbiz.context.service;
+
+import java.util.Map;
+
+import org.ofbiz.base.util.Debug;
+
+/**
+ * Generic Result Waiter Class
+ */
+@SuppressWarnings("serial")
+public class GenericResultWaiter implements GenericRequester {
+
+    public static final String module = GenericResultWaiter.class.getName();
+
+    /** Status code for a running service */
+    public static final int SERVICE_RUNNING = -1;
+    /** Status code for a failed service */
+    public static final int SERVICE_FAILED = 0;
+    /** Status code for a successful service */
+    public static final int SERVICE_FINISHED = 1;
+
+    private boolean completed = false;
+    private int status = -1;
+    private Map<String, Object> result = null;
+    private Throwable t = null;
+
+    /**
+     * @see org.ofbiz.service.GenericRequester#receiveResult(java.util.Map)
+     */
+    public synchronized void receiveResult(Map<String, Object> result) {
+        this.result = result;
+        completed = true;
+        status = SERVICE_FINISHED;
+        notify();
+        if (Debug.verboseOn())
+            Debug.logVerbose("Received Result (" + completed + ") -- " + result, module);
+    }
+
+    /**
+     * @see org.ofbiz.service.GenericRequester#receiveThrowable(java.lang.Throwable)
+     */
+    public synchronized void receiveThrowable(Throwable t) {
+        this.t = t;
+        completed = true;
+        status = SERVICE_FAILED;
+        notify();
+    }
+
+    /**
+     * Returns the status of the service.
+     * @return int Status code
+     */
+    public synchronized int status() {
+        return this.status;
+    }
+
+    /**
+     * If the service has completed return true
+     * @return boolean
+     */
+    public synchronized boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Returns the exception which was thrown or null if none
+     * @return Exception
+     */
+    public synchronized Throwable getThrowable() {
+        if (!isCompleted())
+            throw new java.lang.IllegalStateException("Cannot return exception, synchronous call has not completed.");
+        return this.t;
+    }
+
+    /**
+     * Gets the results of the service or null if none
+     * @return Map
+     */
+    public synchronized Map<String, Object> getResult() {
+        if (!isCompleted())
+            throw new java.lang.IllegalStateException("Cannot return result, asynchronous call has not completed.");
+        return result;
+    }
+
+    /**
+     * Waits for the service to complete
+     * @return Map
+     */
+    public synchronized Map<String, Object> waitForResult() {
+        return this.waitForResult(10);
+    }
+
+    /**
+     * Waits for the service to complete, check the status ever n milliseconds
+     * @param milliseconds
+     * @return Map
+     */
+    public synchronized Map<String, Object> waitForResult(long milliseconds) {
+        if (Debug.verboseOn()) Debug.logVerbose("Waiting for results...", module);
+        while (!isCompleted()) {
+            try {
+                this.wait(milliseconds);
+                if (Debug.verboseOn()) Debug.logVerbose("Waiting...", module);
+            } catch (java.lang.InterruptedException e) {
+                Debug.logError(e, module);
+            }
+        }
+        return this.getResult();
+    }
+}
+

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericResultWaiter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericResultWaiter.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericResultWaiter.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceCallback.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceCallback.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceCallback.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceCallback.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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.ofbiz.context.service;
+
+import java.util.Map;
+
+public interface GenericServiceCallback {
+
+    public boolean isEnabled();
+    public void receiveEvent(Map<String, Object> context);
+    public void receiveEvent(Map<String, Object> context, Map<String, Object> result);
+    public void receiveEvent(Map<String, Object> context, Throwable error);
+}

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceCallback.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceCallback.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceException.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceException.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceException.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceException.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.ofbiz.context.service;
+
+/**
+ * Generic Service Exception
+ */
+@SuppressWarnings("serial")
+public class GenericServiceException extends org.ofbiz.base.util.GeneralException {
+
+    public GenericServiceException() {
+        super();
+    }
+
+    public GenericServiceException(String str) {
+        super(str);
+    }
+
+    public GenericServiceException(String str, Throwable nested) {
+        super(str, nested);
+    }
+
+    public GenericServiceException(Throwable nested) {
+        super(nested);
+    }
+}

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceException.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/GenericServiceException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobManagerException.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobManagerException.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobManagerException.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobManagerException.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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.ofbiz.context.service;
+
+/**
+ * Job Scheduler Exception
+ */
+@SuppressWarnings("serial")
+public class JobManagerException extends org.ofbiz.base.util.GeneralException {
+
+    /**
+     * Creates new <code>JobManagerException</code> without detail message.
+     */
+    public JobManagerException() {
+        super();
+    }
+
+    /**
+     * Constructs an <code>JobManagerException</code> with the specified detail message.
+     * @param msg the detail message.
+     */
+    public JobManagerException(String msg) {
+        super(msg);
+    }
+
+    /**
+     * Constructs an <code>JobManagerException</code> with the specified detail message and nested Exception.
+     * @param nested the nested exception.
+     */
+    public JobManagerException(Throwable nested) {
+        super(nested);
+    }
+
+    /**
+     * Constructs an <code>JobManagerException</code> with the specified detail message and nested Exception.
+     * @param msg the detail message.
+     * @param nested the nested exception.
+     */
+    public JobManagerException(String msg, Throwable nested) {
+        super(msg, nested);
+    }
+}
+

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobManagerException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobManagerException.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobManagerException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobScheduler.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobScheduler.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobScheduler.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobScheduler.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * 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.ofbiz.context.service;
+
+import java.util.Map;
+
+/**
+ * Job Scheduler interface
+ */
+public interface JobScheduler {
+
+    /**
+     * Schedule a job to start at a specific time with specific recurrence info
+     *@param serviceName The name of the service to invoke
+     *@param context The context for the service
+     *@param startTime The time in milliseconds the service should run
+     *@param frequency The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)
+     *@param interval The interval of the frequency recurrence
+     *@param count The number of times to repeat
+     */
+    public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) throws JobManagerException;
+
+    /**
+     * Schedule a job to start at a specific time with specific recurrence info
+     *@param serviceName The name of the service to invoke
+     *@param context The context for the service
+     *@param startTime The time in milliseconds the service should run
+     *@param frequency The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)
+     *@param interval The interval of the frequency recurrence
+     *@param endTime The time in milliseconds the service should expire
+     */
+    public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws JobManagerException;
+
+    /**
+     * Schedule a job to start at a specific time with specific recurrence info
+     *@param serviceName The name of the service to invoke
+     *@param context The context for the service
+     *@param startTime The time in milliseconds the service should run
+     *@param frequency The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)
+     *@param interval The interval of the frequency recurrence
+     *@param count The number of times to repeat
+     *@param endTime The time in milliseconds the service should expire
+     */
+    public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime) throws JobManagerException;
+
+    /**
+     * Schedule a job to start at a specific time with specific recurrence info
+     *@param poolName The name of the pool to run the service from
+     *@param serviceName The name of the service to invoke
+     *@param context The context for the service
+     *@param startTime The time in milliseconds the service should run
+     *@param frequency The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)
+     *@param interval The interval of the frequency recurrence
+     *@param count The number of times to repeat
+     *@param endTime The time in milliseconds the service should expire
+     */
+    public void schedule(String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime) throws JobManagerException;
+
+    /**
+     * Schedule a job to start at a specific time with specific recurrence info
+     *@param jobName The name of the job
+     *@param poolName The name of the pool to run the service from
+     *@param serviceName The name of the service to invoke
+     *@param context The context for the service
+     *@param startTime The time in milliseconds the service should run
+     *@param frequency The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)
+     *@param interval The interval of the frequency recurrence
+     *@param count The number of times to repeat
+     *@param endTime The time in milliseconds the service should expire
+     *@param maxRetry The max number of retries on failure (-1 for no max)
+     */
+    public void schedule(String jobName, String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws JobManagerException;
+
+    /**
+     * Schedule a job to start at a specific time with specific recurrence info
+     *@param poolName The name of the pool to run the service from
+     *@param serviceName The name of the service to invoke
+     *@param dataId The persisted context (RuntimeData.runtimeDataId)
+     *@param startTime The time in milliseconds the service should run
+     */
+    public void schedule(String poolName, String serviceName, String dataId, long startTime) throws JobManagerException;
+
+    /**
+     * Schedule a job to start at a specific time with specific recurrence info
+     *@param jobName The name of the job
+     *@param poolName The name of the pool to run the service from
+     *@param serviceName The name of the service to invoke
+     *@param dataId The persisted context (RuntimeData.runtimeDataId)
+     *@param startTime The time in milliseconds the service should run
+     *@param frequency The frequency of the recurrence (HOURLY,DAILY,MONTHLY,etc)
+     *@param interval The interval of the frequency recurrence
+     *@param count The number of times to repeat
+     *@param endTime The time in milliseconds the service should expire
+     *@param maxRetry The max number of retries on failure (-1 for no max)
+     */
+    public void schedule(String jobName, String poolName, String serviceName, String dataId, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws JobManagerException;
+}

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobScheduler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobScheduler.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/JobScheduler.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/LocalDispatcher.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/LocalDispatcher.java?rev=795024&view=auto
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/LocalDispatcher.java (added)
+++ ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/LocalDispatcher.java Fri Jul 17 09:56:47 2009
@@ -0,0 +1,351 @@
+/*******************************************************************************
+ * 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.ofbiz.context.service;
+
+import java.util.Map;
+
+import org.ofbiz.entity.GenericDelegator;
+import org.ofbiz.security.Security;
+import org.ofbiz.security.authz.Authorization;
+import org.ofbiz.service.jms.JmsListenerFactory;
+import org.ofbiz.service.job.JobManager;
+
+/**
+ * Generic Services Local Dispatcher
+ */
+public interface LocalDispatcher {
+
+    /**
+     * Disables running of Service Engine Condition Actions (SECAs).  Intended to be turned off temporarily.
+     * @throws GenericServiceException
+     */
+    public void disableEcas();
+
+    /**
+     * Reenables running of Service Engine Condition Actions (SECAs).
+     * @throws GenericServiceException
+     */
+    public void enableEcas();
+
+    /**
+     * Returns whether Service Engine Condition Actions (SECAs) are disabled or not.
+     * @return
+     * @throws GenericServiceException
+     */
+    public boolean isEcasDisabled();
+
+    /**
+     * Run the service synchronously and return the result.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @return Map of name, value pairs composing the result.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public Map<String, Object> runSync(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException;
+
+    /**
+     * Run the service synchronously with a specified timeout and return the result.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @param transactionTimeout the overriding timeout for the transaction (if we started it).
+     * @param requireNewTransaction if true we will suspend and create a new transaction so we are sure to start.
+     * @return Map of name, value pairs composing the result.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public Map<String, Object> runSync(String serviceName, Map<String, ? extends Object> context, int transactionTimeout, boolean requireNewTransaction) throws GenericServiceException;
+    public Map<String, Object> runSync(String serviceName, int transactionTimeout, boolean requireNewTransaction, Object... context) throws GenericServiceException;
+
+    /**
+     * Run the service synchronously and IGNORE the result.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void runSyncIgnore(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException;
+
+    /**
+     * Run the service synchronously with a specified timeout and IGNORE the result.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @param transactionTimeout the overriding timeout for the transaction (if we started it).
+     * @param requireNewTransaction if true we will suspend and create a new transaction so we are sure to start.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void runSyncIgnore(String serviceName, Map<String, ? extends Object> context, int transactionTimeout, boolean requireNewTransaction) throws GenericServiceException;
+    public void runSyncIgnore(String serviceName, int transactionTimeout, boolean requireNewTransaction, Object... context) throws GenericServiceException;
+
+    /**
+     * Run the service asynchronously, passing an instance of GenericRequester that will receive the result.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @param requester Object implementing GenericRequester interface which will receive the result.
+     * @param persist True for store/run; False for run.
+     * @param transactionTimeout the overriding timeout for the transaction (if we started it).
+     * @param requireNewTransaction if true we will suspend and create a new transaction so we are sure to start.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void runAsync(String serviceName, Map<String, ? extends Object> context, GenericRequester requester, boolean persist, int transactionTimeout, boolean requireNewTransaction) throws GenericServiceException;
+    public void runAsync(String serviceName, GenericRequester requester, boolean persist, int transactionTimeout, boolean requireNewTransaction, Object... context) throws GenericServiceException;
+
+    /**
+     * Run the service asynchronously, passing an instance of GenericRequester that will receive the result.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @param requester Object implementing GenericRequester interface which will receive the result.
+     * @param persist True for store/run; False for run.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void runAsync(String serviceName, Map<String, ? extends Object> context, GenericRequester requester, boolean persist) throws GenericServiceException;
+    public void runAsync(String serviceName, GenericRequester requester, boolean persist, Object... context) throws GenericServiceException;
+
+    /**
+     * Run the service asynchronously, passing an instance of GenericRequester that will receive the result.
+     * This method WILL persist the job.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @param requester Object implementing GenericRequester interface which will receive the result.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void runAsync(String serviceName, Map<String, ? extends Object> context, GenericRequester requester) throws GenericServiceException;
+    public void runAsync(String serviceName, GenericRequester requester, Object... context) throws GenericServiceException;
+
+    /**
+     * Run the service asynchronously and IGNORE the result.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @param persist True for store/run; False for run.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void runAsync(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException;
+    public void runAsync(String serviceName, boolean persist, Object... context) throws GenericServiceException;
+
+    /**
+     * Run the service asynchronously and IGNORE the result. This method WILL persist the job.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void runAsync(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException;
+
+    /**
+     * Run the service asynchronously.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @param persist True for store/run; False for run.
+     * @return A new GenericRequester object.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public GenericResultWaiter runAsyncWait(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException;
+    public GenericResultWaiter runAsyncWait(String serviceName, boolean persist, Object... context) throws GenericServiceException;
+
+    /**
+     * Run the service asynchronously. This method WILL persist the job.
+     * @param serviceName Name of the service to run.
+     * @param context Map of name, value pairs composing the context.
+     * @return A new GenericRequester object.
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public GenericResultWaiter runAsyncWait(String serviceName, Map<String, ? extends Object> context) throws GenericServiceException;
+
+    /**
+     * Register a callback listener on a specific service.
+     * @param serviceName Name of the service to link callback to.
+     * @param cb The callback implementation.
+     */
+    public void registerCallback(String serviceName, GenericServiceCallback cb);
+
+    /**
+     * Schedule a service to run asynchronously at a specific start time.
+     * @param poolName Name of the service pool to send to.
+     * @param serviceName Name of the service to invoke.
+     * @param context The name/value pairs composing the context.
+     * @param startTime The time to run this service.
+     * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
+     * @param interval The interval of the frequency recurrence.
+     * @param count The number of times to repeat.
+     * @param endTime The time in milliseconds the service should expire
+     * @param maxRetry The number of times we should retry on failure
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void schedule(String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws GenericServiceException;
+    public void schedule(String poolName, String serviceName, long startTime, int frequency, int interval, int count, long endTime, int maxRetry, Object... context) throws GenericServiceException;
+
+    /**
+     * Schedule a service to run asynchronously at a specific start time.
+     * @param jobName Name of the job
+     * @param poolName Name of the service pool to send to.
+     * @param serviceName Name of the service to invoke.
+     * @param context The name/value pairs composing the context.
+     * @param startTime The time to run this service.
+     * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
+     * @param interval The interval of the frequency recurrence.
+     * @param count The number of times to repeat.
+     * @param endTime The time in milliseconds the service should expire
+     * @param maxRetry The number of times we should retry on failure
+     * @throws ServiceAuthException
+     * @throws ServiceValidationException
+     * @throws GenericServiceException
+     */
+    public void schedule(String jobName, String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws GenericServiceException;
+    public void schedule(String jobName, String poolName, String serviceName, long startTime, int frequency, int interval, int count, long endTime, int maxRetry, Object... context) throws GenericServiceException;
+
+
+    /**
+     * Schedule a service to run asynchronously at a specific start time.
+     * @param serviceName Name of the service to invoke.
+     * @param context The name/value pairs composing the context.
+     * @param startTime The time to run this service.
+     * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
+     * @param interval The interval of the frequency recurrence.
+     * @param count The number of times to repeat.
+     * @param endTime The time in milliseconds the service should expire
+     * @throws GenericServiceException
+     */
+    public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime) throws GenericServiceException;
+    public void schedule(String serviceName, long startTime, int frequency, int interval, int count, long endTime, Object... context) throws GenericServiceException;
+
+    /**
+     * Schedule a service to run asynchronously at a specific start time.
+     * @param serviceName Name of the service to invoke.
+     * @param context The name/value pairs composing the context.
+     * @param startTime The time to run this service.
+     * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
+     * @param interval The interval of the frequency recurrence.
+     * @param count The number of times to repeat.
+     * @throws GenericServiceException
+     */
+    public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) throws GenericServiceException;
+    public void schedule(String serviceName, long startTime, int frequency, int interval, int count, Object... context) throws GenericServiceException;
+
+    /**
+     * Schedule a service to run asynchronously at a specific start time.
+     * @param serviceName Name of the service to invoke.
+     * @param context The name/value pairs composing the context.
+     * @param startTime The time to run this service.
+     * @param frequency The frequency of the recurrence (RecurrenceRule.DAILY, etc).
+     * @param interval The interval of the frequency recurrence.
+     * @param endTime The time in milliseconds the service should expire
+     * @throws GenericServiceException
+     */
+    public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException;
+    public void schedule(String serviceName, long startTime, int frequency, int interval, long endTime, Object... context) throws GenericServiceException;
+
+    /**
+     * Schedule a service to run asynchronously at a specific start time.
+     * @param serviceName Name of the service to invoke.
+     * @param context The name/value pairs composing the context.
+     * @param startTime The time to run this service.
+     * @throws GenericServiceException
+     */
+    public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime) throws GenericServiceException;
+    public void schedule(String serviceName, long startTime, Object... context) throws GenericServiceException;
+
+
+    /**
+     * Adds a rollback service to the current TX using the ServiceXaWrapper
+     * @param serviceName
+     * @param context
+     * @param persist
+     * @throws GenericServiceException
+     */
+    public void addRollbackService(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException;
+    public void addRollbackService(String serviceName, boolean persist, Object... context) throws GenericServiceException;
+
+    /**
+     * Adds a commit service to the current TX using the ServiceXaWrapper
+     * @param serviceName
+     * @param context
+     * @param persist
+     * @throws GenericServiceException
+     */
+    public void addCommitService(String serviceName, Map<String, ? extends Object> context, boolean persist) throws GenericServiceException;
+    public void addCommitService(String serviceName, boolean persist, Object... context) throws GenericServiceException;
+
+    /**
+     * Gets the JobManager associated with this dispatcher
+     * @return JobManager that is associated with this dispatcher
+     */
+    public JobManager getJobManager();
+
+    /**
+     * Gets the JmsListenerFactory which holds the message listeners.
+     * @return JmsListenerFactory
+     */
+    public JmsListenerFactory getJMSListeneFactory();
+
+    /**
+     * Gets the GenericEntityDelegator associated with this dispatcher
+     * @return GenericEntityDelegator associated with this dispatcher
+     */
+    public GenericDelegator getDelegator();
+
+    /**
+     * Gets the Authorization object associated with this dispatcher
+     * @return Authorization object associated with this dispatcher
+     */
+    public Authorization getAuthorization();
+    
+    /**
+     * Gets the Security object associated with this dispatcher
+     * @return Security object associated with this dispatcher
+     */
+    public Security getSecurity();
+
+    /**
+     * Returns the Name of this local dispatcher
+     * @return String representing the name of this local dispatcher
+     */
+    public String getName();
+
+    /**
+     * Returns the DispatchContext created by this dispatcher
+     * @return DispatchContext created by this dispatcher
+     */
+    public DispatchContext getDispatchContext();
+
+    /**
+     * De-Registers this LocalDispatcher with the ServiceDispatcher
+     */
+    public void deregister();
+}
+

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/LocalDispatcher.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/LocalDispatcher.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/branches/executioncontext20090716/framework/context/src/org/ofbiz/context/service/LocalDispatcher.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/branches/executioncontext20090716/framework/entity/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/entity/build.xml?rev=795024&r1=795023&r2=795024&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/entity/build.xml (original)
+++ ofbiz/branches/executioncontext20090716/framework/entity/build.xml Fri Jul 17 09:56:47 2009
@@ -37,6 +37,7 @@
         <fileset dir="../base/lib/j2eespecs" includes="*.jar"/>
         <fileset dir="../base/lib/scripting" includes="*.jar"/>
         <fileset dir="../base/build/lib" includes="*.jar"/>
+        <fileset dir="../context/build/lib" includes="*.jar"/>
     </path>
 
     <patternset id="src.exc.set">

Modified: ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java?rev=795024&r1=795023&r2=795024&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java (original)
+++ ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/EntityCryptoException.java Fri Jul 17 09:56:47 2009
@@ -18,6 +18,9 @@
  *******************************************************************************/
 package org.ofbiz.entity;
 
+import org.ofbiz.context.entity.GenericEntityException;
+
+@SuppressWarnings("serial")
 public class EntityCryptoException extends GenericEntityException {
 
     public EntityCryptoException() {

Modified: ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java?rev=795024&r1=795023&r2=795024&view=diff
==============================================================================
--- ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java (original)
+++ ofbiz/branches/executioncontext20090716/framework/entity/src/org/ofbiz/entity/GenericDataSourceException.java Fri Jul 17 09:56:47 2009
@@ -18,10 +18,13 @@
  *******************************************************************************/
 package org.ofbiz.entity;
 
+import org.ofbiz.context.entity.GenericEntityException;
+
 /**
  * GenericDataSourceException
  *
  */
+@SuppressWarnings("serial")
 public class GenericDataSourceException extends GenericEntityException {
 
     public GenericDataSourceException() {