Overlord SVN: r524 - in cdl/trunk/runtime/jbossesb/src: main/java/org/jboss/soa/overlord/jbossesb/stateful and 5 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-02-28 05:53:16 -0500 (Sat, 28 Feb 2009)
New Revision: 524
Added:
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ClassLoaderUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/MessageUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/NameSpaceUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/XMLUtils.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/Decision.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/IfAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/ReceiveMessageAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SendMessageAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SwitchAction.java
Removed:
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/ClassLoaderUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/MessageUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/NameSpaceUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtils.java
Modified:
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ConversationAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetStateAction.java
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtilsTest.java
Log:
[SOAG-91] Add stateless actions.
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ClassLoaderUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ClassLoaderUtil.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ClassLoaderUtil.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb;
+
+/**
+ *
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+public class ClassLoaderUtil {
+
+ public static Class<?> loadClass(String className) throws ClassNotFoundException {
+ return Thread.currentThread().getContextClassLoader().loadClass(className);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/MessageUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/MessageUtil.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/MessageUtil.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2005-6 Pi4 Technologies Ltd
+ *
+ * Licensed 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.
+ *
+ *
+ * Change History:
+ * Mar 21, 2006 : Initial version created by gary
+ */
+package org.jboss.soa.overlord.jbossesb;
+
+import java.util.logging.Logger;
+
+import org.w3c.dom.Node;
+
+
+/**
+ * This class represents utility functions for processing
+ * messages.
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+public class MessageUtil {
+
+ private static Logger logger = Logger.getLogger(MessageUtil.class.getName());
+
+ /**
+ * This method returns the message type associated with the
+ * supplied value.
+ *
+ * @param value The value
+ * @return The message type
+ */
+ public static String getMessageType(Object value) {
+ String ret=null;
+
+ if (value instanceof org.w3c.dom.Node) {
+ String namespace=((org.w3c.dom.Node)value).getNamespaceURI();
+ String localpart=((org.w3c.dom.Node)value).getLocalName();
+
+ if (value instanceof org.w3c.dom.Element &&
+ ((org.w3c.dom.Element)value).hasAttributeNS(
+ "http://www.w3.org/2001/XMLSchema-instance", "type")) {
+ String type=((org.w3c.dom.Element)value).getAttributeNS(
+ "http://www.w3.org/2001/XMLSchema-instance", "type");
+
+ String prefix= XMLUtils.getPrefix(type);
+
+ localpart = XMLUtils.getLocalname(type);
+
+ if (prefix == null) {
+ namespace = null;
+ } else {
+ namespace = ((org.w3c.dom.Element)value).
+ getAttribute("xmlns:"+prefix);
+ if (!NameSpaceUtil.isNotNull(namespace)) {
+ namespace = null;
+ }
+ }
+ }
+
+ if (namespace == null) {
+ ret = localpart;
+ } else {
+ ret = NameSpaceUtil.getFullyQualifiedName(namespace,
+ localpart);
+ }
+ } else if (value instanceof String) {
+ ret = String.class.getName();
+
+ try {
+ Node node=XMLUtils.getNode((String)value);
+ ret = getMessageType(node);
+ } catch(Exception e) {
+ logger.warning("Failed to obtain message type from value: "+value);
+ }
+
+ } else {
+ ret = value.getClass().getName();
+ }
+
+ return(ret);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/NameSpaceUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/NameSpaceUtil.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/NameSpaceUtil.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2005 Pi4 Technologies Ltd
+ *
+ * Licensed 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.
+ *
+ *
+ * Change History:
+ * Jul 28, 2005 : Initial version created by gary
+ */
+package org.jboss.soa.overlord.jbossesb;
+
+/**
+ * This class provides helper functiions for manipulating fully
+ * qualified names (with local parts and namespaces).
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+public class NameSpaceUtil {
+
+ public static final String NAMESPACE_PREFIX="{";
+ public static final String NAMESPACE_SUFFIX="}";
+
+ /**
+ * This method checks whether the supplied name is a
+ * fully qualified name, with the name space contained
+ * in braces, followed by a localpart.
+ *
+ * @param name The name
+ * @return Whether the name is a fully qualified name
+ */
+ public static boolean isFullyQualifiedName(String name) {
+ boolean ret=false;
+ int pos=0;
+
+ if (name != null && name.startsWith("{") &&
+ (pos=name.indexOf('}')) != -1 &&
+ name.length() != pos+1) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the fully qualified name associated
+ * with the supplied namespace and local part. If the namespace
+ * is null, or an empty string, then only the local part
+ * will be returned.
+ *
+ * @param namespace The namespace
+ * @param localpart The local part
+ * @return The fully qualified name
+ */
+ public static String getFullyQualifiedName(String namespace,
+ String localpart) {
+ String ret=null;
+
+ if (namespace != null && namespace.trim().length() > 0) {
+ ret = NAMESPACE_PREFIX+namespace+NAMESPACE_SUFFIX;
+ }
+
+ if (localpart != null) {
+ if (ret == null) {
+ ret = localpart;
+ } else {
+ ret += localpart;
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the namespace component of a fully
+ * qualified name. If the supplied name does not have the
+ * namespace prefix, then a null will be returned. If the
+ * supplied name does not have the suffix, then the contents
+ * following the prefix, to the end of the name, will be
+ * returned.
+ *
+ * @param qname The fully qualified name
+ * @return The namespace
+ */
+ public static String getNamespace(String qname) {
+ String ret=null;
+ int index=0;
+
+ if (qname != null &&
+ (index=qname.indexOf(NAMESPACE_PREFIX)) != -1) {
+ int endindex=qname.indexOf(NAMESPACE_SUFFIX);
+
+ if (endindex == -1) {
+ endindex = qname.length();
+ }
+
+ ret = qname.substring(index+1, endindex);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method extracts the local part from the supplied
+ * fully qualified name. If the namespace suffix cannot
+ * be found, then the fully supplied name will be
+ * returned.
+ *
+ * @param qname The fully qualified name
+ * @return The local part
+ */
+ public static String getLocalPart(String qname) {
+ String ret=null;
+ int index=0;
+
+ if (qname != null &&
+ (index=qname.indexOf(NAMESPACE_SUFFIX)) != -1) {
+ ret = qname.substring(index+1);
+ } else {
+ ret = qname;
+ }
+
+ return(ret);
+ }
+
+ public static boolean isNotNull(String value) {
+ return(value != null && value.trim().length() > 0);
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/XMLUtils.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/XMLUtils.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/XMLUtils.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+
+public class XMLUtils {
+
+ /**
+ * This method converts the supplied text representation
+ * of an XML document into a DOM Node.
+ *
+ * @param text The text
+ * @return The node
+ * @throws XMLException Failed to convert the text
+ */
+ public static Node getNode(String text) throws Exception {
+ Node ret=null;
+
+ try {
+ // Transform the text representation to DOM
+ DocumentBuilderFactory fact=DocumentBuilderFactory.newInstance();
+ fact.setNamespaceAware(true);
+
+ InputStream xmlstr= new ByteArrayInputStream(text.getBytes());
+
+ DocumentBuilder builder=fact.newDocumentBuilder();
+ org.w3c.dom.Document doc=builder.parse(xmlstr);
+
+ ret = doc.getDocumentElement();
+
+ } catch(Exception e) {
+ throw new Exception("Failed to transform text " +
+ "into DOM representation", e);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the prefix part of the supplied
+ * qualified name.
+ *
+ * @param qname The qualified name
+ * @return The prefix
+ */
+ public static String getPrefix(String qname) {
+ String ret=null;
+ int pos=0;
+
+ if (qname != null && ((pos=qname.indexOf(':')) != -1)) {
+ ret = qname.substring(0, pos);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the localname part of the supplied
+ * qualified name.
+ *
+ * @param qname The qualified name
+ * @return The localname part
+ */
+ public static String getLocalname(String qname) {
+ String ret=qname;
+ int pos=0;
+
+ if (qname != null && ((pos=qname.indexOf(':')) != -1)) {
+ ret = qname.substring(pos+1);
+ }
+
+ return(ret);
+ }
+
+ /**
+ *
+ * @param object
+ * @param expression: xpath expression
+ * @return
+ * @throws Exception
+ */
+ public static String executeXpath(Object object, String expression) throws Exception {
+ XPathFactory factory = XPathFactory.newInstance();
+ XPath theXpath = factory.newXPath();
+
+ if (object instanceof String) {
+ String xmlMessage = (String)object;
+ Node node = getNode(xmlMessage);
+ return theXpath.evaluate(expression, node);
+ } else if (object instanceof Element) {
+ return theXpath.evaluate(expression, object);
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -26,9 +26,9 @@
import org.apache.log4j.Logger;
import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.overlord.jbossesb.ClassLoaderUtil;
import org.jboss.soa.overlord.jbossesb.stateful.actions.MessageProperties;
import org.jboss.soa.overlord.jbossesb.stateful.actions.Service;
-import org.jboss.soa.overlord.jbossesb.stateful.util.ClassLoaderUtil;
import org.jboss.soa.overlord.jbossesb.stateful.util.HibernateUtil;
import org.mvel.MVEL;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ConversationAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ConversationAction.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ConversationAction.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -31,16 +31,16 @@
import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.overlord.jbossesb.ClassLoaderUtil;
+import org.jboss.soa.overlord.jbossesb.MessageUtil;
+import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.jboss.soa.overlord.jbossesb.stateful.Identity;
import org.jboss.soa.overlord.jbossesb.stateful.IdentityType;
import org.jboss.soa.overlord.jbossesb.stateful.ScheduleItem;
import org.jboss.soa.overlord.jbossesb.stateful.Session;
import org.jboss.soa.overlord.jbossesb.stateful.SessionManager;
import org.jboss.soa.overlord.jbossesb.stateful.SessionStatus;
-import org.jboss.soa.overlord.jbossesb.stateful.util.ClassLoaderUtil;
import org.jboss.soa.overlord.jbossesb.stateful.util.HibernateUtil;
-import org.jboss.soa.overlord.jbossesb.stateful.util.MessageUtil;
-import org.jboss.soa.overlord.jbossesb.stateful.util.XMLUtils;
import org.mvel.MVEL;
/**
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetStateAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetStateAction.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetStateAction.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -22,7 +22,7 @@
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.stateful.util.XMLUtils;
+import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.mvel.MVEL;
import org.w3c.dom.Element;
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/ClassLoaderUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/ClassLoaderUtil.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/ClassLoaderUtil.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb.stateful.util;
-
-/**
- *
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- *
- */
-public class ClassLoaderUtil {
-
- public static Class<?> loadClass(String className) throws ClassNotFoundException {
- return Thread.currentThread().getContextClassLoader().loadClass(className);
- }
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/MessageUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/MessageUtil.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/MessageUtil.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -1,96 +0,0 @@
-/*
- * Copyright 2005-6 Pi4 Technologies Ltd
- *
- * Licensed 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.
- *
- *
- * Change History:
- * Mar 21, 2006 : Initial version created by gary
- */
-package org.jboss.soa.overlord.jbossesb.stateful.util;
-
-import java.util.logging.Logger;
-
-import org.w3c.dom.Node;
-
-
-/**
- * This class represents utility functions for processing
- * messages.
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-public class MessageUtil {
-
- private static Logger logger = Logger.getLogger(MessageUtil.class.getName());
-
- /**
- * This method returns the message type associated with the
- * supplied value.
- *
- * @param value The value
- * @return The message type
- */
- public static String getMessageType(Object value) {
- String ret=null;
-
- if (value instanceof org.w3c.dom.Node) {
- String namespace=((org.w3c.dom.Node)value).getNamespaceURI();
- String localpart=((org.w3c.dom.Node)value).getLocalName();
-
- if (value instanceof org.w3c.dom.Element &&
- ((org.w3c.dom.Element)value).hasAttributeNS(
- "http://www.w3.org/2001/XMLSchema-instance", "type")) {
- String type=((org.w3c.dom.Element)value).getAttributeNS(
- "http://www.w3.org/2001/XMLSchema-instance", "type");
-
- String prefix= XMLUtils.getPrefix(type);
-
- localpart = XMLUtils.getLocalname(type);
-
- if (prefix == null) {
- namespace = null;
- } else {
- namespace = ((org.w3c.dom.Element)value).
- getAttribute("xmlns:"+prefix);
- if (!NameSpaceUtil.isNotNull(namespace)) {
- namespace = null;
- }
- }
- }
-
- if (namespace == null) {
- ret = localpart;
- } else {
- ret = NameSpaceUtil.getFullyQualifiedName(namespace,
- localpart);
- }
- } else if (value instanceof String) {
- ret = String.class.getName();
-
- try {
- Node node=XMLUtils.getNode((String)value);
- ret = getMessageType(node);
- } catch(Exception e) {
- logger.warning("Failed to obtain message type from value: "+value);
- }
-
- } else {
- ret = value.getClass().getName();
- }
-
- return(ret);
- }
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/NameSpaceUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/NameSpaceUtil.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/NameSpaceUtil.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -1,140 +0,0 @@
-/*
- * Copyright 2005 Pi4 Technologies Ltd
- *
- * Licensed 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.
- *
- *
- * Change History:
- * Jul 28, 2005 : Initial version created by gary
- */
-package org.jboss.soa.overlord.jbossesb.stateful.util;
-
-/**
- * This class provides helper functiions for manipulating fully
- * qualified names (with local parts and namespaces).
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-public class NameSpaceUtil {
-
- public static final String NAMESPACE_PREFIX="{";
- public static final String NAMESPACE_SUFFIX="}";
-
- /**
- * This method checks whether the supplied name is a
- * fully qualified name, with the name space contained
- * in braces, followed by a localpart.
- *
- * @param name The name
- * @return Whether the name is a fully qualified name
- */
- public static boolean isFullyQualifiedName(String name) {
- boolean ret=false;
- int pos=0;
-
- if (name != null && name.startsWith("{") &&
- (pos=name.indexOf('}')) != -1 &&
- name.length() != pos+1) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method returns the fully qualified name associated
- * with the supplied namespace and local part. If the namespace
- * is null, or an empty string, then only the local part
- * will be returned.
- *
- * @param namespace The namespace
- * @param localpart The local part
- * @return The fully qualified name
- */
- public static String getFullyQualifiedName(String namespace,
- String localpart) {
- String ret=null;
-
- if (namespace != null && namespace.trim().length() > 0) {
- ret = NAMESPACE_PREFIX+namespace+NAMESPACE_SUFFIX;
- }
-
- if (localpart != null) {
- if (ret == null) {
- ret = localpart;
- } else {
- ret += localpart;
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the namespace component of a fully
- * qualified name. If the supplied name does not have the
- * namespace prefix, then a null will be returned. If the
- * supplied name does not have the suffix, then the contents
- * following the prefix, to the end of the name, will be
- * returned.
- *
- * @param qname The fully qualified name
- * @return The namespace
- */
- public static String getNamespace(String qname) {
- String ret=null;
- int index=0;
-
- if (qname != null &&
- (index=qname.indexOf(NAMESPACE_PREFIX)) != -1) {
- int endindex=qname.indexOf(NAMESPACE_SUFFIX);
-
- if (endindex == -1) {
- endindex = qname.length();
- }
-
- ret = qname.substring(index+1, endindex);
- }
-
- return(ret);
- }
-
- /**
- * This method extracts the local part from the supplied
- * fully qualified name. If the namespace suffix cannot
- * be found, then the fully supplied name will be
- * returned.
- *
- * @param qname The fully qualified name
- * @return The local part
- */
- public static String getLocalPart(String qname) {
- String ret=null;
- int index=0;
-
- if (qname != null &&
- (index=qname.indexOf(NAMESPACE_SUFFIX)) != -1) {
- ret = qname.substring(index+1);
- } else {
- ret = qname;
- }
-
- return(ret);
- }
-
- public static boolean isNotNull(String value) {
- return(value != null && value.trim().length() > 0);
- }
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtils.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtils.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtils.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -1,130 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb.stateful.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathFactory;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-
-public class XMLUtils {
-
- /**
- * This method converts the supplied text representation
- * of an XML document into a DOM Node.
- *
- * @param text The text
- * @return The node
- * @throws XMLException Failed to convert the text
- */
- public static Node getNode(String text) throws Exception {
- Node ret=null;
-
- try {
- // Transform the text representation to DOM
- DocumentBuilderFactory fact=DocumentBuilderFactory.newInstance();
- fact.setNamespaceAware(true);
-
- InputStream xmlstr= new ByteArrayInputStream(text.getBytes());
-
- DocumentBuilder builder=fact.newDocumentBuilder();
- org.w3c.dom.Document doc=builder.parse(xmlstr);
-
- ret = doc.getDocumentElement();
-
- } catch(Exception e) {
- throw new Exception("Failed to transform text " +
- "into DOM representation", e);
- }
-
- return(ret);
- }
-
- /**
- * This method returns the prefix part of the supplied
- * qualified name.
- *
- * @param qname The qualified name
- * @return The prefix
- */
- public static String getPrefix(String qname) {
- String ret=null;
- int pos=0;
-
- if (qname != null && ((pos=qname.indexOf(':')) != -1)) {
- ret = qname.substring(0, pos);
- }
-
- return(ret);
- }
-
- /**
- * This method returns the localname part of the supplied
- * qualified name.
- *
- * @param qname The qualified name
- * @return The localname part
- */
- public static String getLocalname(String qname) {
- String ret=qname;
- int pos=0;
-
- if (qname != null && ((pos=qname.indexOf(':')) != -1)) {
- ret = qname.substring(pos+1);
- }
-
- return(ret);
- }
-
- /**
- *
- * @param object
- * @param expression: xpath expression
- * @return
- * @throws Exception
- */
- public static String executeXpath(Object object, String expression) throws Exception {
- XPathFactory factory = XPathFactory.newInstance();
- XPath theXpath = factory.newXPath();
-
- if (object instanceof String) {
- String xmlMessage = (String)object;
- Node node = getNode(xmlMessage);
- return theXpath.evaluate(expression, node);
- } else if (object instanceof Element) {
- return theXpath.evaluate(expression, object);
- }
-
- return null;
- }
-
-}
\ No newline at end of file
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/Decision.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/Decision.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/Decision.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateless;
+
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+public interface Decision {
+
+ boolean executeDecision(Message message);
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/IfAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/IfAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/IfAction.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateless.actions;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.overlord.jbossesb.ClassLoaderUtil;
+import org.jboss.soa.overlord.jbossesb.stateless.Decision;
+
+
+/**
+ * This action represents a choice between a set of specified paths
+ * based on the message that has occurred.
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.soa.overlord.jbossesb.stateless.actions.IfAction" name="c3" process="process">
+ <property name="paths">
+ <if service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision1" decision-class="org.jboss.soa.overlord.jbossesb.TestDecision"/>
+ <elseif service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision2" decision-class="org.jboss.soa.overlord.jbossesb.Test2ndDecision"/>
+ <else service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision3"/>
+ </property>
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>serivce-category</i> - mapped to JBoss ESB service-category.</li>
+ * <li><i>service-name</i> - mapped to JBossESB service-name.<li>
+ * <li><i>decision-class</i> - the class that implements {Decision} interface.</li>
+ * </ul>
+ *
+ *
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+public class IfAction extends AbstractActionLifecycle{
+
+ public static final String SERVICE_CATEGORY = "service-category";
+ public static final String SERVICE_NAME = "service-name";
+ public static final String DECISION_CLASS = "decision-class";
+
+ private static final String IF_STATEMENT = "if";
+ private static final String ELSE_STATEMENT = "else";
+ private static final String ELSEIF_STATEMENT = "elseif";
+
+ private static Logger logger = Logger.getLogger(IfAction.class);
+
+ private ConfigTree config;
+
+ private ConfigTree ifBranch;
+
+ private List<ConfigTree> elseifBranchs = new LinkedList<ConfigTree>();
+
+ private ConfigTree elseBranch;
+
+ public IfAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ parseConfiguration();
+
+ if (!executeConditionBranch(message, ifBranch)) {
+ boolean successFlag = false;
+ for (ConfigTree elseifBranch : elseifBranchs) {
+ if (executeConditionBranch(message, elseifBranch)) {
+ successFlag = true;
+ break;
+ }
+ }
+
+ if (!successFlag){
+ String category = elseBranch.getAttribute(SERVICE_CATEGORY);
+ String name = elseBranch.getAttribute(SERVICE_NAME);
+ ServiceInvoker invoker= new ServiceInvoker(category, name);
+ invoker.deliverAsync(message);
+ }
+ }
+
+ return message;
+ }
+
+ private boolean executeConditionBranch(Message message, ConfigTree branch) throws Exception {
+ String decisionClzString = branch.getAttribute(DECISION_CLASS);
+ String category = branch.getAttribute(SERVICE_CATEGORY);
+ String name = branch.getAttribute(SERVICE_NAME);
+
+ if (decisionClzString == null || "".equals(decisionClzString.trim())){
+ throw new Exception("The decision-class attribute can not be null or empty string");
+ }
+ Class<?> decisionClz = ClassLoaderUtil.loadClass(decisionClzString);
+ if (!Decision.class.isAssignableFrom(decisionClz)){
+ throw new Exception("The decision-class of " + decisionClzString + " doesn't implement the Decision Interface.");
+ }
+
+ Decision decision = (Decision) decisionClz.newInstance();
+ if (decision.executeDecision(message)){
+ ServiceInvoker invoker= new ServiceInvoker(category, name);
+ invoker.deliverAsync(message);
+ logger.debug("The message has been delivered to service of [category=" + category + "/name=" + name + "]");
+ return true;
+ }
+
+ return false;
+ }
+
+
+ private void parseConfiguration() throws Exception {
+ ConfigTree[] children=config.getAllChildren();
+ for (ConfigTree ct : children) {
+ if (IF_STATEMENT.equals(ct.getName())) {
+ ifBranch = ct;
+ } else if (ELSEIF_STATEMENT.equals(ct.getName())) {
+ elseifBranchs.add(ct);
+ } else if (ELSE_STATEMENT.equals(ct.getName())){
+ elseBranch= ct;
+ } else {
+ throw new Exception("Unrecognized configuration Node in IfAction.");
+ }
+ }
+ }
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/ReceiveMessageAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/ReceiveMessageAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/ReceiveMessageAction.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateless.actions;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.overlord.jbossesb.MessageUtil;
+
+/**
+ * The ReceiveMessageAction is used to explicitly define the message type that should be received.
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.soa.overlord.jbossesb.stateless.actions.ReceiveMessageAction" name="c2" process="process">
+ <property name="messageType" value="CreditCheckRequest"/>
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>messageType </i> - Define the message type that should be received.</li>
+ * </ul>
+ *
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+public class ReceiveMessageAction extends AbstractActionLifecycle{
+
+ public static final String OPERATION = "operation";
+
+ public static final String MESSAGE_TYPE = "messageType";
+
+ private static Logger logger = Logger.getLogger(ReceiveMessageAction.class);
+
+ private ConfigTree config;
+
+ public ReceiveMessageAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ String expected = config.getAttribute(MESSAGE_TYPE);
+ if (expected == null || "".equals(expected.trim())) {
+ throw new Exception("The messageType is not defined.");
+ }
+
+ Object value=message.getBody().get();
+ if (value instanceof byte[]) {
+ value = new String((byte[])value);
+ }
+ String receivedMessageType = MessageUtil.getMessageType(value);
+ logger.info("Received [ " + receivedMessageType + "] Message Type");
+
+ if (!expected.equals(receivedMessageType)) {
+ throw new Exception ("Unexpected message type= "+ receivedMessageType + ", but expecting type="+ expected);
+ }
+
+ return message;
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SendMessageAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SendMessageAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SendMessageAction.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,137 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateless.actions;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.overlord.jbossesb.MessageUtil;
+
+/**
+ * Deliver message to the target service.
+ *
+ * <p>
+ * This action enables a message, being processed by the action pipeline, to be sent to a nominated destination.
+ * The destination for the message being sent can be identified in two ways:
+ * </p>
+ *
+ * <ul>
+ * <li>
+ * <i>Explicitly</i><br/>
+ * A service category and name can be specified, to indicate the destination of the message to be sent.
+ * When this approach is used, it will be possible to optionally specify a 'reply to' service category and name,
+ * to which any subsequent response can be sent. In this case, the 'reply to' service category and name will be placed on the schedule for the session.
+ * </li>
+ * <li>
+ * <i>Implicitly</i>(Based on JBossESB EPR)<br/>
+ * If a previously received message had a 'reply to EPR', which was then associated with a label,
+ * then the message can be sent back to the originator of that previous message by specifying the label associated with the EPR.
+ * </li>
+ * </ul>
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.soa.overlord.jbossesb.stateless.actions.SendMessageAction"
+ process="process" name="s4-3">
+ <property name="messageType" value="quoteList" />
+ <property name="clientEPR" value="buyer" />
+ </action>
+ * }
+ * </pre>
+ * OR:
+ * <pre>
+ * {@literal
+ <action class="org.jboss.soa.overlord.jbossesb.stateless.actions.SendMessageAction"
+ process="process" name="s8-4">
+ <property name="messageType" value="requestForQuote" />
+ <property name="serviceName" value="supplier.serviceName" />
+ <property name="serviceCategory" value="supplier.serviceCategory" />
+ <property name="responseServiceName" value="RequestForQuote.main.1" />
+ <property name="responseServiceCategory" value="ESBBroker.BrokerParticipant" />
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>messageType </i> - Define the message type that is prepared to sent to.</li>
+ * <li><i>clientEPR</i> - This is JBossESB EPR Label, represents a JBossESB EPR that can be used to send a message to.</li>
+ * <li><i>serviceName</i> - Mapped to JBossESB service-name.</li>
+ * <li><i>serviceCategory</i> - Mapped to JBossESB service-category.</li>
+ * <li><i>responseServiceName</i> - The service-name of the responded message.</li>
+ * <li><i>responseServiceCategory</i> - The service-category of the responded message.</li>
+ * </ul>
+ *
+ *
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+public class SendMessageAction extends AbstractActionLifecycle{
+
+ public static final String SERVICE_CATEGORY = "serviceCategory";
+
+ public static final String SERVICE_NAME = "serviceName";
+
+ public static final String MESSAGE_TYPE = "messageType";
+
+ public static final String OPERATION = "operation";
+
+ public static final String RESPONSE_SERVICE_CATEGORY = "responseServiceCategory";
+
+ public static final String RESPONSE_SERVICE_NAME = "responseServiceName";
+
+ public static final String CLIENT_ROLE = "clientRole";
+
+ private ConfigTree config;
+
+ public SendMessageAction(ConfigTree config) {
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ String expected = config.getAttribute(MESSAGE_TYPE);
+ if (expected == null || "".equals(expected.trim())) {
+ throw new Exception("The messageType is not defined.");
+ }
+
+ Object value=message.getBody().get();
+ if (value instanceof byte[]) {
+ value = new String((byte[])value);
+ }
+ String receivedMessageType = MessageUtil.getMessageType(value);
+
+ if (!expected.equals(receivedMessageType)) {
+ throw new Exception ("Unexpected message type= "+ receivedMessageType + ", but expecting type="+ expected);
+ }
+
+ String category = config.getAttribute(SERVICE_CATEGORY);
+ String serviceName = config.getAttribute(SERVICE_NAME);
+
+ ServiceInvoker invoker = new ServiceInvoker(category, serviceName);
+ invoker.deliverAsync(message);
+
+ //TODO: add logic for dealing with responseServiceCategory and responseServiceName
+
+ return message;
+ }
+
+}
Added: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SwitchAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SwitchAction.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateless/actions/SwitchAction.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateless.actions;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.overlord.jbossesb.MessageUtil;
+
+/**
+ * SwitchAction provides a means to select the relevant path based on the type of a message being processed by the action.
+ *
+ * <h4>Usage:</h4>
+ * <pre>
+ * {@literal
+ <action class="org.jboss.soa.overlord.jbossesb.stateless.actions.SwitchAction"
+ process="process" name="s11-2">
+ <property name="paths">
+ <case service-category="ESBBroker.BrokerParticipant"
+ service-name="CompleteTransaction.main.2" >
+ <message type="CreditCheckOk" />
+ </case>
+ <case service-category="ESBBroker.BrokerParticipant"
+ service-name="CompleteTransaction.main.4" >
+ <message type="CreditCheckInvalid" />
+ </case>
+ </property>
+ </action>
+ * }
+ * </pre>
+ *
+ * <h4>Description of configuration properties:</h4>
+ * <ul>
+ * <li><i>serivce-category</i> - mapped to JBoss ESB service-category.</li>
+ * <li><i>service-name</i> - mapped to JBossESB service-name.<li>
+ * <li><i>type</i> - The message type that should be received.</li>
+ * </ul>
+ *
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+public class SwitchAction extends AbstractActionLifecycle{
+
+ public static final String CASE_STATEMENT = "case";
+
+ public static final String SERVICE_NAME = "service-name";
+
+ public static final String SERVICE_CATEGORY = "service-category";
+
+ public static final String MESSAGE_TYPE = "type";
+
+ private ConfigTree config;
+
+ private List<ConfigTree> caseBranchs = new LinkedList<ConfigTree>();
+
+ public SwitchAction(ConfigTree config){
+ this.config = config;
+ }
+
+ public Message process(Message message) throws Exception {
+ parseConfiguration();
+
+ Object value=message.getBody().get();
+ if (value instanceof byte[]) {
+ value = new String((byte[])value);
+ }
+ String messageType = MessageUtil.getMessageType(value);
+
+ //TODO: Need to deal with the messageType null scenario.
+
+ for (ConfigTree caseBranch : caseBranchs) {
+ ConfigTree[] msgs = caseBranch.getAllChildren();
+ for (ConfigTree msg : msgs) {
+ if (msg.getName().equals("message")) {
+ String type = msg.getAttribute("type");
+ if (messageType.equals(type)) {
+ String category = caseBranch.getAttribute(SERVICE_CATEGORY);
+ String svcName = caseBranch.getAttribute(SERVICE_NAME);
+ ServiceInvoker invoker = new ServiceInvoker(category, svcName);
+ invoker.deliverAsync(message);
+ return message;
+ }
+ }
+ }
+ }
+
+ return message;
+ }
+
+
+ private void parseConfiguration() {
+ ConfigTree[] children = config.getAllChildren();
+ for (ConfigTree ct : children) {
+ if (CASE_STATEMENT.equals(ct.getName())) {
+ caseBranchs.add(ct);
+ }
+ }
+ }
+
+}
Modified: cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtilsTest.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtilsTest.java 2009-02-26 08:08:52 UTC (rev 523)
+++ cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtilsTest.java 2009-02-28 10:53:16 UTC (rev 524)
@@ -20,7 +20,7 @@
package org.jboss.soa.overlord.jbossesb.stateful.util;
import org.w3c.dom.Element;
-import org.jboss.soa.overlord.jbossesb.stateful.util.XMLUtils;
+import org.jboss.soa.overlord.jbossesb.XMLUtils;
import org.junit.Test;
import junit.framework.Assert;
15 years, 1 month
Overlord SVN: r523 - in cdl/trunk: runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful and 11 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-02-26 03:08:52 -0500 (Thu, 26 Feb 2009)
New Revision: 523
Added:
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/EPRWrapper.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/HibernateObject.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Identity.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/IdentityType.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/JoinState.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/LogicalCourier.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/ScheduleItem.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Session.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionStatus.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/
Removed:
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/EPRWrapper.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/HibernateObject.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Identity.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/IdentityType.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/JoinState.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/LogicalCourier.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ScheduleItem.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Session.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionManager.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionStatus.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/util/
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/util/
Modified:
cdl/trunk/runtime/jbossesb-assembly/src/main/resources/overlord-cdl-jbossesb.cfg.xml
cdl/trunk/runtime/jbossesb-assembly/src/test/java/org/jboss/soa/overlord/jbossesb/HibernateTest.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ActionProperties.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ConversationAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/CreateSessionAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/IfAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/MessageProperties.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/MessageRouterAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ParallelAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/PerformAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ReceiveMessageAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/RetrieveSessionAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ScheduleStateAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SendMessageAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/Service.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetMessageAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetStateAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SwitchAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/WhenAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/WhileAction.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/ClassLoaderUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/HibernateUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/MessageUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/NameSpaceUtil.java
cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtils.java
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/MVELUsageTest.java
cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtilsTest.java
cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml
cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml
cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml
cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml
Log:
[SOAG-81] refactor the stateful pakcage name.
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/EPRWrapper.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/EPRWrapper.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/EPRWrapper.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-/**
- *
- *
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-
-@Entity
-@Table(name="CDL_EPRS")
-public class EPRWrapper implements Serializable{
-
- private static final long serialVersionUID = 1111L;
-
- @Id
- @GeneratedValue
- @Column(name="ID")
- private long id;
-
- @ManyToOne
- @JoinColumn(name="SESSION_ID")
- private Session session;
-
- @Column(name="name")
- private String name;
-
- @Column(name="EPR")
- @Lob
- private String value;
-
- public EPRWrapper() {
-
- }
-
- public Session getSession() {
- return session;
- }
-
- public void setSession(Session session) {
- this.session = session;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/HibernateObject.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/HibernateObject.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/HibernateObject.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import java.io.Serializable;
-
-/**
- * Any object that needs to be stored by using Hibernate,
- * it needs to implement this interface. It is used internally.
- *
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- *
- */
-public interface HibernateObject extends Serializable {
-
- public long getId();
-
- public void setId(long id);
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Identity.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Identity.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Identity.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,176 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-/**
- * A 'session' object, whether representing the top level (root) session, or a child session,
- * should be identified by the following information:
- *
- * <ol>
- * <li>
- * Service description name - this name reflects the participant behaviour within a choreography,
- * and provides the necessary link to enable conformance checking with the choreography description
- * </li>
- * <li>
- * POJO class name - Each sub session needs to be distinguished, in case it uses common identity objects.
- * Using the POJO class name in conjunction with the service description name, provides a unique way to reference a sub-session.
- * So the POJO class name is effectively in place of the 'choreography unit' name.
- * Combining it with the service description name, also enables the same POJO to be used within the behaviour description for different participants -
- * i.e. it does not force the user to declare two separate classes, with the same properties, just to distinguish the different participants within the choreography.
- * </li>
- * <li>
- * Set of 'primary' or 'alternate' business identities, detail see {@link IdentityType} - this list will contain identity details extracted from business messages,
- * to correlate those messages to a particular session (or sub-session).
- * </li>
- * </ol>
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-
-@Entity
-@Table(name="CDL_IDENTITY")
-public class Identity implements HibernateObject {
-
- private static final long serialVersionUID = 1112L;
-
- @Id @GeneratedValue
- @Column(name="ID")
- private long id;
-
- @ManyToOne
- @JoinColumn(name="SESSION_ID", nullable = false)
- private Session session;
-
- @Column(name="TYPE")
- @Enumerated(EnumType.STRING)
- private IdentityType type;
-
- @Column(name="PROPERTY_VALUE")
- private String propertyValues;
-
- @Column(name="SERVICE_NAME")
- private String serviceName;
-
- public Identity() {
-
- }
-
- public IdentityType getType() {
- return type;
- }
-
- public void setType(IdentityType type) {
- this.type = type;
- }
-
- public Map<String, String> getProperties() {
- Map<String, String> properties = new HashMap<String, String>();
- StringTokenizer st = new StringTokenizer(propertyValues, ",");
- for(String value = st.nextToken(); st.hasMoreTokens();) {
- int equalIndex = value.indexOf("=");
- String key = value.substring(0, equalIndex);
- String thevalue = value.substring(equalIndex);
- properties.put(key, thevalue);
- }
- return properties;
- }
-
- public void setProperties(Map<String, String> properties) {
- StringBuffer sbuffer = new StringBuffer();
- Iterator<String> keys = properties.keySet().iterator();
-
- while(keys.hasNext()) {
- String key = keys.next();
- String value = properties.get(key);
- sbuffer.append(key);
- sbuffer.append("=");
- sbuffer.append(value);
- if (keys.hasNext()) {
- sbuffer.append(",");
- }
- }
-
- this.propertyValues = sbuffer.toString();
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public Session getSession() {
- return session;
- }
-
- public void setSession(Session session) {
- this.session = session;
- }
-
- public boolean equals(Object o) {
- if (o instanceof Identity) {
- Identity id = (Identity) o;
- if (this.getType().equals(id.getType()) && this.propertyValues.equalsIgnoreCase(id.getPropertyValues())) {
- return true;
- }
- }
- return false;
- }
-
- public String toString() {
- return "Type is: " + this.type + ": Properties :" + this.propertyValues;
- }
-
- public String getPropertyValues() {
- return propertyValues;
- }
-
- public void setPropertyValues(String propertyValues) {
- this.propertyValues = propertyValues;
- }
-
- public String getServiceName() {
- return serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
-
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/IdentityType.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/IdentityType.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/IdentityType.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-/**
- * According to WS-CDL specificatio, it has four types of identity.
- *
- * <ul>
- * <li><i>primary</i> - the primary identity field, used to associate a message with the session. </li>
- * <li><i>alternate</i> - an alternative primary identity. </li>
- * <li><i>associate</i> - link the message to a session based on an identity previously associated with the session (or parent session).
- * However this identity will not be associated with the current session,
- * it is usually only used to link a child session to a parent session. </li>
- * <li><i>derived</i> - the extracted identity will be placed in reserve for use as the primary identity for a subsequent session.
- * It is not directly associated with the session in which it is discovered.</li>
- * </ul>
- *
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- *
- */
-
-public enum IdentityType {
- Primary,
- Association,
- Alternate,
- Derived;
-
- public static IdentityType toIdentityType(String string) {
- if ("Primary".equalsIgnoreCase(string)) {
- return Primary;
- } else if ("Association".equalsIgnoreCase(string)) {
- return Association;
- } else if ("Alternate".equalsIgnoreCase(string)) {
- return Alternate;
- } else if ("Derived".equalsIgnoreCase(string)) {
- return Derived;
- }
- return null;
- }
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/JoinState.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/JoinState.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/JoinState.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-/**
- * It represents the forked JBoss ESB service, which waits for other ESB services to converge.
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-@Entity
-@Table(name="CDL_JOIN_STATES")
-public class JoinState implements HibernateObject {
-
- private static final long serialVersionUID = 1113L;
-
- @Id @GeneratedValue
- @Column(name="ID")
- private long id;
-
- @ManyToOne
- @JoinColumn(name="SESSION_ID")
- private Session session;
-
- @Column(name="CATEGORY", nullable = false)
- private String category ;
-
- @Column(name="NAME", nullable = false)
- private String name ;
-
- @Column(name="ITEM_COUNT")
- private int spawnPath= 0 ;
-
- public JoinState() {
-
- }
-
- public JoinState(String category, String name, int count) {
- this.category = category;
- this.name = name;
- this.spawnPath = count;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public Session getSession() {
- return session;
- }
-
- public void setSession(Session session) {
- this.session = session;
- }
-
- public String getCategory() {
- return category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public int getSpawnPath() {
- return spawnPath;
- }
-
- public void setSpawnPath(int spawnPath) {
- this.spawnPath = spawnPath;
- }
-
- public synchronized void join() {
- this.spawnPath--;
- }
-
- public String toString() {
- return (category+"/"+name + ": spawned path count is [" + this.spawnPath + "]");
- }
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/LogicalCourier.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/LogicalCourier.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/LogicalCourier.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.addressing.eprs.*;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-
-/**
- * This class providers the courier implementation associated
- * with a LogicalEPR.
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- */
-public class LogicalCourier implements org.jboss.soa.esb.couriers.Courier {
-
- private ServiceInvoker serviceInvoker=null;
-
- /**
- * The constructor, supplied the logical EPR represented
- * by the courier.
- *
- * @param epr The logical EPR
- * @throws MessageDeliverException
- */
- public LogicalCourier(LogicalEPR epr)
- throws MessageDeliverException {
- serviceInvoker = epr.getServiceInvoker();
- }
-
- /**
- * This method delivers the supplied message to the EPR
- * associated with the logical courier.
- *
- * @param mesg The message
- */
- public boolean deliver(Message mesg) throws CourierException,
- MalformedEPRException {
-
- try {
- serviceInvoker.deliverAsync(mesg);
- } catch(MessageDeliverException e) {
- throw new CourierException("Failed to deliver message", e);
- }
-
- return(true);
- }
-
- /**
- * This method cleans up after the courier implementation
- * is no longer required.
- */
- public void cleanup() {
- serviceInvoker = null;
- }
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ScheduleItem.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ScheduleItem.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ScheduleItem.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,120 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-/**
- * An item represent for JBoss ESB service.
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- *
- */
-
-@Entity
-@Table(name="CDL_SCHEDULE_ITEM")
-public class ScheduleItem implements HibernateObject {
-
- private static final long serialVersionUID = 1114L;
-
- @Id @GeneratedValue
- @Column(name="ID")
- private long id;
-
- @ManyToOne
- @JoinColumn(name="SESSION_ID")
- private Session session;
-
- @Column(name="CATEGORY", nullable = false)
- private String category ;
-
- @Column(name="NAME", nullable = false)
- private String name ;
-
- public ScheduleItem() {
-
- }
-
- public ScheduleItem(String category, String name) {
- this.category = category;
- this.name = name;
- }
-
- public String getCategory() {
- return(category);
- }
-
- public String getName() {
- return(name);
- }
-
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public boolean equals(Object other) {
- if (other instanceof ScheduleItem) {
- ScheduleItem si=(ScheduleItem)other;
- if (si.category.equals(category) && si.name.equals(name)) {
- return true;
- }
- }
- return false;
- }
-
- public String toString() {
- StringBuffer sbuffer = new StringBuffer();
- sbuffer.append("id=" + id +",");
- sbuffer.append("category=" + category + ",");
- sbuffer.append("name=" + name + ",");
- sbuffer.append("session=" + session);
- return sbuffer.toString();
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public Session getSession() {
- return session;
- }
-
- public void setSession(Session session) {
- this.session = session;
- }
-
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Session.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Session.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Session.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,467 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import org.apache.log4j.Logger;
-import org.hibernate.annotations.CollectionOfElements;
-import org.hibernate.annotations.MapKey;
-import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
-import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * A Session represents the encapsulation of the current status of execution of an associated choreography instance,
- * as well as variables containing business information relevant to the choreography.
- *
- * <p>
- * A Session represents a single choreography unit within a WS-CDL package.
- * This means that a single choreography description (or package) will usually have multiple sessions,
- * one associated with the root choreography unit, and zero or more associated with other non-root choreography units,
- * that are directly or indirectly performed by the root choreography unit.
- * </p>
-
- * <p>
- * This Session class should not be visible outside the ESB conversational actions.
- * There should be no reason for user custom actions to require access to this information.
- * The only information they should be able to access is the business state information associated with the session.
- * </p>
- *
- * <p>
- * Sessions can be organized in a hierarchy, with the top session being associated with a root choreography unit,
- * and the child sessions being the performed sub-choreographies.
- * </p>
- *
- * <p>
- * The session maintains a schedule of service descriptors to be processed (represented by the category and name of the service).
- * This schedule indicates which service descriptors are expected to be invoked on behalf of the session.
- * The execution of a service descriptor's action pipeline on a session will result in the service descriptor being removed from the schedule,
- * but may result in other service descriptors being added to the schedule, depending upon the nature of the conversation actions within the pipeline.
- * </p>
- *
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-
-@Entity
-@Table(name="CDL_SESSION")
-public class Session implements HibernateObject {
-
- private static final long serialVersionUID = 1115L;
-
- public static final String PARENT_REFERENCE_KEY = "parentReferenceKey";
-
- private static Logger logger = Logger.getLogger(Session.class);
-
-
- @Id @GeneratedValue
- @Column(name="SESSION_ID")
- private long id;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name="PARENT_ID", nullable=true)
- private Session parent;
-
- @Enumerated(value = EnumType.STRING)
- @Column(name = "STATUS")
- private SessionStatus status=SessionStatus.Initialized;
-
- @OneToMany(fetch = FetchType.LAZY)
- @JoinColumn(name="SESSION_ID")
- private List<EPRWrapper> eprWrappers = new ArrayList<EPRWrapper>();
-
- @OneToMany(fetch = FetchType.LAZY)
- @JoinColumn(name="SESSION_ID")
- private List<ScheduleItem> scheduleItems=new ArrayList<ScheduleItem>();
-
- @OneToMany(fetch = FetchType.LAZY)
- @JoinColumn(name = "SESSION_ID")
- private List<JoinState> joinStates=new ArrayList<JoinState>();
-
- @OneToMany(fetch = FetchType.LAZY)
- @JoinColumn(name="SESSION_ID")
- private List<Identity> identities=new ArrayList<Identity>();
-
- @Column(name = "POJO_CLASS")
- private String pojoClass;
-
- @Column(name="SERVICE_NAME")
- private String serviceName;
-
- @Column(name="CONVERSATION_TYPE")
- private String conversationType;
-
- @Transient
- private Object businessObject;
-
- @Lob
- @Column(name="Business_OBJECT")
- private byte[] serializedObject;
-
- @CollectionOfElements(fetch = FetchType.LAZY)
- @JoinTable(name="CDL_SESSION_PROPERTY", joinColumns=@JoinColumn(name="SESSION_ID"))
- @MapKey(columns={@Column(name="property_key")})
- @Column(name="property_value")
- private Map<String, String> properties = new HashMap<String, String>();
-
- public Session() {
- }
-
- public Session(Session parent) {
- this.parent = parent;
- }
-
- public void setStatus(SessionStatus status) {
- this.status = status;
- }
-
- public SessionStatus getStatus() {
- return this.status;
- }
-
- public void setEPR(String name, EPR epr) throws Exception{
- try {
- EPRWrapper theEPRWrapper = null;
- for(EPRWrapper eprWrapper : eprWrappers) {
- if (name.equals(eprWrapper.getName())) {
- theEPRWrapper = eprWrapper;
- }
- }
-
- if (theEPRWrapper != null) {
- eprWrappers.remove(theEPRWrapper);
- SessionManager.removeObject(theEPRWrapper);
- }
-
- EPRWrapper eprWrapper = new EPRWrapper();
- eprWrapper.setSession(this);
- eprWrapper.setName(name);
- eprWrapper.setValue(EPRHelper.toXMLString(epr));
- eprWrappers.add(eprWrapper);
- SessionManager.saveObject(eprWrapper);
- } catch (Exception e) {
- throw new Exception("Error in storing EPR!!" + e, e);
- }
- }
-
- public EPR getEPR(String name) throws Exception{
-
- for(EPRWrapper epr : eprWrappers) {
- if (name.equals(epr.getName()))
- {
- return EPRHelper.fromXMLString(epr.getValue());
- }
- }
-
- return null;
- }
-
- public void schedule(String category, String name, Message message) throws Exception {
-
- ScheduleItem si=new ScheduleItem(category, name);
- si.setSession(this);
-
- logger.debug("Scheduling: " + si + " by thread of " + Thread.currentThread().getName());
-
- synchronized(joinStates) {
- JoinState joinState = getJoinStateByScheduleItem(si);
- if (joinState != null) {
- joinState.join();
- SessionManager.updateObject(joinState);
- logger.debug("Join State is: " + joinState);
- if (joinState.getSpawnPath() <= 0) {
- joinStates.remove(joinState);
- SessionManager.removeObject(joinState);
-
- logger.info("Deliver the Join State of: " + joinState);
-
- ServiceInvoker invoker= new ServiceInvoker(category, name);
- invoker.deliverAsync(message);
- } else {
- logger.info("Don't join yet: "+ joinState);
- return;
- }
- }
- }
-
- synchronized(scheduleItems) {
- // Check if already exists
- if (scheduleItems.contains(si)) {
- throw new Exception("Schedule already contains item for " + si);
- }
-
- scheduleItems.add(si);
- SessionManager.saveObject(si);
-
- logger.debug("Finished scheduling "+si +"' by thread of " + Thread.currentThread().getName());
- }
-
- }
-
- public void unschedule(String category, String name) throws Exception {
-
- logger.debug("Unscheduling: '"+category+"/"+name+"' by thread of " + Thread.currentThread().getName() );
-
- synchronized(joinStates) {
- if (isScheduleItemInJoinState(category, name)) {
- //FIXME, it should throw exception, but need to use the pemissitic lock in database.
- logger.error("Unable to enact join state, coverging paths have still not completed");
- //throw new Exception("Unable to enact join state, converging paths have still not completed");
- }
- }
-
- synchronized(scheduleItems) {
- ScheduleItem si = getScheduleItem(category, name);
- if (si.getId() == 0) {
- throw new Exception("The scheduleItem of " + si + " is not existed !");
- }
-
- scheduleItems.remove(si);
- SessionManager.removeObject(si);
- logger.debug("Finished unscheduling: " + si +"' by thread of " + Thread.currentThread().getName());
- }
- }
-
- protected boolean isScheduleItemInJoinState(String category, String name) {
- for(JoinState joinState : joinStates) {
- if (name.equals(joinState.getName()) && category.equals(joinState.getCategory())) {
- return true;
- }
- }
- return false;
- }
-
-
- protected synchronized JoinState getJoinStateByScheduleItem(ScheduleItem si) {
- for(JoinState joinState : joinStates) {
- if (si.getName().equals(joinState.getName()) && si.getCategory().equals(joinState.getCategory())) {
- return joinState;
- }
- }
- return null;
- }
-
- protected ScheduleItem getScheduleItem(String category, String name) {
- for(ScheduleItem si : scheduleItems) {
- if (category.equals(si.getCategory()) && name.equals(si.getName())) {
- si.setSession(this);
- return si;
- }
- }
- ScheduleItem item = new ScheduleItem(category, name);
- item.setSession(this);
- return item;
- }
-
- public void join(String category, String name, int count) throws Exception {
- JoinState joinState=new JoinState(category, name, count);
- joinState.setSession(this);
- if (joinStates.contains(joinState)) {
- throw new Exception("The '"+category+ "/"+name+"' of JoinState is already existed.");
- }
- joinStates.add(joinState);
- SessionManager.saveObject(joinState);
- logger.debug("Added Join State: " + joinState);
- }
-
- public void assimulateIdentities(java.util.List<Identity> ids) throws Exception {
-
- List<Identity> newIds = new ArrayList<Identity>();
-
- if (identities.size() == 0) {
- newIds.addAll(ids);
- } else {
- for(int i =0; i< ids.size(); i++) {
- Identity theID = ids.get(i);
- if (theID.getType() == IdentityType.Primary ||
- theID.getType() == IdentityType.Association) {
- if (!identities.contains(theID)) {
- newIds.add(theID);
- } else {
- logger.debug("IDENTITY CONFIRMED:" + theID);
- }
- } else {
- newIds.add(theID);
- }
- }
- }
-
- List<Identity> result = new ArrayList<Identity>();
- for(Identity id : newIds) {
- id.setSession(this);
- id.setServiceName(this.serviceName);
- result.add(id);
- }
-
- SessionManager.saveCollection(result);
- identities.addAll(result);
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public Session getParent() {
- return parent;
- }
-
- public void setParent(Session parent) {
- this.parent = parent;
- }
-
- public List<ScheduleItem> getScheduleItems() {
- return scheduleItems;
- }
-
- public void setScheduleItems(List<ScheduleItem> scheduleItems) {
- this.scheduleItems = scheduleItems;
- }
-
- public List<Identity> getIdentities() {
- return identities;
- }
-
- public void setIdentities(List<Identity> identities) {
- this.identities = identities;
- }
-
- public String getPojoClass() {
- return pojoClass;
- }
-
- public void setPojoClass(String pojoClass) {
- this.pojoClass = pojoClass;
- }
-
- public Object getBusinessObject() {
- ByteArrayInputStream bais = new ByteArrayInputStream(serializedObject);
- try {
- ObjectInputStream in = new ObjectInputStream(bais);
- businessObject = in.readObject();
- in.close();
- } catch (Exception e) {
- throw new RuntimeException("Error in reading Object", e);
- }
- return businessObject;
- }
-
- public void setBusinessObject(Object businessObject) {
- this.businessObject = businessObject;
-
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- ObjectOutputStream out;
-
- try {
- out = new ObjectOutputStream(bos);
- out.writeObject(this.businessObject);
- out.close();
- } catch (Exception e) {
- throw new RuntimeException("Error in setting business object of " + businessObject, e);
- }
- this.serializedObject = bos.toByteArray();
- }
-
- public String getServiceName() {
- return serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
-
- public String getConversationType() {
- return conversationType;
- }
-
- public void setConversationType(String conversationType) {
- this.conversationType = conversationType;
- }
-
- public List<EPRWrapper> getEprWrappers() {
- return eprWrappers;
- }
-
- public void setEprWrappers(List<EPRWrapper> eprWrappers) {
- this.eprWrappers = eprWrappers;
- }
-
- public List<JoinState> getJoinStates() {
- return joinStates;
- }
-
- public void setJoinStates(List<JoinState> joinStates) {
- this.joinStates = joinStates;
- }
-
- public byte[] getSerializedObject() {
- return serializedObject;
- }
-
- public void setSerializedObject(byte[] serializedObject) {
- this.serializedObject = serializedObject;
- }
-
- public Map<String, String> getProperties() {
- return this.properties;
- }
-
- public void setProperties(Map<String, String> properties) {
- this.properties = properties;
- }
-
- public String toString() {
- StringBuffer sbuffer = new StringBuffer();
- sbuffer.append("[ Session id: " + id);
- sbuffer.append(" serviceName: " + serviceName);
- sbuffer.append(" business state object: " + businessObject);
- sbuffer.append("]");
- return sbuffer.toString();
- }
-
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionManager.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionManager.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionManager.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,209 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.actions.MessageProperties;
-import org.jboss.soa.overlord.jbossesb.actions.Service;
-import org.jboss.soa.overlord.jbossesb.util.ClassLoaderUtil;
-import org.jboss.soa.overlord.jbossesb.util.HibernateUtil;
-import org.mvel.MVEL;
-
-/**
- * This component is responsible for managing the persistence and retrieval
- * of sessions.
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
- */
-public class SessionManager {
-
- private static Logger logger = Logger.getLogger(SessionManager.class);
-
- public static Session createSession(String sessionName) throws Exception {
-
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- Class<?> pojoclass= ClassLoaderUtil.loadClass(sessionName);
- Object businessState = pojoclass.newInstance();
-
- Session conversationSession = new Session();
- conversationSession.setPojoClass(sessionName);
- conversationSession.setStatus(SessionStatus.Active);
- conversationSession.setBusinessObject(businessState);
-
- Service service = pojoclass.getAnnotation(Service.class);
- if (service != null) {
- conversationSession.setServiceName(service.name());
- conversationSession.setConversationType(service.conversationType());
- }
-
- hibernateSession.save(conversationSession);
-
- return conversationSession;
- }
-
- @SuppressWarnings("unchecked")
- public static Session createSubSession(String sessionName, String sessionKey, Message message) throws Exception {
-
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- Session parentSession = (Session)hibernateSession.load(Session.class, Long.valueOf(sessionKey));
- Class<?> pojoclass= ClassLoaderUtil.loadClass(sessionName);
- Object businessState = pojoclass.newInstance();
-
- Map<String, Object> boundVariables = (Map<String, Object>)message.getProperties().
- getProperty(MessageProperties.BOUND_VARIABLE_KEY);
- for(String key : boundVariables.keySet()) {
- MVEL.setProperty(businessState, key, boundVariables.get(key));
- logger.debug("bound to " + key);
- }
-
- Session conversationSession = new Session();
- conversationSession.setPojoClass(sessionName);
- conversationSession.setStatus(SessionStatus.Active);
- conversationSession.setBusinessObject(businessState);
- conversationSession.setParent(parentSession);
-
- Map<String, String> properties = (Map<String, String>)message.getProperties().
- getProperty(MessageProperties.SESSION_PROPERTIES);
- if (properties != null) {
- conversationSession.setProperties(properties);
- logger.debug("Inject properties of " + properties);
- }
-
- Service service = pojoclass.getAnnotation(Service.class);
- if (service != null) {
- conversationSession.setServiceName(service.name());
- conversationSession.setConversationType(service.conversationType());
- } else {
- conversationSession.setServiceName(parentSession.getServiceName());
- conversationSession.setConversationType(parentSession.getConversationType());
- }
-
- hibernateSession.save(conversationSession);
-
- return conversationSession;
- }
-
- public static Session retrieveSession(String sessionKey, java.util.List<Identity> ids) throws Exception {
-
- if (sessionKey == null && ids == null) {
- return null;
- }
-
- if (sessionKey != null) {
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- Session session = (Session) hibernateSession.load(Session.class, Long.valueOf(sessionKey));
- injectParentReference(session);
- return session;
- }
-
- for (Identity id : ids) {
- if (IdentityType.Primary.equals(id.getType())) {
- return getSessionByIdentity(id);
- }
- }
-
- return null;
- }
-
- public static Object saveObject(Object obj) throws Exception {
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- hibernateSession.save(obj);
- return obj;
- }
-
-
- public static Object getObject(long id, Class<?> cls) throws Exception {
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- return hibernateSession.load(cls, id);
- }
-
- @SuppressWarnings("unchecked")
- public static Collection saveCollection(Collection col) throws Exception {
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
-
- for(Iterator it = col.iterator(); it.hasNext();) {
- Object o = it.next();
- hibernateSession.save(o);
- }
-
- return col;
- }
-
- public static void updateObject(Object obj) {
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- hibernateSession.update(obj);
- }
-
- public static void removeObject(Object obj) {
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- hibernateSession.delete(obj);
- }
-
-
- public static Session getSessionByIdentity(Identity id) throws Exception{
- org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
- String query = "select b from Identity b where b.type =:type and b.propertyValues =:propertyValues and b.serviceName =:serviceName";
- List<?> results = hibernateSession.createQuery(query)
- .setParameter("type", id.getType())
- .setParameter("propertyValues", id.getPropertyValues())
- .setParameter("serviceName", id.getServiceName())
- .list();
- if (results.size() < 1) {
- return null;
- }
-
- Identity theID = null;
- for (int i=0; i< results.size(); i++) {
- Identity identity = (Identity)results.get(i);
- if (SessionStatus.Active.equals(identity.getSession().getStatus())) {
- theID = identity;
- break;
- }
- }
-
- if (theID == null) {
- return null;
- }
-
- Session session = theID.getSession();
- injectParentReference(session);
-
- logger.debug("Get Session of " + session + " by using identity of " + id);
-
- return session;
- }
-
- private static void injectParentReference(Session session) {
- String parentProperty = session.getProperties().get(Session.PARENT_REFERENCE_KEY);
- if (parentProperty!= null && session.getParent() != null) {
- Object parentBizObj = session.getParent().getBusinessObject();
- Object bizObj = session.getBusinessObject();
- MVEL.setProperty(bizObj, parentProperty, parentBizObj);
- session.setBusinessObject(bizObj);
- }
- }
-}
Deleted: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionStatus.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionStatus.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionStatus.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2008,
- */
-package org.jboss.soa.overlord.jbossesb;
-
-
-/**
- *
- * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
- */
-
-public enum SessionStatus {
-
- Initialized,
- Active,
- Completed,
- CLOSED
-}
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/EPRWrapper.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/EPRWrapper.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/EPRWrapper.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/EPRWrapper.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,97 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.Lob;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ *
+ *
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+
+@Entity
+@Table(name="CDL_EPRS")
+public class EPRWrapper implements Serializable{
+
+ private static final long serialVersionUID = 1111L;
+
+ @Id
+ @GeneratedValue
+ @Column(name="ID")
+ private long id;
+
+ @ManyToOne
+ @JoinColumn(name="SESSION_ID")
+ private Session session;
+
+ @Column(name="name")
+ private String name;
+
+ @Column(name="EPR")
+ @Lob
+ private String value;
+
+ public EPRWrapper() {
+
+ }
+
+ public Session getSession() {
+ return session;
+ }
+
+ public void setSession(Session session) {
+ this.session = session;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/EPRWrapper.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/HibernateObject.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/HibernateObject.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/HibernateObject.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/HibernateObject.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import java.io.Serializable;
+
+/**
+ * Any object that needs to be stored by using Hibernate,
+ * it needs to implement this interface. It is used internally.
+ *
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+public interface HibernateObject extends Serializable {
+
+ public long getId();
+
+ public void setId(long id);
+
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/HibernateObject.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Identity.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Identity.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Identity.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Identity.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,176 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * A 'session' object, whether representing the top level (root) session, or a child session,
+ * should be identified by the following information:
+ *
+ * <ol>
+ * <li>
+ * Service description name - this name reflects the participant behaviour within a choreography,
+ * and provides the necessary link to enable conformance checking with the choreography description
+ * </li>
+ * <li>
+ * POJO class name - Each sub session needs to be distinguished, in case it uses common identity objects.
+ * Using the POJO class name in conjunction with the service description name, provides a unique way to reference a sub-session.
+ * So the POJO class name is effectively in place of the 'choreography unit' name.
+ * Combining it with the service description name, also enables the same POJO to be used within the behaviour description for different participants -
+ * i.e. it does not force the user to declare two separate classes, with the same properties, just to distinguish the different participants within the choreography.
+ * </li>
+ * <li>
+ * Set of 'primary' or 'alternate' business identities, detail see {@link IdentityType} - this list will contain identity details extracted from business messages,
+ * to correlate those messages to a particular session (or sub-session).
+ * </li>
+ * </ol>
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+
+@Entity
+@Table(name="CDL_IDENTITY")
+public class Identity implements HibernateObject {
+
+ private static final long serialVersionUID = 1112L;
+
+ @Id @GeneratedValue
+ @Column(name="ID")
+ private long id;
+
+ @ManyToOne
+ @JoinColumn(name="SESSION_ID", nullable = false)
+ private Session session;
+
+ @Column(name="TYPE")
+ @Enumerated(EnumType.STRING)
+ private IdentityType type;
+
+ @Column(name="PROPERTY_VALUE")
+ private String propertyValues;
+
+ @Column(name="SERVICE_NAME")
+ private String serviceName;
+
+ public Identity() {
+
+ }
+
+ public IdentityType getType() {
+ return type;
+ }
+
+ public void setType(IdentityType type) {
+ this.type = type;
+ }
+
+ public Map<String, String> getProperties() {
+ Map<String, String> properties = new HashMap<String, String>();
+ StringTokenizer st = new StringTokenizer(propertyValues, ",");
+ for(String value = st.nextToken(); st.hasMoreTokens();) {
+ int equalIndex = value.indexOf("=");
+ String key = value.substring(0, equalIndex);
+ String thevalue = value.substring(equalIndex);
+ properties.put(key, thevalue);
+ }
+ return properties;
+ }
+
+ public void setProperties(Map<String, String> properties) {
+ StringBuffer sbuffer = new StringBuffer();
+ Iterator<String> keys = properties.keySet().iterator();
+
+ while(keys.hasNext()) {
+ String key = keys.next();
+ String value = properties.get(key);
+ sbuffer.append(key);
+ sbuffer.append("=");
+ sbuffer.append(value);
+ if (keys.hasNext()) {
+ sbuffer.append(",");
+ }
+ }
+
+ this.propertyValues = sbuffer.toString();
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public Session getSession() {
+ return session;
+ }
+
+ public void setSession(Session session) {
+ this.session = session;
+ }
+
+ public boolean equals(Object o) {
+ if (o instanceof Identity) {
+ Identity id = (Identity) o;
+ if (this.getType().equals(id.getType()) && this.propertyValues.equalsIgnoreCase(id.getPropertyValues())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public String toString() {
+ return "Type is: " + this.type + ": Properties :" + this.propertyValues;
+ }
+
+ public String getPropertyValues() {
+ return propertyValues;
+ }
+
+ public void setPropertyValues(String propertyValues) {
+ this.propertyValues = propertyValues;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Identity.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/IdentityType.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/IdentityType.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/IdentityType.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/IdentityType.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+/**
+ * According to WS-CDL specificatio, it has four types of identity.
+ *
+ * <ul>
+ * <li><i>primary</i> - the primary identity field, used to associate a message with the session. </li>
+ * <li><i>alternate</i> - an alternative primary identity. </li>
+ * <li><i>associate</i> - link the message to a session based on an identity previously associated with the session (or parent session).
+ * However this identity will not be associated with the current session,
+ * it is usually only used to link a child session to a parent session. </li>
+ * <li><i>derived</i> - the extracted identity will be placed in reserve for use as the primary identity for a subsequent session.
+ * It is not directly associated with the session in which it is discovered.</li>
+ * </ul>
+ *
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ *
+ */
+
+public enum IdentityType {
+ Primary,
+ Association,
+ Alternate,
+ Derived;
+
+ public static IdentityType toIdentityType(String string) {
+ if ("Primary".equalsIgnoreCase(string)) {
+ return Primary;
+ } else if ("Association".equalsIgnoreCase(string)) {
+ return Association;
+ } else if ("Alternate".equalsIgnoreCase(string)) {
+ return Alternate;
+ } else if ("Derived".equalsIgnoreCase(string)) {
+ return Derived;
+ }
+ return null;
+ }
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/IdentityType.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/JoinState.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/JoinState.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/JoinState.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/JoinState.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * It represents the forked JBoss ESB service, which waits for other ESB services to converge.
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+@Entity
+@Table(name="CDL_JOIN_STATES")
+public class JoinState implements HibernateObject {
+
+ private static final long serialVersionUID = 1113L;
+
+ @Id @GeneratedValue
+ @Column(name="ID")
+ private long id;
+
+ @ManyToOne
+ @JoinColumn(name="SESSION_ID")
+ private Session session;
+
+ @Column(name="CATEGORY", nullable = false)
+ private String category ;
+
+ @Column(name="NAME", nullable = false)
+ private String name ;
+
+ @Column(name="ITEM_COUNT")
+ private int spawnPath= 0 ;
+
+ public JoinState() {
+
+ }
+
+ public JoinState(String category, String name, int count) {
+ this.category = category;
+ this.name = name;
+ this.spawnPath = count;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public Session getSession() {
+ return session;
+ }
+
+ public void setSession(Session session) {
+ this.session = session;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getSpawnPath() {
+ return spawnPath;
+ }
+
+ public void setSpawnPath(int spawnPath) {
+ this.spawnPath = spawnPath;
+ }
+
+ public synchronized void join() {
+ this.spawnPath--;
+ }
+
+ public String toString() {
+ return (category+"/"+name + ": spawned path count is [" + this.spawnPath + "]");
+ }
+
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/JoinState.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/LogicalCourier.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/LogicalCourier.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/LogicalCourier.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/LogicalCourier.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.couriers.CourierException;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.addressing.eprs.*;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+
+/**
+ * This class providers the courier implementation associated
+ * with a LogicalEPR.
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ */
+public class LogicalCourier implements org.jboss.soa.esb.couriers.Courier {
+
+ private ServiceInvoker serviceInvoker=null;
+
+ /**
+ * The constructor, supplied the logical EPR represented
+ * by the courier.
+ *
+ * @param epr The logical EPR
+ * @throws MessageDeliverException
+ */
+ public LogicalCourier(LogicalEPR epr)
+ throws MessageDeliverException {
+ serviceInvoker = epr.getServiceInvoker();
+ }
+
+ /**
+ * This method delivers the supplied message to the EPR
+ * associated with the logical courier.
+ *
+ * @param mesg The message
+ */
+ public boolean deliver(Message mesg) throws CourierException,
+ MalformedEPRException {
+
+ try {
+ serviceInvoker.deliverAsync(mesg);
+ } catch(MessageDeliverException e) {
+ throw new CourierException("Failed to deliver message", e);
+ }
+
+ return(true);
+ }
+
+ /**
+ * This method cleans up after the courier implementation
+ * is no longer required.
+ */
+ public void cleanup() {
+ serviceInvoker = null;
+ }
+
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/LogicalCourier.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/ScheduleItem.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/ScheduleItem.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/ScheduleItem.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/ScheduleItem.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+/**
+ * An item represent for JBoss ESB service.
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ *
+ */
+
+@Entity
+@Table(name="CDL_SCHEDULE_ITEM")
+public class ScheduleItem implements HibernateObject {
+
+ private static final long serialVersionUID = 1114L;
+
+ @Id @GeneratedValue
+ @Column(name="ID")
+ private long id;
+
+ @ManyToOne
+ @JoinColumn(name="SESSION_ID")
+ private Session session;
+
+ @Column(name="CATEGORY", nullable = false)
+ private String category ;
+
+ @Column(name="NAME", nullable = false)
+ private String name ;
+
+ public ScheduleItem() {
+
+ }
+
+ public ScheduleItem(String category, String name) {
+ this.category = category;
+ this.name = name;
+ }
+
+ public String getCategory() {
+ return(category);
+ }
+
+ public String getName() {
+ return(name);
+ }
+
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public boolean equals(Object other) {
+ if (other instanceof ScheduleItem) {
+ ScheduleItem si=(ScheduleItem)other;
+ if (si.category.equals(category) && si.name.equals(name)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public String toString() {
+ StringBuffer sbuffer = new StringBuffer();
+ sbuffer.append("id=" + id +",");
+ sbuffer.append("category=" + category + ",");
+ sbuffer.append("name=" + name + ",");
+ sbuffer.append("session=" + session);
+ return sbuffer.toString();
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public Session getSession() {
+ return session;
+ }
+
+ public void setSession(Session session) {
+ this.session = session;
+ }
+
+
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/ScheduleItem.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Session.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/Session.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Session.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Session.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,467 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.Lob;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import org.apache.log4j.Logger;
+import org.hibernate.annotations.CollectionOfElements;
+import org.hibernate.annotations.MapKey;
+import org.jboss.internal.soa.esb.addressing.helpers.EPRHelper;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * A Session represents the encapsulation of the current status of execution of an associated choreography instance,
+ * as well as variables containing business information relevant to the choreography.
+ *
+ * <p>
+ * A Session represents a single choreography unit within a WS-CDL package.
+ * This means that a single choreography description (or package) will usually have multiple sessions,
+ * one associated with the root choreography unit, and zero or more associated with other non-root choreography units,
+ * that are directly or indirectly performed by the root choreography unit.
+ * </p>
+
+ * <p>
+ * This Session class should not be visible outside the ESB conversational actions.
+ * There should be no reason for user custom actions to require access to this information.
+ * The only information they should be able to access is the business state information associated with the session.
+ * </p>
+ *
+ * <p>
+ * Sessions can be organized in a hierarchy, with the top session being associated with a root choreography unit,
+ * and the child sessions being the performed sub-choreographies.
+ * </p>
+ *
+ * <p>
+ * The session maintains a schedule of service descriptors to be processed (represented by the category and name of the service).
+ * This schedule indicates which service descriptors are expected to be invoked on behalf of the session.
+ * The execution of a service descriptor's action pipeline on a session will result in the service descriptor being removed from the schedule,
+ * but may result in other service descriptors being added to the schedule, depending upon the nature of the conversation actions within the pipeline.
+ * </p>
+ *
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+
+@Entity
+@Table(name="CDL_SESSION")
+public class Session implements HibernateObject {
+
+ private static final long serialVersionUID = 1115L;
+
+ public static final String PARENT_REFERENCE_KEY = "parentReferenceKey";
+
+ private static Logger logger = Logger.getLogger(Session.class);
+
+
+ @Id @GeneratedValue
+ @Column(name="SESSION_ID")
+ private long id;
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name="PARENT_ID", nullable=true)
+ private Session parent;
+
+ @Enumerated(value = EnumType.STRING)
+ @Column(name = "STATUS")
+ private SessionStatus status=SessionStatus.Initialized;
+
+ @OneToMany(fetch = FetchType.LAZY)
+ @JoinColumn(name="SESSION_ID")
+ private List<EPRWrapper> eprWrappers = new ArrayList<EPRWrapper>();
+
+ @OneToMany(fetch = FetchType.LAZY)
+ @JoinColumn(name="SESSION_ID")
+ private List<ScheduleItem> scheduleItems=new ArrayList<ScheduleItem>();
+
+ @OneToMany(fetch = FetchType.LAZY)
+ @JoinColumn(name = "SESSION_ID")
+ private List<JoinState> joinStates=new ArrayList<JoinState>();
+
+ @OneToMany(fetch = FetchType.LAZY)
+ @JoinColumn(name="SESSION_ID")
+ private List<Identity> identities=new ArrayList<Identity>();
+
+ @Column(name = "POJO_CLASS")
+ private String pojoClass;
+
+ @Column(name="SERVICE_NAME")
+ private String serviceName;
+
+ @Column(name="CONVERSATION_TYPE")
+ private String conversationType;
+
+ @Transient
+ private Object businessObject;
+
+ @Lob
+ @Column(name="Business_OBJECT")
+ private byte[] serializedObject;
+
+ @CollectionOfElements(fetch = FetchType.LAZY)
+ @JoinTable(name="CDL_SESSION_PROPERTY", joinColumns=@JoinColumn(name="SESSION_ID"))
+ @MapKey(columns={@Column(name="property_key")})
+ @Column(name="property_value")
+ private Map<String, String> properties = new HashMap<String, String>();
+
+ public Session() {
+ }
+
+ public Session(Session parent) {
+ this.parent = parent;
+ }
+
+ public void setStatus(SessionStatus status) {
+ this.status = status;
+ }
+
+ public SessionStatus getStatus() {
+ return this.status;
+ }
+
+ public void setEPR(String name, EPR epr) throws Exception{
+ try {
+ EPRWrapper theEPRWrapper = null;
+ for(EPRWrapper eprWrapper : eprWrappers) {
+ if (name.equals(eprWrapper.getName())) {
+ theEPRWrapper = eprWrapper;
+ }
+ }
+
+ if (theEPRWrapper != null) {
+ eprWrappers.remove(theEPRWrapper);
+ SessionManager.removeObject(theEPRWrapper);
+ }
+
+ EPRWrapper eprWrapper = new EPRWrapper();
+ eprWrapper.setSession(this);
+ eprWrapper.setName(name);
+ eprWrapper.setValue(EPRHelper.toXMLString(epr));
+ eprWrappers.add(eprWrapper);
+ SessionManager.saveObject(eprWrapper);
+ } catch (Exception e) {
+ throw new Exception("Error in storing EPR!!" + e, e);
+ }
+ }
+
+ public EPR getEPR(String name) throws Exception{
+
+ for(EPRWrapper epr : eprWrappers) {
+ if (name.equals(epr.getName()))
+ {
+ return EPRHelper.fromXMLString(epr.getValue());
+ }
+ }
+
+ return null;
+ }
+
+ public void schedule(String category, String name, Message message) throws Exception {
+
+ ScheduleItem si=new ScheduleItem(category, name);
+ si.setSession(this);
+
+ logger.debug("Scheduling: " + si + " by thread of " + Thread.currentThread().getName());
+
+ synchronized(joinStates) {
+ JoinState joinState = getJoinStateByScheduleItem(si);
+ if (joinState != null) {
+ joinState.join();
+ SessionManager.updateObject(joinState);
+ logger.debug("Join State is: " + joinState);
+ if (joinState.getSpawnPath() <= 0) {
+ joinStates.remove(joinState);
+ SessionManager.removeObject(joinState);
+
+ logger.info("Deliver the Join State of: " + joinState);
+
+ ServiceInvoker invoker= new ServiceInvoker(category, name);
+ invoker.deliverAsync(message);
+ } else {
+ logger.info("Don't join yet: "+ joinState);
+ return;
+ }
+ }
+ }
+
+ synchronized(scheduleItems) {
+ // Check if already exists
+ if (scheduleItems.contains(si)) {
+ throw new Exception("Schedule already contains item for " + si);
+ }
+
+ scheduleItems.add(si);
+ SessionManager.saveObject(si);
+
+ logger.debug("Finished scheduling "+si +"' by thread of " + Thread.currentThread().getName());
+ }
+
+ }
+
+ public void unschedule(String category, String name) throws Exception {
+
+ logger.debug("Unscheduling: '"+category+"/"+name+"' by thread of " + Thread.currentThread().getName() );
+
+ synchronized(joinStates) {
+ if (isScheduleItemInJoinState(category, name)) {
+ //FIXME, it should throw exception, but need to use the pemissitic lock in database.
+ logger.error("Unable to enact join state, coverging paths have still not completed");
+ //throw new Exception("Unable to enact join state, converging paths have still not completed");
+ }
+ }
+
+ synchronized(scheduleItems) {
+ ScheduleItem si = getScheduleItem(category, name);
+ if (si.getId() == 0) {
+ throw new Exception("The scheduleItem of " + si + " is not existed !");
+ }
+
+ scheduleItems.remove(si);
+ SessionManager.removeObject(si);
+ logger.debug("Finished unscheduling: " + si +"' by thread of " + Thread.currentThread().getName());
+ }
+ }
+
+ protected boolean isScheduleItemInJoinState(String category, String name) {
+ for(JoinState joinState : joinStates) {
+ if (name.equals(joinState.getName()) && category.equals(joinState.getCategory())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ protected synchronized JoinState getJoinStateByScheduleItem(ScheduleItem si) {
+ for(JoinState joinState : joinStates) {
+ if (si.getName().equals(joinState.getName()) && si.getCategory().equals(joinState.getCategory())) {
+ return joinState;
+ }
+ }
+ return null;
+ }
+
+ protected ScheduleItem getScheduleItem(String category, String name) {
+ for(ScheduleItem si : scheduleItems) {
+ if (category.equals(si.getCategory()) && name.equals(si.getName())) {
+ si.setSession(this);
+ return si;
+ }
+ }
+ ScheduleItem item = new ScheduleItem(category, name);
+ item.setSession(this);
+ return item;
+ }
+
+ public void join(String category, String name, int count) throws Exception {
+ JoinState joinState=new JoinState(category, name, count);
+ joinState.setSession(this);
+ if (joinStates.contains(joinState)) {
+ throw new Exception("The '"+category+ "/"+name+"' of JoinState is already existed.");
+ }
+ joinStates.add(joinState);
+ SessionManager.saveObject(joinState);
+ logger.debug("Added Join State: " + joinState);
+ }
+
+ public void assimulateIdentities(java.util.List<Identity> ids) throws Exception {
+
+ List<Identity> newIds = new ArrayList<Identity>();
+
+ if (identities.size() == 0) {
+ newIds.addAll(ids);
+ } else {
+ for(int i =0; i< ids.size(); i++) {
+ Identity theID = ids.get(i);
+ if (theID.getType() == IdentityType.Primary ||
+ theID.getType() == IdentityType.Association) {
+ if (!identities.contains(theID)) {
+ newIds.add(theID);
+ } else {
+ logger.debug("IDENTITY CONFIRMED:" + theID);
+ }
+ } else {
+ newIds.add(theID);
+ }
+ }
+ }
+
+ List<Identity> result = new ArrayList<Identity>();
+ for(Identity id : newIds) {
+ id.setSession(this);
+ id.setServiceName(this.serviceName);
+ result.add(id);
+ }
+
+ SessionManager.saveCollection(result);
+ identities.addAll(result);
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public Session getParent() {
+ return parent;
+ }
+
+ public void setParent(Session parent) {
+ this.parent = parent;
+ }
+
+ public List<ScheduleItem> getScheduleItems() {
+ return scheduleItems;
+ }
+
+ public void setScheduleItems(List<ScheduleItem> scheduleItems) {
+ this.scheduleItems = scheduleItems;
+ }
+
+ public List<Identity> getIdentities() {
+ return identities;
+ }
+
+ public void setIdentities(List<Identity> identities) {
+ this.identities = identities;
+ }
+
+ public String getPojoClass() {
+ return pojoClass;
+ }
+
+ public void setPojoClass(String pojoClass) {
+ this.pojoClass = pojoClass;
+ }
+
+ public Object getBusinessObject() {
+ ByteArrayInputStream bais = new ByteArrayInputStream(serializedObject);
+ try {
+ ObjectInputStream in = new ObjectInputStream(bais);
+ businessObject = in.readObject();
+ in.close();
+ } catch (Exception e) {
+ throw new RuntimeException("Error in reading Object", e);
+ }
+ return businessObject;
+ }
+
+ public void setBusinessObject(Object businessObject) {
+ this.businessObject = businessObject;
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ObjectOutputStream out;
+
+ try {
+ out = new ObjectOutputStream(bos);
+ out.writeObject(this.businessObject);
+ out.close();
+ } catch (Exception e) {
+ throw new RuntimeException("Error in setting business object of " + businessObject, e);
+ }
+ this.serializedObject = bos.toByteArray();
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public String getConversationType() {
+ return conversationType;
+ }
+
+ public void setConversationType(String conversationType) {
+ this.conversationType = conversationType;
+ }
+
+ public List<EPRWrapper> getEprWrappers() {
+ return eprWrappers;
+ }
+
+ public void setEprWrappers(List<EPRWrapper> eprWrappers) {
+ this.eprWrappers = eprWrappers;
+ }
+
+ public List<JoinState> getJoinStates() {
+ return joinStates;
+ }
+
+ public void setJoinStates(List<JoinState> joinStates) {
+ this.joinStates = joinStates;
+ }
+
+ public byte[] getSerializedObject() {
+ return serializedObject;
+ }
+
+ public void setSerializedObject(byte[] serializedObject) {
+ this.serializedObject = serializedObject;
+ }
+
+ public Map<String, String> getProperties() {
+ return this.properties;
+ }
+
+ public void setProperties(Map<String, String> properties) {
+ this.properties = properties;
+ }
+
+ public String toString() {
+ StringBuffer sbuffer = new StringBuffer();
+ sbuffer.append("[ Session id: " + id);
+ sbuffer.append(" serviceName: " + serviceName);
+ sbuffer.append(" business state object: " + businessObject);
+ sbuffer.append("]");
+ return sbuffer.toString();
+ }
+
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/Session.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionManager.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.overlord.jbossesb.stateful.actions.MessageProperties;
+import org.jboss.soa.overlord.jbossesb.stateful.actions.Service;
+import org.jboss.soa.overlord.jbossesb.stateful.util.ClassLoaderUtil;
+import org.jboss.soa.overlord.jbossesb.stateful.util.HibernateUtil;
+import org.mvel.MVEL;
+
+/**
+ * This component is responsible for managing the persistence and retrieval
+ * of sessions.
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ * @author <a href="mailto:cyu@redhat.com">Jeff Yu</a>
+ */
+public class SessionManager {
+
+ private static Logger logger = Logger.getLogger(SessionManager.class);
+
+ public static Session createSession(String sessionName) throws Exception {
+
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ Class<?> pojoclass= ClassLoaderUtil.loadClass(sessionName);
+ Object businessState = pojoclass.newInstance();
+
+ Session conversationSession = new Session();
+ conversationSession.setPojoClass(sessionName);
+ conversationSession.setStatus(SessionStatus.Active);
+ conversationSession.setBusinessObject(businessState);
+
+ Service service = pojoclass.getAnnotation(Service.class);
+ if (service != null) {
+ conversationSession.setServiceName(service.name());
+ conversationSession.setConversationType(service.conversationType());
+ }
+
+ hibernateSession.save(conversationSession);
+
+ return conversationSession;
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Session createSubSession(String sessionName, String sessionKey, Message message) throws Exception {
+
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ Session parentSession = (Session)hibernateSession.load(Session.class, Long.valueOf(sessionKey));
+ Class<?> pojoclass= ClassLoaderUtil.loadClass(sessionName);
+ Object businessState = pojoclass.newInstance();
+
+ Map<String, Object> boundVariables = (Map<String, Object>)message.getProperties().
+ getProperty(MessageProperties.BOUND_VARIABLE_KEY);
+ for(String key : boundVariables.keySet()) {
+ MVEL.setProperty(businessState, key, boundVariables.get(key));
+ logger.debug("bound to " + key);
+ }
+
+ Session conversationSession = new Session();
+ conversationSession.setPojoClass(sessionName);
+ conversationSession.setStatus(SessionStatus.Active);
+ conversationSession.setBusinessObject(businessState);
+ conversationSession.setParent(parentSession);
+
+ Map<String, String> properties = (Map<String, String>)message.getProperties().
+ getProperty(MessageProperties.SESSION_PROPERTIES);
+ if (properties != null) {
+ conversationSession.setProperties(properties);
+ logger.debug("Inject properties of " + properties);
+ }
+
+ Service service = pojoclass.getAnnotation(Service.class);
+ if (service != null) {
+ conversationSession.setServiceName(service.name());
+ conversationSession.setConversationType(service.conversationType());
+ } else {
+ conversationSession.setServiceName(parentSession.getServiceName());
+ conversationSession.setConversationType(parentSession.getConversationType());
+ }
+
+ hibernateSession.save(conversationSession);
+
+ return conversationSession;
+ }
+
+ public static Session retrieveSession(String sessionKey, java.util.List<Identity> ids) throws Exception {
+
+ if (sessionKey == null && ids == null) {
+ return null;
+ }
+
+ if (sessionKey != null) {
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ Session session = (Session) hibernateSession.load(Session.class, Long.valueOf(sessionKey));
+ injectParentReference(session);
+ return session;
+ }
+
+ for (Identity id : ids) {
+ if (IdentityType.Primary.equals(id.getType())) {
+ return getSessionByIdentity(id);
+ }
+ }
+
+ return null;
+ }
+
+ public static Object saveObject(Object obj) throws Exception {
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ hibernateSession.save(obj);
+ return obj;
+ }
+
+
+ public static Object getObject(long id, Class<?> cls) throws Exception {
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ return hibernateSession.load(cls, id);
+ }
+
+ @SuppressWarnings("unchecked")
+ public static Collection saveCollection(Collection col) throws Exception {
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+
+ for(Iterator it = col.iterator(); it.hasNext();) {
+ Object o = it.next();
+ hibernateSession.save(o);
+ }
+
+ return col;
+ }
+
+ public static void updateObject(Object obj) {
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ hibernateSession.update(obj);
+ }
+
+ public static void removeObject(Object obj) {
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ hibernateSession.delete(obj);
+ }
+
+
+ public static Session getSessionByIdentity(Identity id) throws Exception{
+ org.hibernate.Session hibernateSession = HibernateUtil.currentSession();
+ String query = "select b from Identity b where b.type =:type and b.propertyValues =:propertyValues and b.serviceName =:serviceName";
+ List<?> results = hibernateSession.createQuery(query)
+ .setParameter("type", id.getType())
+ .setParameter("propertyValues", id.getPropertyValues())
+ .setParameter("serviceName", id.getServiceName())
+ .list();
+ if (results.size() < 1) {
+ return null;
+ }
+
+ Identity theID = null;
+ for (int i=0; i< results.size(); i++) {
+ Identity identity = (Identity)results.get(i);
+ if (SessionStatus.Active.equals(identity.getSession().getStatus())) {
+ theID = identity;
+ break;
+ }
+ }
+
+ if (theID == null) {
+ return null;
+ }
+
+ Session session = theID.getSession();
+ injectParentReference(session);
+
+ logger.debug("Get Session of " + session + " by using identity of " + id);
+
+ return session;
+ }
+
+ private static void injectParentReference(Session session) {
+ String parentProperty = session.getProperties().get(Session.PARENT_REFERENCE_KEY);
+ if (parentProperty!= null && session.getParent() != null) {
+ Object parentBizObj = session.getParent().getBusinessObject();
+ Object bizObj = session.getBusinessObject();
+ MVEL.setProperty(bizObj, parentProperty, parentBizObj);
+ session.setBusinessObject(bizObj);
+ }
+ }
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionManager.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionStatus.java (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/SessionStatus.java)
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionStatus.java (rev 0)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionStatus.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2008,
+ */
+package org.jboss.soa.overlord.jbossesb.stateful;
+
+
+/**
+ *
+ * @author <a href="mailto:gary.brown@hattricksoftware.com">Gary Brown</a>
+ */
+
+public enum SessionStatus {
+
+ Initialized,
+ Active,
+ Completed,
+ CLOSED
+}
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/SessionStatus.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions)
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ActionProperties.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/ActionProperties.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ActionProperties.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
/**
*
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ConversationAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/ConversationAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ConversationAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import java.util.HashMap;
import java.util.HashSet;
@@ -31,16 +31,16 @@
import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.Identity;
-import org.jboss.soa.overlord.jbossesb.IdentityType;
-import org.jboss.soa.overlord.jbossesb.ScheduleItem;
-import org.jboss.soa.overlord.jbossesb.Session;
-import org.jboss.soa.overlord.jbossesb.SessionManager;
-import org.jboss.soa.overlord.jbossesb.SessionStatus;
-import org.jboss.soa.overlord.jbossesb.util.ClassLoaderUtil;
-import org.jboss.soa.overlord.jbossesb.util.HibernateUtil;
-import org.jboss.soa.overlord.jbossesb.util.MessageUtil;
-import org.jboss.soa.overlord.jbossesb.util.XMLUtils;
+import org.jboss.soa.overlord.jbossesb.stateful.Identity;
+import org.jboss.soa.overlord.jbossesb.stateful.IdentityType;
+import org.jboss.soa.overlord.jbossesb.stateful.ScheduleItem;
+import org.jboss.soa.overlord.jbossesb.stateful.Session;
+import org.jboss.soa.overlord.jbossesb.stateful.SessionManager;
+import org.jboss.soa.overlord.jbossesb.stateful.SessionStatus;
+import org.jboss.soa.overlord.jbossesb.stateful.util.ClassLoaderUtil;
+import org.jboss.soa.overlord.jbossesb.stateful.util.HibernateUtil;
+import org.jboss.soa.overlord.jbossesb.stateful.util.MessageUtil;
+import org.jboss.soa.overlord.jbossesb.stateful.util.XMLUtils;
import org.mvel.MVEL;
/**
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/CreateSessionAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/CreateSessionAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/CreateSessionAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,13 +17,13 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.Session;
-import org.jboss.soa.overlord.jbossesb.SessionManager;
+import org.jboss.soa.overlord.jbossesb.stateful.Session;
+import org.jboss.soa.overlord.jbossesb.stateful.SessionManager;
/**
*
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/IfAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/IfAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/IfAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/MessageProperties.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/MessageProperties.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/MessageProperties.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
/**
* Define message constants.
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/MessageRouterAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/MessageRouterAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/MessageRouterAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import java.util.List;
@@ -26,9 +26,9 @@
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.Identity;
-import org.jboss.soa.overlord.jbossesb.IdentityType;
-import org.jboss.soa.overlord.jbossesb.ScheduleItem;
+import org.jboss.soa.overlord.jbossesb.stateful.Identity;
+import org.jboss.soa.overlord.jbossesb.stateful.IdentityType;
+import org.jboss.soa.overlord.jbossesb.stateful.ScheduleItem;
/**
* The action is used to perform routing of the inbound requests.
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ParallelAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/ParallelAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ParallelAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/PerformAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/PerformAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/PerformAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import java.util.HashMap;
import java.util.Map;
@@ -25,7 +25,7 @@
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.Session;
+import org.jboss.soa.overlord.jbossesb.stateful.Session;
import org.mvel.MVEL;
/**
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ReceiveMessageAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/ReceiveMessageAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ReceiveMessageAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,13 +17,13 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.Identity;
+import org.jboss.soa.overlord.jbossesb.stateful.Identity;
/**
* The ReceiveMessageAction is used to explicitly define the message type that should be received and a set of identities.
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/RetrieveSessionAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/RetrieveSessionAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/RetrieveSessionAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,14 +17,14 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import java.util.List;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.Identity;
+import org.jboss.soa.overlord.jbossesb.stateful.Identity;
/**
* It retrieves existing sessions instead of creating new sessions.
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ScheduleStateAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/ScheduleStateAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/ScheduleStateAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SendMessageAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/SendMessageAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SendMessageAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import java.util.List;
@@ -31,8 +31,8 @@
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
import org.jboss.soa.esb.message.format.MessageType;
-import org.jboss.soa.overlord.jbossesb.Identity;
-import org.jboss.soa.overlord.jbossesb.LogicalCourier;
+import org.jboss.soa.overlord.jbossesb.stateful.Identity;
+import org.jboss.soa.overlord.jbossesb.stateful.LogicalCourier;
import org.mvel.MVEL;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/Service.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/Service.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/Service.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
/**
*
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetMessageAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/SetMessageAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetMessageAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetStateAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/SetStateAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SetStateAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,12 +17,12 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.overlord.jbossesb.util.XMLUtils;
+import org.jboss.soa.overlord.jbossesb.stateful.util.XMLUtils;
import org.mvel.MVEL;
import org.w3c.dom.Element;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SwitchAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/SwitchAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/SwitchAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/WhenAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/WhenAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/WhenAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/WhileAction.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/actions/WhileAction.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/actions/WhileAction.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.actions;
+package org.jboss.soa.overlord.jbossesb.stateful.actions;
import org.apache.log4j.Logger;
import org.jboss.soa.esb.helpers.ConfigTree;
Copied: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util (from rev 522, cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/util)
Property changes on: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/ClassLoaderUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/util/ClassLoaderUtil.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/ClassLoaderUtil.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.util;
+package org.jboss.soa.overlord.jbossesb.stateful.util;
/**
*
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/HibernateUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/util/HibernateUtil.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/HibernateUtil.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.util;
+package org.jboss.soa.overlord.jbossesb.stateful.util;
import org.hibernate.HibernateException;
import org.hibernate.Session;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/MessageUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/util/MessageUtil.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/MessageUtil.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
* Change History:
* Mar 21, 2006 : Initial version created by gary
*/
-package org.jboss.soa.overlord.jbossesb.util;
+package org.jboss.soa.overlord.jbossesb.stateful.util;
import java.util.logging.Logger;
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/NameSpaceUtil.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/util/NameSpaceUtil.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/NameSpaceUtil.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
* Change History:
* Jul 28, 2005 : Initial version created by gary
*/
-package org.jboss.soa.overlord.jbossesb.util;
+package org.jboss.soa.overlord.jbossesb.stateful.util;
/**
* This class provides helper functiions for manipulating fully
Modified: cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtils.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/util/XMLUtils.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/main/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtils.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.util;
+package org.jboss.soa.overlord.jbossesb.stateful.util;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
Copied: cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util (from rev 522, cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/util)
Property changes on: cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/MVELUsageTest.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/util/MVELUsageTest.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/MVELUsageTest.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,7 +17,7 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.util;
+package org.jboss.soa.overlord.jbossesb.stateful.util;
import org.junit.Before;
import org.junit.Test;
Modified: cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtilsTest.java
===================================================================
--- cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/util/XMLUtilsTest.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb/src/test/java/org/jboss/soa/overlord/jbossesb/stateful/util/XMLUtilsTest.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -17,9 +17,10 @@
*
* (C) 2008,
*/
-package org.jboss.soa.overlord.jbossesb.util;
+package org.jboss.soa.overlord.jbossesb.stateful.util;
import org.w3c.dom.Element;
+import org.jboss.soa.overlord.jbossesb.stateful.util.XMLUtils;
import org.junit.Test;
import junit.framework.Assert;
Modified: cdl/trunk/runtime/jbossesb-assembly/src/main/resources/overlord-cdl-jbossesb.cfg.xml
===================================================================
--- cdl/trunk/runtime/jbossesb-assembly/src/main/resources/overlord-cdl-jbossesb.cfg.xml 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb-assembly/src/main/resources/overlord-cdl-jbossesb.cfg.xml 2009-02-26 08:08:52 UTC (rev 523)
@@ -54,11 +54,11 @@
<property name="format_sql">true</property>
<!-- List of annotationed classes (Internal conversation class)-->
- <mapping class="org.jboss.soa.overlord.jbossesb.Session" />
- <mapping class="org.jboss.soa.overlord.jbossesb.ScheduleItem"/>
- <mapping class="org.jboss.soa.overlord.jbossesb.JoinState"/>
- <mapping class="org.jboss.soa.overlord.jbossesb.Identity"/>
- <mapping class="org.jboss.soa.overlord.jbossesb.EPRWrapper"/>
+ <mapping class="org.jboss.soa.overlord.jbossesb.stateful.Session" />
+ <mapping class="org.jboss.soa.overlord.jbossesb.stateful.ScheduleItem"/>
+ <mapping class="org.jboss.soa.overlord.jbossesb.stateful.JoinState"/>
+ <mapping class="org.jboss.soa.overlord.jbossesb.stateful.Identity"/>
+ <mapping class="org.jboss.soa.overlord.jbossesb.stateful.EPRWrapper"/>
</session-factory>
</hibernate-configuration>
Modified: cdl/trunk/runtime/jbossesb-assembly/src/test/java/org/jboss/soa/overlord/jbossesb/HibernateTest.java
===================================================================
--- cdl/trunk/runtime/jbossesb-assembly/src/test/java/org/jboss/soa/overlord/jbossesb/HibernateTest.java 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/runtime/jbossesb-assembly/src/test/java/org/jboss/soa/overlord/jbossesb/HibernateTest.java 2009-02-26 08:08:52 UTC (rev 523)
@@ -21,7 +21,8 @@
import junit.framework.Assert;
-import org.jboss.soa.overlord.jbossesb.util.HibernateUtil;
+import org.jboss.soa.overlord.jbossesb.stateful.Session;
+import org.jboss.soa.overlord.jbossesb.stateful.util.HibernateUtil;
import org.junit.Ignore;
import org.junit.Test;
Modified: cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 08:08:52 UTC (rev 523)
@@ -72,7 +72,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.MessageRouterAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.MessageRouterAction"
process="process" name="s0-1">
<property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/loanBroker}Broker" />
<property name="paths">
@@ -110,11 +110,11 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.CreateSessionAction"
process="process" name="s1-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s1-2">
<property name="operation" value="makeEnquiry" />
<property name="messageType" value="enquiry" />
@@ -125,7 +125,7 @@
</identity>
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ScheduleStateAction"
process="process" name="s1-3">
<property name="serviceCategory" value="ESBBroker.BrokerParticipant" />
<property name="serviceName" value="ESBBrokerProcess.main.1" />
@@ -142,7 +142,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.WhileAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.WhileAction"
process="process" name="s2-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="paths">
@@ -165,7 +165,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.PerformAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.PerformAction"
process="process" name="s3-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="serviceCategory" value="ESBBroker.BrokerParticipant" />
@@ -188,7 +188,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.WhenAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.WhenAction"
process="process" name="s4-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="paths">
@@ -207,7 +207,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetMessageAction"
process="process" name="s4-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="headerProperty" value="quotes" />
@@ -217,7 +217,7 @@
process="process" name="s4-2">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="s4-3">
<property name="operation" value="makeEnquiry" />
<property name="messageType" value="quoteList" />
@@ -228,7 +228,7 @@
</identity>
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ScheduleStateAction"
process="process" name="s4-4">
<property name="serviceCategory" value="ESBBroker.BrokerParticipant" />
<property name="serviceName" value="ESBBrokerProcess.main.5" />
@@ -244,7 +244,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SwitchAction"
process="process" name="s5-2">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="paths">
@@ -268,7 +268,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s6-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="operation" value="cancel" />
@@ -289,16 +289,16 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetStateAction" name="s7-1">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetStateAction" name="s7-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="variable" value="selectedSupplierDesc" />
<property name="messageExpression" value="//@supplierDesc" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetStateAction" name="s7-2">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetStateAction" name="s7-2">
<property name="variable" value="selectedQuoteValue" />
<property name="messageExpression" value="//@quoteValue" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.PerformAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.PerformAction"
process="process" name="s7-3">
<property name="serviceCategory" value="ESBBroker.BrokerParticipant" />
<property name="serviceName" value="CompleteTransaction.main" />
@@ -319,7 +319,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s13-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="operation" value="confirm" />
@@ -340,12 +340,12 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetStateAction" name="s17-2">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetStateAction" name="s17-2">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.BrokerMain" />
<property name="variable" value="supplierIndex" />
<property name="stateExpression" value="nextSupplier()" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ScheduleStateAction"
process="process" name="s17-3">
<property name="serviceCategory" value="ESBBroker.BrokerParticipant" />
<property name="serviceName" value="ESBBrokerProcess.main.1" />
@@ -361,12 +361,12 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.CreateSessionAction"
process="process" name="s8-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.Request4QuoteMain" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetMessageAction" name="s8-2">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetMessageAction" name="s8-2">
<property name="headerProperty" value="serviceDescriptionName" />
<property name="stateExpression" value="supplier.serviceDescription" />
</action>
@@ -374,7 +374,7 @@
<action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetRequestQuoteMessageAction" name="s8-3">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="s8-4">
<property name="operation" value="getQuote" />
<property name="messageType" value="requestForQuote" />
@@ -399,7 +399,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s9-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.Request4QuoteMain" />
<property name="operation" value="getQuote" />
@@ -412,13 +412,13 @@
</identity>
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetStateAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetStateAction"
process="process" name="s9-2">
<property name="variable" value="quote.serviceDescription" />
<property name="messageExpression" value="//@supplierDesc" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetStateAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetStateAction"
process="process" name="s9-3">
<property name="variable" value="quoteValue" />
<property name="messageExpression" value="/quote" />
@@ -433,11 +433,11 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.CreateSessionAction"
process="process" name="s10-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.CompleteTransactionMain" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s10-2">
<property name="operation" value="buy" />
<property name="messageType" value="buy" />
@@ -451,7 +451,7 @@
<action class="org.jboss.soa.overlord.samples.jbossesb.loan.broker.SetCreditCheckRequestMessageAction"
process="process" name="s10-3">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="s10-4">
<property name="operation" value="checkCredit" />
<property name="messageType" value="CreditCheckRequest" />
@@ -475,7 +475,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.RetrieveSessionAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.RetrieveSessionAction"
process="process" name="s11-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.CompleteTransactionMain" />
<property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/loanBroker}CompleteTransaction" />
@@ -485,7 +485,7 @@
</identity>
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SwitchAction"
process="process" name="s11-2">
<property name="paths">
<case service-category="ESBBroker.BrokerParticipant"
@@ -508,7 +508,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s12-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.CompleteTransactionMain" />
<property name="operation" value="checkCredit" />
@@ -520,13 +520,13 @@
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetMessageAction"
process="process" name="s12-2">
<property name="headerProperty" value="supplierDesc" />
<property name="stateExpression" value="supplier.serviceDescription" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetMessageAction"
process="process" name="s12-3">
<property name="headerProperty" value="quoteValue" />
<property name="stateExpression" value="quote.value" />
@@ -536,7 +536,7 @@
process="process" name="s12-4">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="s12-5">
<property name="operation" value="confirm" />
<property name="messageType" value="orderConfirmed" />
@@ -560,7 +560,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s13-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.CompleteTransactionMain" />
<property name="operation" value="confirm" />
@@ -573,13 +573,13 @@
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SetStateAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SetStateAction"
process="process" name="s13-2">
<property name="variable" value="confirmation.detail" />
<property name="messageExpression" value="/bookingReference" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="s13-3">
<property name="operation" value="buy" />
<property name="messageType" value="bookingReference" />
@@ -600,7 +600,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="s14-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.loan.broker.CompleteTransactionMain" />
<property name="operation" value="checkCredit" />
@@ -616,7 +616,7 @@
process="process" name="s14-2">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="s14-3">
<property name="operation" value="buy" />
<property name="messageType" value="orderRejected" />
Modified: cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/samples/jbossesb/brokerage/supplier/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 08:08:52 UTC (rev 523)
@@ -27,7 +27,7 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.MessageRouterAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.MessageRouterAction"
process="process" name="su-1">
<property name="paths">
<route service-category="ESBBroker.Suppliers"
@@ -62,11 +62,11 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.CreateSessionAction"
process="process" name="su11-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.supplier.SupplierRFQMain" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="su11-2">
<property name="messageType" value="requestForQuote" />
<property name="clientEPR" value="broker" />
@@ -79,7 +79,7 @@
</action>
<action class="org.jboss.soa.overlord.samples.jbossesb.supplier.SetQuoteMessageAction" name="su11-3">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="su11-4">
<property name="messageType" value="quote" />
<property name="clientEPR" value="broker" />
@@ -100,11 +100,11 @@
maxThreads="1"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.CreateSessionAction"
process="process" name="su12-1">
<property name="session" value="org.jboss.soa.overlord.samples.jbossesb.supplier.SupplierTxnMain" />
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction"
process="process" name="su12-2">
<property name="messageType" value="orderConfirmed" />
<property name="clientEPR" value="broker" />
@@ -117,7 +117,7 @@
</action>
<action class="org.jboss.soa.overlord.samples.jbossesb.supplier.SetOrderConfirmResponseAction" name="su12-3">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction"
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction"
process="process" name="su12-4">
<property name="messageType" value="bookingReference" />
<property name="clientEPR" value="broker" />
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 08:08:52 UTC (rev 523)
@@ -18,10 +18,10 @@
<jms-listener busidref="CreditAgencyService" maxThreads="1" name="CreditAgencyServiceListener"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction" name="c1" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.CreateSessionAction" name="c1" process="process">
<property name="session" value="com.acme.services.creditAgency.CreditAgencyPurchase"/>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="c2" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction" name="c2" process="process">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckRequest"/>
<property name="clientEPR" value="broker"/>
@@ -31,7 +31,7 @@
</identity>
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.IfAction" name="c3" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.IfAction" name="c3" process="process">
<property name="paths">
<if expression="isCreditValid()" immediate="true" service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision1"/>
<else immediate="true" service-category="PurchaseGoods.CreditAgency" service-name="CreditAgency.decision2"/>
@@ -46,7 +46,7 @@
<actions mep="OneWay">
<action class="com.acme.services.creditAgency.SetCreditCheckResponseMessageAction" name="d2" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="d3" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction" name="d3" process="process">
<property name="session" value="com.acme.services.creditAgency.CreditAgencyPurchase"/>
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckOk"/>
@@ -66,7 +66,7 @@
<actions mep="OneWay">
<action class="com.acme.services.creditAgency.SetCreditCheckInvalidMessageAction" name="e2" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="e3" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction" name="e3" process="process">
<property name="session" value="com.acme.services.creditAgency.CreditAgencyPurchase"/>
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckInvalid"/>
Modified: cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 02:02:25 UTC (rev 522)
+++ cdl/trunk/samples/jbossesb/purchasing/store/src/main/resources/META-INF/jboss-esb.xml 2009-02-26 08:08:52 UTC (rev 523)
@@ -33,10 +33,10 @@
<jms-listener busidref="StoreService" maxThreads="1" name="StoreServiceListener"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.CreateSessionAction" name="a1" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.CreateSessionAction" name="a1" process="process">
<property name="session" value="com.acme.services.broker.PurchaseGoods"/>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="a2" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction" name="a2" process="process">
<property name="operation" value="buy"/>
<property name="messageType" value="BuyRequest"/>
<property name="clientEPR" value="client"/>
@@ -48,7 +48,7 @@
</action>
<action class="com.acme.services.broker.SetCreditCheckRequestMessageAction" name="a3" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="a4" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction" name="a4" process="process">
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckRequest"/>
<property name="serviceName" value="CreditAgency.main"/>
@@ -68,7 +68,7 @@
<jms-listener busidref="StoreService2" maxThreads="1" name="StoreServiceListener"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.RetrieveSessionAction" name="b1" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.RetrieveSessionAction" name="b1" process="process">
<property name="session" value="com.acme.services.broker.PurchaseGoods"/>
<property name="serviceDescriptionName" value="{http://www.jboss.org/overlord/purchase}Store"/>
<property name="identities">
@@ -77,7 +77,7 @@
</identity>
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SwitchAction" name="b2" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SwitchAction" name="b2" process="process">
<property name="paths">
<case service-category="PurchaseGoods.Store" service-name="CreditResponse1">
<message type="CreditCheckOk"/>
@@ -94,7 +94,7 @@
<jms-listener busidref="StoreService3" maxThreads="1" name="StoreServiceListener"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="b4" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction" name="b4" process="process">
<property name="session" value="com.acme.services.broker.PurchaseGoods"/>
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckOk"/>
@@ -105,7 +105,7 @@
</identity>
</property>
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.ParallelAction" name="b5" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ParallelAction" name="b5" process="process">
<property name="paths">
<path immediate="true" service-category="PurchaseGoods.Store" service-name="StoreBranch1"/>
<path immediate="true" service-category="PurchaseGoods.Store" service-name="StoreBranch2"/>
@@ -119,7 +119,7 @@
<jms-listener busidref="StoreService4" maxThreads="1" name="StoreServiceListener"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction" name="b7" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ScheduleStateAction" name="b7" process="process">
<property name="session" value="com.acme.services.broker.PurchaseGoods"/>
<property name="serviceName" value="ReturnBuyerResponse"/>
<property name="serviceCategory" value="PurchaseGoods.Store"/>
@@ -132,7 +132,7 @@
<jms-listener busidref="StoreService5" maxThreads="1" name="StoreServiceListener"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ScheduleStateAction" name="b9" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ScheduleStateAction" name="b9" process="process">
<property name="session" value="com.acme.services.broker.PurchaseGoods"/>
<property name="serviceName" value="ReturnBuyerResponse"/>
<property name="serviceCategory" value="PurchaseGoods.Store"/>
@@ -147,7 +147,7 @@
<actions mep="OneWay">
<action class="com.acme.services.broker.SetBuyResponseMessageAction" name="b11" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="b12" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction" name="b12" process="process">
<property name="session" value="com.acme.services.broker.PurchaseGoods"/>
<property name="operation" value="buy"/>
<property name="messageType" value="BuyConfirmed"/>
@@ -165,7 +165,7 @@
<jms-listener busidref="StoreService7" maxThreads="1" name="StoreServiceListener"/>
</listeners>
<actions mep="OneWay">
- <action class="org.jboss.soa.overlord.jbossesb.actions.ReceiveMessageAction" name="b14" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.ReceiveMessageAction" name="b14" process="process">
<property name="session" value="com.acme.services.broker.PurchaseGoods"/>
<property name="operation" value="checkCredit"/>
<property name="messageType" value="CreditCheckInvalid"/>
@@ -178,7 +178,7 @@
</action>
<action class="com.acme.services.broker.SetBuyFailedMessageAction" name="b15" process="process">
</action>
- <action class="org.jboss.soa.overlord.jbossesb.actions.SendMessageAction" name="b16" process="process">
+ <action class="org.jboss.soa.overlord.jbossesb.stateful.actions.SendMessageAction" name="b16" process="process">
<property name="operation" value="buy"/>
<property name="messageType" value="BuyFailed"/>
<property name="clientEPR" value="client"/>
15 years, 1 month
Overlord SVN: r522 - in cdl/trunk: distribution and 10 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-02-25 21:02:25 -0500 (Wed, 25 Feb 2009)
New Revision: 522
Added:
cdl/trunk/distribution/libraries/rosetta-4.5.jar
Removed:
cdl/trunk/distribution/libraries/config-model-1.0.1.jar
cdl/trunk/distribution/libraries/rosetta-4.3.jar
Modified:
cdl/trunk/distribution/libraries/dependencies.xml
cdl/trunk/distribution/pom.xml
cdl/trunk/distribution/src/main/assembly/bin.xml
cdl/trunk/install.xml
cdl/trunk/pom.xml
cdl/trunk/runtime/jbossesb-assembly/pom.xml
cdl/trunk/runtime/jbossesb/pom.xml
cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml
cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml
cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml
cdl/trunk/samples/jbossesb/purchasing/store/pom.xml
cdl/trunk/validator/jbossesb-assembly/pom.xml
cdl/trunk/validator/jbossesb/pom.xml
Log:
[SOAG-90] upgrade the rosetta version
* remove the confi-model jar dependency, as we don't need it at present.
* move some libraries version in the parent pom, so that won't change a lot in the future.
Deleted: cdl/trunk/distribution/libraries/config-model-1.0.1.jar
===================================================================
(Binary files differ)
Modified: cdl/trunk/distribution/libraries/dependencies.xml
===================================================================
--- cdl/trunk/distribution/libraries/dependencies.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/distribution/libraries/dependencies.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -2,16 +2,10 @@
<dependency>
<groupId>org.jboss.jbossesb</groupId>
<artifactId>rosetta</artifactId>
- <version>4.3</version>
+ <version>4.5</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.jbossesb</groupId>
- <artifactId>config-model</artifactId>
- <version>1.0.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.pi4soa</groupId>
<artifactId>common</artifactId>
<version>2.0</version>
Deleted: cdl/trunk/distribution/libraries/rosetta-4.3.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/libraries/rosetta-4.5.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/libraries/rosetta-4.5.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: cdl/trunk/distribution/pom.xml
===================================================================
--- cdl/trunk/distribution/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/distribution/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -34,7 +34,7 @@
<dependencies>
<dependency>
<groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-jbossesb</artifactId>
+ <artifactId>cdl-runtime-jbossesb</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
Modified: cdl/trunk/distribution/src/main/assembly/bin.xml
===================================================================
--- cdl/trunk/distribution/src/main/assembly/bin.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/distribution/src/main/assembly/bin.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -113,9 +113,8 @@
<dependencySet>
<outputDirectory>samples/libs</outputDirectory>
<includes>
- <include>org.jboss.soa.overlord.cdl.runtime:cdl-jbossesb</include>
+ <include>org.jboss.soa.overlord.cdl.runtime:cdl-runtime-jbossesb</include>
<include>org.jboss.jbossesb:rosetta</include>
- <include>org.jboss.jbossesb:config-model</include>
<include>log4j:log4j</include>
</includes>
</dependencySet>
@@ -131,7 +130,7 @@
<outputDirectory>samples/brokerage/broker/lib</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<includes>
- <include>org.jboss.soa.overlord.cdl.runtime:cdl-jbossesb</include>
+ <include>org.jboss.soa.overlord.cdl.runtime:cdl-runtime-jbossesb</include>
<include>org.jboss.jbossesb:rosetta</include>
<include>log4j:log4j</include>
</includes>
@@ -140,7 +139,7 @@
<outputDirectory>samples/brokerage/supplier/lib</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<includes>
- <include>org.jboss.soa.overlord.cdl.runtime:cdl-jbossesb</include>
+ <include>org.jboss.soa.overlord.cdl.runtime:cdl-runtime-jbossesb</include>
<include>org.jboss.jbossesb:rosetta</include>
<include>log4j:log4j</include>
</includes>
@@ -149,7 +148,7 @@
<outputDirectory>samples/purchasing/store/lib</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<includes>
- <include>org.jboss.soa.overlord.cdl.runtime:cdl-jbossesb</include>
+ <include>org.jboss.soa.overlord.cdl.runtime:cdl-runtime-jbossesb</include>
<include>org.jboss.jbossesb:rosetta</include>
<include>log4j:log4j</include>
</includes>
@@ -158,7 +157,7 @@
<outputDirectory>samples/common/creditAgency/lib</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<includes>
- <include>org.jboss.soa.overlord.cdl.runtime:cdl-jbossesb</include>
+ <include>org.jboss.soa.overlord.cdl.runtime:cdl-runtime-jbossesb</include>
<include>org.jboss.jbossesb:rosetta</include>
<include>log4j:log4j</include>
</includes>
Modified: cdl/trunk/install.xml
===================================================================
--- cdl/trunk/install.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/install.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -16,7 +16,7 @@
<target name="install" depends="init">
<echo message="Install the libraries into the local maven repo" />
<exec executable="${shell}">
- <arg line="-c 'mvn install:install-file -DgroupId=org.jboss.jbossesb -DartifactId=rosetta -Dversion=4.3 -Dpackaging=jar -Dfile=${libraries.dir}/rosetta-4.3.jar'" />
+ <arg line="-c 'mvn install:install-file -DgroupId=org.jboss.jbossesb -DartifactId=rosetta -Dversion=4.5 -Dpackaging=jar -Dfile=${libraries.dir}/rosetta-4.5.jar'" />
</exec>
<exec executable="${shell}">
<arg line="-c 'mvn install:install-file -DgroupId=org.jboss.jbossesb -DartifactId=config-model -Dversion=1.0.1 -Dpackaging=jar -Dfile=${libraries.dir}/config-model-1.0.1.jar'" />
Modified: cdl/trunk/pom.xml
===================================================================
--- cdl/trunk/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -45,6 +45,9 @@
<properties>
<overlord-version>1.0-SNAPSHOT</overlord-version>
+ <junit.version>4.4</junit.version>
+ <rosetta.version>4.5</rosetta.version>
+ <log4j.version>1.2.14</log4j.version>
</properties>
<profiles>
Modified: cdl/trunk/runtime/jbossesb/pom.xml
===================================================================
--- cdl/trunk/runtime/jbossesb/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/runtime/jbossesb/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -24,19 +24,14 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
+ <version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossesb</groupId>
<artifactId>rosetta</artifactId>
- <version>4.3</version>
+ <version>${rosetta.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.jbossesb</groupId>
- <artifactId>config-model</artifactId>
- <version>1.0.1</version>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate-version}</version>
@@ -64,7 +59,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: cdl/trunk/runtime/jbossesb-assembly/pom.xml
===================================================================
--- cdl/trunk/runtime/jbossesb-assembly/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/runtime/jbossesb-assembly/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -49,7 +49,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>${junit.version}</version>
<scope>test</scope>
</dependency>
Modified: cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/samples/jbossesb/brokerage/broker/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -19,12 +19,12 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
+ <version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-jbossesb</artifactId>
+ <artifactId>cdl-runtime-jbossesb</artifactId>
<version>${cdl.jbossesb.version}</version>
<scope>provided</scope>
</dependency>
Modified: cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/samples/jbossesb/brokerage/supplier/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -19,12 +19,12 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
+ <version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-jbossesb</artifactId>
+ <artifactId>cdl-runtime-jbossesb</artifactId>
<version>${cdl.jbossesb.version}</version>
<scope>provided</scope>
</dependency>
Modified: cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/samples/jbossesb/common/creditAgency/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -19,12 +19,12 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
+ <version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-jbossesb</artifactId>
+ <artifactId>cdl-runtime-jbossesb</artifactId>
<version>${cdl.jbossesb.version}</version>
<scope>provided</scope>
</dependency>
Modified: cdl/trunk/samples/jbossesb/purchasing/store/pom.xml
===================================================================
--- cdl/trunk/samples/jbossesb/purchasing/store/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/samples/jbossesb/purchasing/store/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -19,12 +19,12 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
+ <version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.soa.overlord.cdl.runtime</groupId>
- <artifactId>cdl-jbossesb</artifactId>
+ <artifactId>cdl-runtime-jbossesb</artifactId>
<version>${cdl.jbossesb.version}</version>
<scope>provided</scope>
</dependency>
Modified: cdl/trunk/validator/jbossesb/pom.xml
===================================================================
--- cdl/trunk/validator/jbossesb/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/validator/jbossesb/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -18,57 +18,51 @@
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
- <version>1.2.14</version>
+ <version>${log4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.jbossesb</groupId>
<artifactId>rosetta</artifactId>
- <version>4.3</version>
+ <version>${rosetta.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.jbossesb</groupId>
- <artifactId>config-model</artifactId>
- <version>1.0.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.pi4soa</groupId>
- <artifactId>common</artifactId>
- <version>2.0</version>
+ <groupId>org.pi4soa</groupId>
+ <artifactId>common</artifactId>
+ <version>2.0</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.pi4soa</groupId>
- <artifactId>cdl</artifactId>
- <version>2.0</version>
+ <groupId>org.pi4soa</groupId>
+ <artifactId>cdl</artifactId>
+ <version>2.0</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.pi4soa</groupId>
- <artifactId>service</artifactId>
- <version>2.0</version>
+ <groupId>org.pi4soa</groupId>
+ <artifactId>service</artifactId>
+ <version>2.0</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>common</artifactId>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>common</artifactId>
<version>2.3.0</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>ecore</artifactId>
+ <groupId>org.eclipse.emf</groupId>
+ <artifactId>ecore</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
</dependencies>
<build>
Modified: cdl/trunk/validator/jbossesb-assembly/pom.xml
===================================================================
--- cdl/trunk/validator/jbossesb-assembly/pom.xml 2009-02-25 14:20:10 UTC (rev 521)
+++ cdl/trunk/validator/jbossesb-assembly/pom.xml 2009-02-26 02:02:25 UTC (rev 522)
@@ -24,7 +24,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>${junit.version}</version>
<scope>test</scope>
</dependency>
15 years, 1 month
Overlord SVN: r521 - in cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src: java/org/jboss/tools/overlord/cdl/bpel/util and 3 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-02-25 09:20:10 -0500 (Wed, 25 Feb 2009)
New Revision: 521
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/results/PurchaseGoodsProcess(a)Broker.bpel
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/PurchaseGoodsProcess(a)Broker.scv
Modified:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/generator/Generator.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/ESBBrokerProcess(a)Broker.scv
Log:
* Add the PurchaseGoodsProcess case.
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/generator/Generator.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/generator/Generator.java 2009-02-19 15:59:56 UTC (rev 520)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/generator/Generator.java 2009-02-25 14:20:10 UTC (rev 521)
@@ -28,6 +28,7 @@
import org.eclipse.core.resources.IFile;
import org.jboss.tools.overlord.cdl.bpel.generator.BuildSystem;
import org.jboss.tools.overlord.cdl.bpel.model.*;
+import org.jboss.tools.overlord.cdl.bpel.util.XMLUtils;
import org.scribble.conversation.model.*;
import org.scribble.extensions.RegistryFactory;
import org.scribble.model.*;
@@ -181,7 +182,7 @@
bpelFile.create(null, true,
new org.eclipse.core.runtime.NullProgressMonitor());
- String bpelText=getText(bpel);
+ String bpelText=XMLUtils.toText(bpel);
if (bpelText != null) {
bpelFile.setContents(new java.io.ByteArrayInputStream(
@@ -202,140 +203,6 @@
return(project);
}
-
- /**
- * This class converts a DOM representation node to
- * text.
- *
- * @param node The DOM node
- * @return The text
- * @throws Exception Failed to convert
- */
- protected String getText(Node node) throws Exception {
- String ret=null;
-
- try {
- // Transform the DOM represent to text
- java.io.ByteArrayOutputStream xmlstr=
- new java.io.ByteArrayOutputStream();
-
- DOMSource source=new DOMSource();
- source.setNode(node);
-
- StreamResult result=new StreamResult(xmlstr);
-
- Transformer trans=
- TransformerFactory.newInstance().newTransformer();
- trans.transform(source, result);
-
- xmlstr.close();
-
- ret = new String(xmlstr.toByteArray());
-
- if ((node instanceof org.w3c.dom.Document) == false) {
-
- // Strip off any <?xml> header
- int index=ret.indexOf("<?xml");
- if (index != -1) {
- index = ret.indexOf("<", 1);
-
- if (index != -1) {
- ret = ret.substring(index);
- } else {
- index = ret.indexOf("?>");
-
- if (index != -1) {
- index += 2;
-
- // Remove any trailing whitespaces
- // after XML header
- while (index < ret.length() &&
- Character.isWhitespace(ret.charAt(index))) {
- index++;
- }
-
- ret = ret.substring(index);
- }
- }
- }
- }
-
- } catch(Exception e) {
- throw new Exception("Failed to transform " +
- "DOM representation into text", e);
- }
-
- int pos=0;
- int prevpos=0;
- StringBuffer buf=new StringBuffer();
- int level=0;
-
- while ((pos=ret.indexOf('<', prevpos)) != -1) {
-
- if (prevpos < pos &&
- ret.substring(prevpos, pos).trim().length() > 0 &&
- ret.charAt(prevpos-1) != '?') {
-
- if (ret.charAt(prevpos) == '\r' &&
- ret.charAt(prevpos+1) == '\n') {
- prevpos += 2;
- }
- for (int i=0; i < level; i++) {
- buf.append(" ");
- }
-
- buf.append(ret.substring(prevpos, pos).trim());
- buf.append("\r\n");
- }
-
- int endpos=ret.indexOf('>', pos);
-
- if (endpos > 0) {
- boolean noreturn=false;
-
- if (pos > 0 && ret.charAt(pos+1) == '/') {
- level--;
- }
-
- for (int i=0; i < level; i++) {
- buf.append(" ");
- }
- buf.append(ret.substring(pos, endpos+1));
-
- if (ret.charAt(endpos-1)== '?') {
- //noreturn = true;
-
- } else if (ret.charAt(endpos-1) == '/') {
- // Ignore
- } else if (pos > 0 && ret.charAt(pos+1) == '/') {
- // Ignore
-
- } else if (pos > 0 && ret.charAt(pos+1) == '!') {
- // Ignore
-
- } else {
- level++;
- }
-
- if (noreturn == false) {
- buf.append("\r\n");
- }
-
- pos = endpos+1;
- }
-
- prevpos = pos;
- }
-
- if (prevpos != -1 &&
- ret.substring(prevpos).trim().length() > 0) {
- buf.append(ret.substring(prevpos));
- }
-
- ret = buf.toString();
-
- return(ret);
- }
public BuildSystem getBuildSystem() {
return(m_buildSystem);
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java 2009-02-19 15:59:56 UTC (rev 520)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java 2009-02-25 14:20:10 UTC (rev 521)
@@ -169,7 +169,7 @@
}
public static void main(String[] args) throws Exception {
- String raw = "<?xml ?><books><book>The World is Flat</book></books>";
+ String raw = "<books><book>The World is Flat</book></books>";
String pretty = format(raw);
System.out.println(pretty);
}
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java 2009-02-19 15:59:56 UTC (rev 520)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java 2009-02-25 14:20:10 UTC (rev 521)
@@ -34,6 +34,7 @@
public static TestSuite suite() {
TestSuite suite = new TestSuite("Conversation->BPEL Generator Tests");
suite.addTest(new ConversationToBPELTest("ESBBrokerProcess@Broker"));
+ suite.addTest(new ConversationToBPELTest("PurchaseGoodsProcess@Broker"));
return suite;
}
Added: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/results/PurchaseGoodsProcess(a)Broker.bpel
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/results/PurchaseGoodsProcess(a)Broker.bpel (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/results/PurchaseGoodsProcess(a)Broker.bpel 2009-02-25 14:20:10 UTC (rev 521)
@@ -0,0 +1,18 @@
+<process>
+ <sequence>
+ <invoke operation="buy"/>
+ <invoke operation="checkCredit"/>
+ <if>
+ <sequence>
+ <reply operation="checkCredit"/>
+ <reply operation="buy"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply operation="checkCredit"/>
+ <reply operation="buy"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
\ No newline at end of file
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/ESBBrokerProcess(a)Broker.scv
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/ESBBrokerProcess(a)Broker.scv 2009-02-19 15:59:56 UTC (rev 520)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/ESBBrokerProcess(a)Broker.scv 2009-02-25 14:20:10 UTC (rev 521)
@@ -37,7 +37,7 @@
}
}
- conversation RequestForQuote@Broker {
+ conversation RequestForQuote@Broker {
role SupplierQuoteEngine;
getQuote(requestForQuote) to SupplierQuoteEngine request "getQuote";
Added: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/PurchaseGoodsProcess(a)Broker.scv
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/PurchaseGoodsProcess(a)Broker.scv (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/testmodels/PurchaseGoodsProcess(a)Broker.scv 2009-02-25 14:20:10 UTC (rev 521)
@@ -0,0 +1,15 @@
+namespace org.pi4soa.purchase.purchasegoods;
+
+conversation PurchaseGoodsProcess@Broker conforms to Purchasing@Buyer, Purchasing@Store, Common@CreditAgency {
+ role Buyer, Store, CreditAgency;
+ BuyRequest buy;
+ buy(BuyRequest) from Buyer to Store request "buy";
+ checkCredit(CreditCheckRequest) from Store to CreditAgency request "checkCredit";
+ if @ CreditAgency {
+ checkCredit(CreditCheckOk) from CreditAgency to Store replyTo "checkCredit";
+ buy(BuyConfirmed) from Store to Buyer replyTo "buy";
+ } else if {
+ checkCredit(CreditCheckInvalid) from CreditAgency to Store replyTo "checkCredit";
+ buy(BuyFailed) from Store to Buyer replyTo "buy";
+ }
+}
\ No newline at end of file
15 years, 1 month
Overlord SVN: r520 - in cdl/trunk/docs/docbook/userguide/src/main: module and 1 other directory.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2009-02-19 10:59:56 -0500 (Thu, 19 Feb 2009)
New Revision: 520
Added:
cdl/trunk/docs/docbook/userguide/src/main/images/SVJBossESBAnnotation.jpg
Removed:
cdl/trunk/docs/docbook/userguide/src/main/images/editvalidatorannparams.png
Modified:
cdl/trunk/docs/docbook/userguide/src/main/module/conversation-validation-with-cdl.xml
Log:
Updated user guide with the new approach to configuring the service validators in JBossESB.
Added: cdl/trunk/docs/docbook/userguide/src/main/images/SVJBossESBAnnotation.jpg
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/docs/docbook/userguide/src/main/images/SVJBossESBAnnotation.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/docs/docbook/userguide/src/main/images/editvalidatorannparams.png
===================================================================
(Binary files differ)
Modified: cdl/trunk/docs/docbook/userguide/src/main/module/conversation-validation-with-cdl.xml
===================================================================
--- cdl/trunk/docs/docbook/userguide/src/main/module/conversation-validation-with-cdl.xml 2009-02-19 13:52:57 UTC (rev 519)
+++ cdl/trunk/docs/docbook/userguide/src/main/module/conversation-validation-with-cdl.xml 2009-02-19 15:59:56 UTC (rev 520)
@@ -5,8 +5,8 @@
<title>Conversation Validation with CDL</title>
<section>
<title>Overview</title>
- <para>
- Conversation validation is a form of runtime governance concerned with the dynamic behaviour of a system.
+ <para>
+Conversation validation is a form of runtime governance concerned with the dynamic behaviour of a system.
</para>
<para>
When coupled with a choreography description model of a system, this means having the ability to ensure that the way a collection of services interact correctly adheres to a description of the business process being enacted.
@@ -21,8 +21,15 @@
<section>
<title>Configuration of Conversation Validation</title>
+ <para>
+ This section explains how to configure the conversation validation mechanism to validate ESB services
+ against a choreography description. The first sub-section describes how the mechanism is hooked into the
+ JBossESB environment. The following two sub-sections explain two alternate ways that relevant endpoint
+ references can be configured for validation.
+ </para>
+
<section>
- <title>Central Configuration</title>
+ <title>Installing the Conversation Validation Mechanism</title>
<para>
The principle mechanism used for validating conversations within an ESB is through the use of a global filter registered with the <emphasis>jbossesb-properties.xml</emphasis>. This file is located in the <emphasis>$JBossESB/server/default/deploy/jbossesb.sar</emphasis> folder.
</para>
@@ -31,7 +38,7 @@
<properties name="filters">
...
<property name="org.jboss.soa.esb.filter.10"
- value="org.pi4soa.jbossesb.validator.ValidatorFilter"/>
+ value="org.jboss.soa.overlord.validator.jbossesb.ValidatorFilter"/>
</properties>
]]></programlisting>
</informalexample>
@@ -39,17 +46,23 @@
<para>
This filter is installed as part of the installation process for the Overlord-CDL distribution.
</para>
+ </section>
+
+ <section>
+ <title>Explicit Configuration</title>
+
<para>
-The information concerning what destinations will be validated, and to which choreography/participant they relate, are contained within the <emphasis>validator-config.xml</emphasis> file, contained within the <emphasis>overlord-cdl-validator.esb</emphasis> bundle.
+The information concerning which destinations will be validated, and to which model/role they relate, can be explicitly
+defined within the <emphasis>validator-config.xml</emphasis> file, contained within the <emphasis>overlord-cdl-validator.esb</emphasis> bundle.
</para>
<para>
-An example of the contents of this file, as used by the TrailBlazer example, is:
+An example of the contents of this file, that would related to the TrailBlazer example, is:
</para>
<informalexample>
<programlisting role="XML" ><![CDATA[
- <validator active="true" >
- <service cdmFilePath="models/TrailBlazer.cdm"
- participantType="LoanBrokerParticipant" >
+ <validator mode="monitor" replyToTimeout="10000" >
+ <service model="TrailBlazer.cdm"
+ role="LoanBrokerParticipant" >
<output epr="jms:queue/esb-tb-creditAgencyQueue" />
<input epr="jms:queue/esb-tb-creditAgencyQueue_reply" />
<output epr="jms:queue/esb-tb-jmsBankRequestQueue" />
@@ -58,20 +71,20 @@
<output epr="jms:queue/esb-tb-customerNotifier" />
<input epr="jms:queue/esb-tb-fileBankResponseQueue" />
</service>
- <service cdmFilePath="models/TrailBlazer.cdm"
- participantType="CreditAgencyParticipant" >
+ <service model="TrailBlazer.cdm"
+ role="CreditAgencyParticipant" >
<input epr="jms:queue/esb-tb-creditAgencyQueue" />
<output epr="jms:queue/esb-tb-creditAgencyQueue_reply" />
</service>
- <service cdmFilePath="models/TrailBlazer.cdm"
- participantType="BankParticipant" >
+ <service model="TrailBlazer.cdm"
+ role="BankParticipant" >
<input epr="jms:queue/esb-tb-jmsBankRequestQueue" />
<input epr="jms:queue/esb-tb-fileBankRequestQueue" />
<output epr="jms:queue/esb-tb-jmsBankResponseQueue" />
<output epr="jms:queue/esb-tb-fileBankResponseQueue" />
</service>
- <service cdmFilePath="models/TrailBlazer.cdm"
- participantType="NotifierParticipant" >
+ <service model="TrailBlazer.cdm"
+ role="NotifierParticipant" >
<input epr="jms:queue/esb-tb-customerNotifier" />
</service>
</validator>
@@ -79,59 +92,36 @@
</informalexample>
<para>
-The 'validator' element has a single boolean attribute called 'active', which determines whether active or passive validation is used. Active validation means that any erronous messages, that conflict with the behaviour as described in the choreography, should be prevented from being received or sent. Passive validation means that the message will continue to be received or sent, and errors will only be reported for information purposes.
+The 'validator' element has an optional boolean attribute called 'mode', with the possible values of 'monitor' or 'manage'. If the
+mode is 'monitor' (which is the default), then any messages that result in validation errors being detected will continue to be received or sent, with the errors only be reported for information purposes. If the mode is 'manage', then any erronous messages detected during validation, that conflict with the behaviour as described in the choreography, will be prevented from being received or sent.
</para>
<note>
<para>
- It is important to note that if 'active' validation is used, then the validation mechanism will be an integral part of the message flow. This may have a slight performance impact on the delivery of messages between services.
+ It is important to note that if 'manage' validation mode is used, then the validation mechanism will be an integral part of the message flow. This may have a slight performance impact on the delivery of messages between services.
</para>
</note>
+
<para>
-Within the 'validator' element is a list of 'service' elements, one per service being validated. The behaviour of the service being validated is identified by specifying the choreography model and the participant type within the choreography model. Therefore, within the above configuration, the first set of destinations (eprs) are associated with the <emphasis>LoanBrokerParticipant</emphasis> defined within the choreography description model found in the file <filename>model/TrailBlazer.cdm</filename>, which will be located within the <emphasis>overlord-cdl-validator.esb</emphasis> bundle.
+The optional 'replyToTimeout' (defined in milliseconds) is used to determine how long a dynamic reply-to destination should be monitored for validation purposes. In some message exchanges, the response destination will not always be known in advance. Therefore the configuration can identify such situations, and monitor the reply-to destination for the response. However, if a response is not delivered in a particular time period, we need to be able to discontinue the validation of the dynamic endpoint. If this did not occur, then over time too many endpoints would be monitored, which may result in out-of-memory problems. The default timeout period is 10 seconds.
</para>
<para>
+Within the 'validator' element is a list of 'service' elements, one per service being validated. The behaviour of the service being validated is identified by specifying the model (e.g. choreography description file) and the role (e.g. participant type) within the model. Therefore, within the above configuration, the first set of destinations (eprs) are associated with the <emphasis>LoanBrokerParticipant</emphasis> defined within the choreography description model found in the file <filename>models/TrailBlazer.cdm</filename>, which will be located within the <emphasis>overlord-cdl-validator.esb</emphasis> bundle.
+ </para>
+ <para>
The elements contained within the 'service' element define the <emphasis>input</emphasis> and <emphasis>output</emphasis> eprs (Endpoint References) that are associated with the service. The <emphasis>input</emphasis> eprs are the destinations on which messages will be received and the <emphasis>output</emphasis> eprs are the destinations on which messages will be sent by the service.
</para>
<para>
The format of the 'epr' attribute will be specific to the type of transport used for the ESB aware destination. Currently only JMS is supported, and can be identified by the protocol prefix 'jms:'.
</para>
+ <para>
+Each 'input' and 'output' element can also define an optional 'dynamicReplyTo' boolean attribute. If defined, it will indicate to the Service Validator that the message on the specified endpoint (epr) will contain a dynamically defined 'reply-to' destination that needs to be monitored for a response.
+ </para>
</section>
<section>
- <title>Local Configuration using <emphasis>ValidationAction</emphasis></title>
- <para>
-Although it is preferrable to validate an .esb bundle using the central configuration, there are times when it is not possible to know the specific destination used to send a message to or from a service. In these situations, it will be necessary to explicitly insert an action into a service descriptor's action pipeline, to observe the message.
- </para>
- <para>
-This can be achieved using the <emphasis>org.pi4soa.jbossesb.validator.ValidationAction</emphasis>, which can be configured with the following properties:
- </para>
+ <title>Defining the Validator Configuration within a Choreography</title>
- <informalexample>
- <programlisting role="XML" ><![CDATA[
- <action name="LoanBrokerValidatorAction1"
- class="org.pi4soa.jbossesb.validator.ValidationAction"
- process="processMessage" >
- <property name="cdmFilePath" value="models/TrailBlazer.cdm" />
- <property name="participantType" value="LoanBrokerParticipant" />
- <property name="inbound" value="true" />
- <property name="request" value="true" />
- </action>
- ]]></programlisting>
- </informalexample>
-
- <para>
-The <emphasis>cdmFilePath</emphasis> references the choreography description model, which will usually be a relative path within the <emphasis>overlord-cdl-validator.esb</emphasis> bundle. The <emphasis>participantType</emphasis> property defines which participant the validator action is representing. The optional <emphasis>inbound</emphasis> property indicates whether the message on the action pipeline is being received (true) or sent (false). The optional <emphasis>request</emphasis> property can be used to determine whether the message on the action pipeline represents a request (true) or response/notification (false).
- </para>
- </section>
- </section>
-
- <section>
- <title>Generating the Validator Configuration from a Choreography</title>
-
- <section>
- <title>Defining the ESB Service endpoints</title>
-
<para>
The first step to configuring the validator is to associate the endpoint references (EPRs)
against the relevant choreography interactions. This is achieved by defining an
@@ -169,14 +159,14 @@
</para>
<imageobject>
- <imagedata fileref="images/editvalidatorannparams.png" width="5in" />
+ <imagedata fileref="images/SVJBossESBAnnotation.jpg" width="5in" />
</imageobject>
<para>
To specify the EPR for a particular message exchange, enter the EPR into the
- <emphasis>Destination</emphasis> field. If however a temporary destination is
- used for a message exchange (usually when dealing with responses), then the
- <emphasis>temporary</emphasis> checkbox should be selected.
+ <emphasis>Destination</emphasis> field. If the exchange is a request, that
+ will result in a response being sent on a dynamically provided "reply-to"
+ destination, then the <emphasis>Dynamic Reply-To</emphasis> checkbox should be selected.
</para>
<para>
@@ -184,53 +174,16 @@
button to save the annotation against the interaction's exchange details.
</para>
- </section>
-
- <section>
- <title>Generating the <emphasis>validator-config.xml</emphasis></title>
-
<para>
- To generate the validator configuration details from a choreography description
- into the format used by the central configuration mechanism (described previously),
- select the <emphasis>Overlord->JBossESB->Generate Validator</emphasis> menu item
- associated with the popup menu for the choreography description.
+ When all of the relevant 'exchange details' components have been configured with
+ a <emphasis>jbossesb</emphasis> annotation, defining the EPR to be validated,
+ then the choreography description file can be copied into the
+ <filename>overlord-cdl-validator.esb/models</filename> folder. This will cause
+ the validation mechanism to derive the configuration information from the choreography
+ description model, and begin validating the defined destinations against that
+ choreography description model.
</para>
- <imageobject>
- <imagedata fileref="images/genvalidatormenu.png" width="5in" />
- </imageobject>
-
- <para>
- When the dialog box is displayed, either enter the path to the <filename>validator-config.xml</filename>
- in the text field, or use the <emphasis>Browse</emphasis> button to locate the file.
- </para>
-
- <imageobject>
- <imagedata fileref="images/genvalidatordialog.png" width="5in" />
- </imageobject>
-
- <para>
- If the selected file does not exist, then when the <emphasis>Ok</emphasis> button is pressed,
- it will be created with the validator configuration associated with the choreography
- description.
- </para>
-
- <para>
- If the selected file already exists, then any 'service' entries associated with the
- choreography file will be updated with the new information from the choreography
- description. All other entries in the selected validator configuration file will be
- retained.
- </para>
-
- <note>
- <para>
- If the <emphasis>validator-config.xml</emphasis> file within the JBoss server environment
- is directly updated, then the server will need to be restarted before the new configuration
- will take effect. Tools to support hot reconfiguration of this file will be provided
- in the future.
- </para>
- </note>
-
</section>
</section>
@@ -307,8 +260,8 @@
</para>
<informalexample>
<programlisting role="XML" ><![CDATA[
- <validator active="true" >
- <service participantType="LoanBrokerParticipant" validate="false" >
+ <validator>
+ <service role="LoanBrokerParticipant" validate="false" >
<output epr="jms:queue/esb-tb-creditAgencyQueue" />
<input epr="jms:queue/esb-tb-creditAgencyQueue_reply" />
<output epr="jms:queue/esb-tb-jmsBankRequestQueue" />
@@ -317,17 +270,17 @@
<output epr="jms:queue/esb-tb-customerNotifier" />
<input epr="jms:queue/esb-tb-fileBankResponseQueue" />
</service>
- <service participantType="CreditAgencyParticipant" validate="false" >
+ <service role="CreditAgencyParticipant" validate="false" >
<input epr="jms:queue/esb-tb-creditAgencyQueue" />
<output epr="jms:queue/esb-tb-creditAgencyQueue_reply" />
</service>
- <service participantType="BankParticipant" validate="false" >
+ <service role="BankParticipant" validate="false" >
<input epr="jms:queue/esb-tb-jmsBankRequestQueue" />
<input epr="jms:queue/esb-tb-fileBankRequestQueue" />
<output epr="jms:queue/esb-tb-jmsBankResponseQueue" />
<output epr="jms:queue/esb-tb-fileBankResponseQueue" />
</service>
- <service participantType="NotifierParticipant" validate="false" >
+ <service role="NotifierParticipant" validate="false" >
<input epr="jms:queue/esb-tb-customerNotifier" />
</service>
</validator>
@@ -336,7 +289,7 @@
<para>
To define a <emphasis>Service Validator</emphasis> in record
- only mode, the <emphasis>cdmFilePath</emphasis> attribute
+ only mode, the <emphasis>model</emphasis> attribute
is not specified (because no choreography description exists
to be validated against), and the optional <emphasis>validate</emphasis>
attribute should be set to <emphasis role="bold">false</emphasis> (by default
15 years, 1 month
Overlord SVN: r519 - in cdl/trunk: docs/docbook/gettingstartedguide/src/main/module and 3 other directories.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2009-02-19 08:52:57 -0500 (Thu, 19 Feb 2009)
New Revision: 519
Added:
cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBAnnotation.jpg
cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBAnnotationToolTip.jpg
cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBEditAnnotation.jpg
Removed:
cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/GenerateValidatorDialog.jpg
cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/GenerateValidatorMenu.jpg
Modified:
cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/GenerateESBServicesMenu.jpg
cdl/trunk/docs/docbook/gettingstartedguide/src/main/module/soagwithcdl.xml
cdl/trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm
cdl/trunk/validator/jbossesb-assembly/src/main/resources/models/TrailBlazer.cdm
cdl/trunk/validator/jbossesb-assembly/src/main/resources/validator-config.xml
Log:
Updated Trailblazer.cdm to include the new jbossesb annotation format, and updated getting started guide to describe new approach to configuring the service validators which supports "hot deployment".
Modified: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/GenerateESBServicesMenu.jpg
===================================================================
(Binary files differ)
Deleted: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/GenerateValidatorDialog.jpg
===================================================================
(Binary files differ)
Deleted: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/GenerateValidatorMenu.jpg
===================================================================
(Binary files differ)
Added: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBAnnotation.jpg
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBAnnotation.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBAnnotationToolTip.jpg
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBAnnotationToolTip.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBEditAnnotation.jpg
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/docs/docbook/gettingstartedguide/src/main/images/SVJBossESBEditAnnotation.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: cdl/trunk/docs/docbook/gettingstartedguide/src/main/module/soagwithcdl.xml
===================================================================
--- cdl/trunk/docs/docbook/gettingstartedguide/src/main/module/soagwithcdl.xml 2009-02-19 12:33:24 UTC (rev 518)
+++ cdl/trunk/docs/docbook/gettingstartedguide/src/main/module/soagwithcdl.xml 2009-02-19 13:52:57 UTC (rev 519)
@@ -4,8 +4,6 @@
<chapter id="soagwithcdl">
<title>SOA Governance with CDL </title>
-I wasn't expecting Chapter 2 until much later. I thought that after installation we'd take people through a worked example (glossing over the concepts, but showing people what can be accomplished), but Chapter 2 dives into terms and concepts. I suppose what I was expecting was something like "make sure your Eclipse workspace is set to blah" and blah is a pre-configured workspace that we've set up with a number of different out-of-the-box examples. Then we'd go quickly through them in Chapter 2 before going into more detail about what's going on in subsequent chapters. That way we almost convince people in Chapter 2 that it's worth their while continuing on with the rest of the document. I know that Steve used to do something like this when demo-ing the original CDL tooling, so hopefully it's not too much effort to try to put this in?
-
<para>
The Choreography Description Language (CDL) provides a means of describing a process, that executes across a distributed set of services, from a global (or service independent) perspective.
</para>
@@ -103,7 +101,7 @@
<title>Generating an ESB Service using "Conversation Aware" ESB Actions</title>
<para>
-Once we have a choreography description, it is possible to generate an ESB Service (with <emphasis>conversation aware</emphasis> ESB actions), for each of the participants defined within the choreography. To try this out, select the <emphasis>Overlord->JBossESB->Generate ESB Services</emphasis> menu item from the popup menu associated with the <filename>PurchaseGoods.cdm</filename>.
+Once we have a choreography description, it is possible to generate an ESB Service (with <emphasis>conversation aware</emphasis> ESB actions), for each of the participants defined within the choreography. To try this out, select the <emphasis>Overlord->Generate->JBossESB Services</emphasis> menu item from the popup menu associated with the <filename>PurchaseGoods.cdm</filename>.
</para>
<imageobject>
@@ -264,28 +262,48 @@
<title>Service Validator Configuration</title>
<para>
-The service validator configuration for a choreography can be created using the <emphasis>Overlord->JBossESB->Generate Validator</emphasis> menu item on the popup menu associated with the <filename>TrailBlazer.cdm</filename> file.
+The JBossESB service validator configuration is defined using jbossesb specific annotations, that are associated
+with the 'exchange details' components (contained within interactions), within the choreography description.
</para>
+ <para>
+To view the pre-configured service validator configuration defined for the Trailblazer example, edit the
+<filename>TrailBlazer.cdm</filename> file, navigate to the <emphasis>Choreography Flows</emphasis> tab and then
+select the <emphasis>Choreography->Edit Annotations</emphasis> menu item associated with the first 'exchange details'
+component (as shown below).
+ </para>
+
<imageobject>
- <imagedata fileref="images/GenerateValidatorMenu.jpg" align="center" width="3in" />
+ <imagedata fileref="images/SVJBossESBEditAnnotation.jpg" align="center" width="3in" />
</imageobject>
<para>
-This results in a dialog being displayed, requesting the path to the file to be generated. The name of the file must be <filename>validator-config.xml</filename>, otherwise the 'Ok' button will not be enabled.
+This will display the annotation editor, with the single configured annotation called 'jbossesb'. This annotation defines
+the information required for the Service Validator to monitor this specific message exchange (i.e. the JMS destination
+on which the message will be passed).
</para>
<imageobject>
- <imagedata fileref="images/GenerateValidatorDialog.jpg" align="center" width="4in" />
+ <imagedata fileref="images/SVJBossESBAnnotation.jpg" align="center" width="3in" />
</imageobject>
<para>
-The information contained within the generated <filename>validator-config.xml</filename> can be merged as appropriate with the file contained within the <filename>$JBossAS/server/default/deploy/overlord-cdl-validator.esb</filename> folder in the JBossAS environment. The validator configuration for the <emphasis>trailblazer</emphasis> example has been preconfigured to be deployed as part of the installation procedure.
+Once an annotation has been defined, it will also be displayed as part of the tooltip for the associated model component, for example:
</para>
+ <imageobject>
+ <imagedata fileref="images/SVJBossESBAnnotationTooltip.jpg" align="center" width="3in" />
+ </imageobject>
+
+ <para>
+One the jbossesb annotations have been defined for all relevant 'exchange details' components in the choreography description,
+the choreography file can be copied to the <filename>$JBossAS/server/default/deploy/overlord-cdl-validator.esb/models</filename>
+folder in the JBossAS environment. The service validator configuration for the <emphasis>trailblazer</emphasis> example has been preconfigured to be deployed as part of the installation procedure.
+ </para>
+
<note>
<para>
-If the <filename>validator-config.xml</filename> within the JBossAS environment is modified, then the server needs to be restarted to cause the configuration to take effect.
+If the <filename>overlord-cdl-validator.esb/validator-config.xml</filename> within the JBossAS environment is modified, or choreography description files added, removed or updated within the <filename>overlord-cdl-validator.esb/models</filename> sub-folder, then the changes will automatically be detected and used to re-configure the service validators without having to restart the JBossESB server.
</para>
</note>
Modified: cdl/trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm
===================================================================
--- cdl/trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm 2009-02-19 12:33:24 UTC (rev 518)
+++ cdl/trunk/samples/jbossesb/trailblazer/models/TrailBlazer.cdm 2009-02-19 13:52:57 UTC (rev 519)
@@ -59,17 +59,17 @@
<variableDefinitions description="Channel to facilitate interaction to Notifier" name="NotifierChannel" type="//@typeDefinitions/(a)channelTypes.2" roleTypes="//@typeDefinitions/(a)roleTypes.2 //@typeDefinitions/(a)roleTypes.3"/>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="QuoteRequest" operation="requestQuote" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
<exchangeDetails description="This is the exchange details for the request exchange associated with interaction QuoteRequest" name="QuoteRequestRequestExchange" type="//@typeDefinitions/(a)informationTypes.5">
- <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-jmsBankRequestQueue}}"
		temporary="{{Temporary;Whether the destination is temporary;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
- <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-fileBankRequestQueue}}"
		temporary="{{Temporary;Whether the destination is temporary;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-jmsBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-fileBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
</exchangeDetails>
<exchangeDetails description="This is the exchange details for the respond exchange associated with interaction QuoteRequest" name="QuoteRequestRespondExchange" type="//@typeDefinitions/(a)informationTypes.3" action="Respond">
- <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-jmsBankResponseQueue}}"
		temporary="{{Temporary;Whether the destination is temporary;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
- <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-fileBankResponseQueue}}"
		temporary="{{Temporary;Whether the destination is temporary;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-jmsBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-fileBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
</exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="NotifyCustomer" operation="notify" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.2">
<exchangeDetails description="This is the exchange details for the request exchange associated with interaction NotifyCustomer" name="NotifyCustomerRequestExchange" type="//@typeDefinitions/(a)informationTypes.3">
- <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-customerNotifier}}"
		temporary="{{Temporary;Whether the destination is temporary;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
</exchangeDetails>
</activities>
</enclosedChoreographies>
@@ -78,12 +78,12 @@
<variableDefinitions description="This is the variable creditCheckResult" name="creditCheckResult" type="//@typeDefinitions/(a)informationTypes.1" roleTypes="//@typeDefinitions/(a)roleTypes.2"/>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
<exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/(a)informationTypes.0">
- <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-creditAgencyQueue}}"
		temporary="{{Temporary;Whether the destination is temporary;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-creditAgencyQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
</exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
<exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheck" name="CreditCheckRespondExchange" type="//@typeDefinitions/(a)informationTypes.1" action="Respond" receiveVariable="//@choreographies.0/(a)variableDefinitions.2">
- <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-creditAgencyQueue_reply}}"
		temporary="{{Temporary;Whether the destination is temporary;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-creditAgencyQueue_reply}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
</exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Choice">
@@ -99,7 +99,9 @@
</activities>
<activities xsi:type="org.pi4soa.cdl:Sequence" description="Insufficient credit">
<activities xsi:type="org.pi4soa.cdl:Interaction" name="NotifyCustomer" operation="notify" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction NotifyCustomer" name="NotifyCustomerRequestExchange" type="//@typeDefinitions/(a)informationTypes.2"/>
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction NotifyCustomer" name="NotifyCustomerRequestExchange" type="//@typeDefinitions/(a)informationTypes.2">
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ </exchangeDetails>
</activities>
</activities>
</activities>
Modified: cdl/trunk/validator/jbossesb-assembly/src/main/resources/models/TrailBlazer.cdm
===================================================================
--- cdl/trunk/validator/jbossesb-assembly/src/main/resources/models/TrailBlazer.cdm 2009-02-19 12:33:24 UTC (rev 518)
+++ cdl/trunk/validator/jbossesb-assembly/src/main/resources/models/TrailBlazer.cdm 2009-02-19 13:52:57 UTC (rev 519)
@@ -58,21 +58,33 @@
<variableDefinitions description="Channel to facilitate interaction to Bank" name="BankChannel" type="//@typeDefinitions/(a)channelTypes.0" roleTypes="//@typeDefinitions/(a)roleTypes.0 //@typeDefinitions/(a)roleTypes.2"/>
<variableDefinitions description="Channel to facilitate interaction to Notifier" name="NotifierChannel" type="//@typeDefinitions/(a)channelTypes.2" roleTypes="//@typeDefinitions/(a)roleTypes.2 //@typeDefinitions/(a)roleTypes.3"/>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="QuoteRequest" operation="requestQuote" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.0">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction QuoteRequest" name="QuoteRequestRequestExchange" type="//@typeDefinitions/(a)informationTypes.5"/>
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction QuoteRequest" name="QuoteRequestRespondExchange" type="//@typeDefinitions/(a)informationTypes.3" action="Respond"/>
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction QuoteRequest" name="QuoteRequestRequestExchange" type="//@typeDefinitions/(a)informationTypes.5">
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-jmsBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-fileBankRequestQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ </exchangeDetails>
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction QuoteRequest" name="QuoteRequestRespondExchange" type="//@typeDefinitions/(a)informationTypes.3" action="Respond">
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-jmsBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-fileBankResponseQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ </exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="NotifyCustomer" operation="notify" channelVariable="//@choreographies.0/@enclosedChoreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction NotifyCustomer" name="NotifyCustomerRequestExchange" type="//@typeDefinitions/(a)informationTypes.3"/>
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction NotifyCustomer" name="NotifyCustomerRequestExchange" type="//@typeDefinitions/(a)informationTypes.3">
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ </exchangeDetails>
</activities>
</enclosedChoreographies>
<variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/(a)channelTypes.1" roleTypes="//@typeDefinitions/(a)roleTypes.1 //@typeDefinitions/(a)roleTypes.2"/>
<variableDefinitions description="This is the variable NotifierChannel" name="NotifierChannel" type="//@typeDefinitions/(a)channelTypes.2" roleTypes="//@typeDefinitions/(a)roleTypes.2 //@typeDefinitions/(a)roleTypes.3"/>
<variableDefinitions description="This is the variable creditCheckResult" name="creditCheckResult" type="//@typeDefinitions/(a)informationTypes.1" roleTypes="//@typeDefinitions/(a)roleTypes.2"/>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/(a)informationTypes.0"/>
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/(a)informationTypes.0">
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-creditAgencyQueue}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ </exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/(a)variableDefinitions.0" relationship="//@typeDefinitions/(a)relationshipTypes.1">
- <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheck" name="CreditCheckRespondExchange" type="//@typeDefinitions/(a)informationTypes.1" action="Respond" receiveVariable="//@choreographies.0/(a)variableDefinitions.2"/>
+ <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheck" name="CreditCheckRespondExchange" type="//@typeDefinitions/(a)informationTypes.1" action="Respond" receiveVariable="//@choreographies.0/(a)variableDefinitions.2">
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-creditAgencyQueue_reply}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ </exchangeDetails>
</activities>
<activities xsi:type="org.pi4soa.cdl:Choice">
<activities xsi:type="org.pi4soa.cdl:Conditional" description="Sufficient credit to request quotes" name="ValidCredit" expression="cdl:getVariable('creditCheckResult','','//@score') >= 4">
@@ -87,7 +99,9 @@
</activities>
<activities xsi:type="org.pi4soa.cdl:Sequence" description="Insufficient credit">
<activities xsi:type="org.pi4soa.cdl:Interaction" name="NotifyCustomer" operation="notify" channelVariable="//@choreographies.0/(a)variableDefinitions.1" relationship="//@typeDefinitions/(a)relationshipTypes.2">
- <exchangeDetails description="This is the exchange details for the request exchange associated with interaction NotifyCustomer" name="NotifyCustomerRequestExchange" type="//@typeDefinitions/(a)informationTypes.2"/>
+ <exchangeDetails description="This is the exchange details for the request exchange associated with interaction NotifyCustomer" name="NotifyCustomerRequestExchange" type="//@typeDefinitions/(a)informationTypes.2">
+ <semanticAnnotations annotation="<jbossesb>
	<destination name="{{Destination;The URI for the ESB destination;string;;jms:queue/esb-tb-customerNotifier}}"
		dynamicReplyTo="{{Dynamic ReplyTo;Whether the replyTo destination is dynamic;boolean;;false}}" />
</jbossesb>
" name="jbossesb"/>
+ </exchangeDetails>
</activities>
</activities>
</activities>
Modified: cdl/trunk/validator/jbossesb-assembly/src/main/resources/validator-config.xml
===================================================================
--- cdl/trunk/validator/jbossesb-assembly/src/main/resources/validator-config.xml 2009-02-19 12:33:24 UTC (rev 518)
+++ cdl/trunk/validator/jbossesb-assembly/src/main/resources/validator-config.xml 2009-02-19 13:52:57 UTC (rev 519)
@@ -1,24 +1,2 @@
-<validator>
- <service model="TrailBlazer.cdm" role="LoanBrokerParticipant" >
- <output epr="jms:queue/esb-tb-creditAgencyQueue" />
- <input epr="jms:queue/esb-tb-creditAgencyQueue_reply" />
- <output epr="jms:queue/esb-tb-jmsBankRequestQueue" />
- <output epr="jms:queue/esb-tb-fileBankRequestQueue" />
- <input epr="jms:queue/esb-tb-jmsBankResponseQueue" />
- <output epr="jms:queue/esb-tb-customerNotifier" />
- <input epr="jms:queue/esb-tb-fileBankResponseQueue" />
- </service>
- <service model="TrailBlazer.cdm" role="CreditAgencyParticipant" >
- <input epr="jms:queue/esb-tb-creditAgencyQueue" />
- <output epr="jms:queue/esb-tb-creditAgencyQueue_reply" />
- </service>
- <service model="TrailBlazer.cdm" role="BankParticipant" >
- <input epr="jms:queue/esb-tb-jmsBankRequestQueue" />
- <input epr="jms:queue/esb-tb-fileBankRequestQueue" />
- <output epr="jms:queue/esb-tb-jmsBankResponseQueue" />
- <output epr="jms:queue/esb-tb-fileBankResponseQueue" />
- </service>
- <service model="TrailBlazer.cdm" role="NotifierParticipant" >
- <input epr="jms:queue/esb-tb-customerNotifier" />
- </service>
+<validator mode="monitor" replyToTimeout="10000" >
</validator>
15 years, 1 month
Overlord SVN: r518 - cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2009-02-19 07:33:24 -0500 (Thu, 19 Feb 2009)
New Revision: 518
Modified:
cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ServiceValidatorManager.java
cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ValidatorFilter.java
Log:
Updated to change from active/passive to manage/monitor terminology.
Modified: cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ServiceValidatorManager.java
===================================================================
--- cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ServiceValidatorManager.java 2009-02-19 10:39:14 UTC (rev 517)
+++ cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ServiceValidatorManager.java 2009-02-19 12:33:24 UTC (rev 518)
@@ -332,31 +332,45 @@
ConfigTree config=ConfigTree.fromInputStream(is);
if (config.getName().equals(VALIDATOR_NODE)) {
+ // Old 'active' attribute is now 'mode'
String active=config.getAttribute(ACTIVE_ATTR);
if (active != null && active.equalsIgnoreCase("true")) {
+ m_managedMode = true;
+ }
+
+ String mode=config.getAttribute(MODE_ATTR);
+
+ if (mode != null) {
+ if (mode.equals("manage")) {
+ m_managedMode = true;
+ } else if (mode.equals("monitor")) {
+ m_managedMode = false; // will override active=true
+ } else {
+ logger.severe("Unknown mode '"+mode+"' - setting to 'monitor'");
+ m_managedMode = false;
+ }
+ }
- logger.info("Setting validators into active mode");
- m_active = true;
+ if (m_managedMode) {
+ logger.info("Setting validators in 'manage' mode");
} else {
- logger.info("Setting validators into passive mode");
- m_active = false;
+ logger.info("Setting validators in 'monitor' mode");
}
- // Check if dynamic reply-to endpoint timeout specified
- String timeout=config.getAttribute(DYNAMIC_ENDPOINT_TIMEOUT_ATTR);
- long replyToTimeout=DynamicReplyToEndpointManager.DYNAMIC_ENDPOINT_TIMEOUT;
+ // Check for dynamic replyTo endpoint timeout
+ String timeoutValue=config.getAttribute(REPLY_TO_TIMEOUT_ATTR);
- if (timeout != null && timeout.trim().length() > 0) {
+ if (timeoutValue != null) {
try {
- replyToTimeout = Long.parseLong(timeout);
- } catch(Exception te) {
- logger.severe("Dynamic endpoint timeout value '"+
- timeout+"' not a valid Long type: "+te);
+ long tv=Long.parseLong(timeoutValue);
+
+ m_replyToManager.setReplyToTimeout(tv);
+ } catch(Exception e) {
+ logger.log(Level.SEVERE,
+ "Unable to set 'reply to' timeout", e);
}
}
-
- m_replyToManager.setTimeout(replyToTimeout);
}
updateConfiguration(config, existingValidatorNames,
@@ -478,7 +492,7 @@
if (active != null && active.equalsIgnoreCase("true")) {
logger.info("Setting validator into active mode");
- m_active = true;
+ m_managedMode = true;
}
}
@@ -663,25 +677,26 @@
/**
* This method returns whether the service validator configuration
- * is in 'active' mode. If yes, then invalid messages will
+ * is in 'manage' mode. If yes, then invalid messages will
* be blocked from being delivered to their destination.
*
- * @return Whether the service validator is in 'active' mode
+ * @return Whether the service validator is in 'manage' mode
*/
- public boolean isActive() {
- return(m_active);
+ public boolean isManagedMode() {
+ return(m_managedMode);
}
private static final Logger logger = Logger.getLogger("org.jboss.soa.overlord.validator.jbossesb");
private static final String EPR_ATTR = "epr";
private static final String DYNAMIC_REPLY_TO_ATTR = "dynamicReplyTo";
- private static final String DYNAMIC_ENDPOINT_TIMEOUT_ATTR = "dynamicEndpointTimeout";
private static final String OUTPUT_NODE = "output";
private static final String INPUT_NODE = "input";
private static final String SERVICE_NODE = "service";
private static final String ACTIVE_ATTR = "active";
+ private static final String MODE_ATTR = "mode";
+ private static final String REPLY_TO_TIMEOUT_ATTR = "replyToTimeout";
private static final String VALIDATOR_NODE = "validator";
private static final String CONFIG_FILE = "validator-config.xml";
@@ -698,7 +713,7 @@
private java.util.Map<Endpoint,java.util.List<ServiceValidator>> m_outputValidators=new java.util.Hashtable<Endpoint,java.util.List<ServiceValidator>>();
private java.util.Set<Endpoint> m_inputDynaReplyTos=new java.util.HashSet<Endpoint>();
private java.util.Set<Endpoint> m_outputDynaReplyTos=new java.util.HashSet<Endpoint>();
- private boolean m_active=false;
+ private boolean m_managedMode=false;
private DynamicReplyToEndpointManager m_replyToManager=new DynamicReplyToEndpointManager();
/**
@@ -777,8 +792,6 @@
public class DynamicReplyToEndpointManager extends Thread {
- public static final int DYNAMIC_ENDPOINT_TIMEOUT = 10000;
-
/**
* The default constructor
*/
@@ -798,7 +811,7 @@
try {
synchronized(this) {
- wait(m_timeout);
+ wait(m_replyToTimeout);
}
} catch(Exception e) {
logger.severe("Failed to wait");
@@ -845,20 +858,6 @@
}
/**
- * This method sets the timeout used to determine when to
- * discard the dynamic endpoints being monitored.
- *
- * @param timeout The timeout value
- */
- public void setTimeout(long timeout) {
- m_timeout = timeout;
-
- if (logger.isLoggable(Level.FINE)) {
- logger.fine("Dynamic endpoint monitoring timeout="+timeout);
- }
- }
-
- /**
* This method returns the list of service validators
* associated with the dynamic reply-to endpoint.
*
@@ -948,6 +947,16 @@
}
}
+ /**
+ * This method sets the timeout period for purging the
+ * cache of reply-to endpoints.
+ *
+ * @param timeoutValue The timeout value
+ */
+ public void setReplyToTimeout(long timeoutValue) {
+ m_replyToTimeout = timeoutValue;
+ }
+
private java.util.Map<Endpoint,java.util.List<ServiceValidator>> m_inputs=
new java.util.HashMap<Endpoint,java.util.List<ServiceValidator>>();
private java.util.Map<Endpoint,java.util.List<ServiceValidator>> m_outputs=
@@ -956,6 +965,6 @@
new java.util.HashMap<Endpoint,java.util.List<ServiceValidator>>();
private java.util.Map<Endpoint,java.util.List<ServiceValidator>> m_outputsPendingDelete=
new java.util.HashMap<Endpoint,java.util.List<ServiceValidator>>();
- private long m_timeout=DYNAMIC_ENDPOINT_TIMEOUT;
+ private long m_replyToTimeout=10000;
}
}
Modified: cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ValidatorFilter.java
===================================================================
--- cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ValidatorFilter.java 2009-02-19 10:39:14 UTC (rev 517)
+++ cdl/trunk/validator/jbossesb/src/main/java/org/jboss/soa/overlord/validator/jbossesb/ValidatorFilter.java 2009-02-19 12:33:24 UTC (rev 518)
@@ -77,7 +77,7 @@
logger.log(java.util.logging.Level.SEVERE,
"Failed to handle sent message", ex);
- if (ServiceValidatorManager.instance().isActive()) {
+ if (ServiceValidatorManager.instance().isManagedMode()) {
throw new CourierException("Failed to handle sent message", ex);
}
} else {
@@ -140,7 +140,7 @@
logger.log(java.util.logging.Level.SEVERE,
"Failed to handle received message", ex);
- if (ServiceValidatorManager.instance().isActive()) {
+ if (ServiceValidatorManager.instance().isManagedMode()) {
throw new CourierException("Failed to handle received message", ex);
}
} else {
15 years, 1 month
Overlord SVN: r517 - in cdl/trunk: validator/jbossesb and 1 other directory.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-02-19 05:39:14 -0500 (Thu, 19 Feb 2009)
New Revision: 517
Modified:
cdl/trunk/distribution/pom.xml
cdl/trunk/validator/jbossesb/pom.xml
Log:
* update the validator artifact id.
Modified: cdl/trunk/distribution/pom.xml
===================================================================
--- cdl/trunk/distribution/pom.xml 2009-02-19 10:04:06 UTC (rev 516)
+++ cdl/trunk/distribution/pom.xml 2009-02-19 10:39:14 UTC (rev 517)
@@ -45,7 +45,7 @@
</dependency>
<dependency>
<groupId>org.jboss.soa.overlord.cdl.validator</groupId>
- <artifactId>cdl-jbossesb</artifactId>
+ <artifactId>cdl-validator-jbossesb</artifactId>
<version>${pom.version}</version>
</dependency>
<dependency>
Modified: cdl/trunk/validator/jbossesb/pom.xml
===================================================================
--- cdl/trunk/validator/jbossesb/pom.xml 2009-02-19 10:04:06 UTC (rev 516)
+++ cdl/trunk/validator/jbossesb/pom.xml 2009-02-19 10:39:14 UTC (rev 517)
@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.soa.overlord.cdl.validator</groupId>
- <artifactId>cdl-jbossesb</artifactId>
+ <artifactId>cdl-validator-jbossesb</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Overlord::CDL::Validator::JBossESB</name>
15 years, 1 month
Overlord SVN: r516 - in cdl/trunk: tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel and 4 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-02-19 05:04:06 -0500 (Thu, 19 Feb 2009)
New Revision: 516
Added:
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java
Modified:
cdl/trunk/install.xml
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/export/BPELLanguageModelStreamExportRule.java
cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java
cdl/trunk/validator/jbossesb/pom.xml
Log:
* Fix the install.xml, update the validator jbossesb module name to cdl-jbossesb.
* Extract the XMLUtils.toText, so that the test class and the ExportRule can reuse.
Modified: cdl/trunk/install.xml
===================================================================
--- cdl/trunk/install.xml 2009-02-18 23:47:06 UTC (rev 515)
+++ cdl/trunk/install.xml 2009-02-19 10:04:06 UTC (rev 516)
@@ -34,7 +34,7 @@
<arg line="-c 'mvn install:install-file -DgroupId=org.eclipse.emf -DartifactId=common -Dversion=2.3.0 -Dpackaging=jar -Dfile=${libraries.dir}/eclipse-emf-common-2.3.0.jar'" />
</exec>
<exec executable="${shell}">
- <arg line="-c 'mvn install:install-file -DgroupId=org.eclipse.emf -DartifactId=ecore -Dversion=2.3.1 -Dpackaging=jar -Dfile=${libraries.dir}/eclipse-emf-common-2.3.0.jar'" />
+ <arg line="-c 'mvn install:install-file -DgroupId=org.eclipse.emf -DartifactId=ecore -Dversion=2.3.1 -Dpackaging=jar -Dfile=${libraries.dir}/eclipse-emf-ecore-2.3.1.jar'" />
</exec>
</target>
</project>
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/export/BPELLanguageModelStreamExportRule.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/export/BPELLanguageModelStreamExportRule.java 2009-02-18 23:47:06 UTC (rev 515)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/export/BPELLanguageModelStreamExportRule.java 2009-02-19 10:04:06 UTC (rev 516)
@@ -17,17 +17,17 @@
*/
package org.jboss.tools.overlord.cdl.bpel.export;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
+import java.io.IOException;
-import org.jboss.tools.overlord.cdl.bpel.model.*;
-import org.scribble.export.*;
-import org.scribble.export.stream.*;
+import org.jboss.tools.overlord.cdl.bpel.model.BPELLanguageModel;
+import org.jboss.tools.overlord.cdl.bpel.model.BPELNotation;
+import org.jboss.tools.overlord.cdl.bpel.util.XMLUtils;
+import org.scribble.export.ExportRule;
+import org.scribble.export.ExporterContext;
+import org.scribble.export.Formatter;
+import org.scribble.export.stream.DefaultModelStreamExportRule;
import org.scribble.extensions.RegistryInfo;
-import org.scribble.model.*;
-import org.w3c.dom.Node;
+import org.scribble.model.ModelObject;
/**
* This class implements the stream based export rule for the
@@ -62,146 +62,12 @@
BPELLanguageModel model=(BPELLanguageModel)modelObject;
try {
- String text=getText(model.getBPELProcess());
-
+ String text=XMLUtils.toText(model.getBPELProcess());
context.getFormatter().record(text.getBytes());
} catch(Exception e) {
throw new java.io.IOException("Failed to get BPEL process text");
}
}
-
- /**
- * This class converts a DOM representation node to
- * text.
- *
- * @param node The DOM node
- * @return The text
- * @throws Exception Failed to convert
- */
- protected String getText(Node node) throws Exception {
- String ret=null;
-
- try {
- // Transform the DOM represent to text
- java.io.ByteArrayOutputStream xmlstr=
- new java.io.ByteArrayOutputStream();
-
- DOMSource source=new DOMSource();
- source.setNode(node);
-
- StreamResult result=new StreamResult(xmlstr);
-
- Transformer trans=
- TransformerFactory.newInstance().newTransformer();
- trans.transform(source, result);
-
- xmlstr.close();
-
- ret = new String(xmlstr.toByteArray());
-
- if ((node instanceof org.w3c.dom.Document) == false) {
-
- // Strip off any <?xml> header
- int index=ret.indexOf("<?xml");
- if (index != -1) {
- index = ret.indexOf("<", 1);
-
- if (index != -1) {
- ret = ret.substring(index);
- } else {
- index = ret.indexOf("?>");
-
- if (index != -1) {
- index += 2;
-
- // Remove any trailing whitespaces
- // after XML header
- while (index < ret.length() &&
- Character.isWhitespace(ret.charAt(index))) {
- index++;
- }
-
- ret = ret.substring(index);
- }
- }
- }
- }
- } catch(Exception e) {
- throw new Exception("Failed to transform " +
- "DOM representation into text", e);
- }
-
- int pos=0;
- int prevpos=0;
- StringBuffer buf=new StringBuffer();
- int level=0;
-
- while ((pos=ret.indexOf('<', prevpos)) != -1) {
-
- if (prevpos < pos &&
- ret.substring(prevpos, pos).trim().length() > 0 &&
- ret.charAt(prevpos-1) != '?') {
-
- if (ret.charAt(prevpos) == '\r' &&
- ret.charAt(prevpos+1) == '\n') {
- prevpos += 2;
- }
- for (int i=0; i < level; i++) {
- buf.append(" ");
- }
-
- buf.append(ret.substring(prevpos, pos).trim());
- buf.append("\r\n");
- }
-
- int endpos=ret.indexOf('>', pos);
-
- if (endpos > 0) {
- boolean noreturn=false;
-
- if (pos > 0 && ret.charAt(pos+1) == '/') {
- level--;
- }
-
- for (int i=0; i < level; i++) {
- buf.append(" ");
- }
- buf.append(ret.substring(pos, endpos+1));
-
- if (ret.charAt(endpos-1)== '?') {
- //noreturn = true;
-
- } else if (ret.charAt(endpos-1) == '/') {
- // Ignore
- } else if (pos > 0 && ret.charAt(pos+1) == '/') {
- // Ignore
-
- } else if (pos > 0 && ret.charAt(pos+1) == '!') {
- // Ignore
-
- } else {
- level++;
- }
-
- if (noreturn == false) {
- buf.append("\r\n");
- }
-
- pos = endpos+1;
- }
-
- prevpos = pos;
- }
-
- if (prevpos != -1 &&
- ret.substring(prevpos).trim().length() > 0) {
- buf.append(ret.substring(prevpos));
- }
-
- ret = buf.toString();
-
- return(ret);
- }
}
Added: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java (rev 0)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/java/org/jboss/tools/overlord/cdl/bpel/util/XMLUtils.java 2009-02-19 10:04:06 UTC (rev 516)
@@ -0,0 +1,178 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.jboss.tools.overlord.cdl.bpel.util;
+
+import java.io.ByteArrayOutputStream;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+/**
+ *
+ */
+public final class XMLUtils {
+
+ /**
+ * This class converts a DOM representation node to text.
+ * @param node
+ * @return
+ * @throws Exception
+ */
+ public static final String toText(Node node) throws Exception {
+ String ret = null;
+ try {
+ // Transform the DOM represent to text
+ ByteArrayOutputStream xmlstr= new ByteArrayOutputStream();
+ DOMSource source=new DOMSource();
+ source.setNode(node);
+
+ StreamResult result=new StreamResult(xmlstr);
+ Transformer trans= TransformerFactory.newInstance().newTransformer();
+ trans.transform(source, result);
+
+ xmlstr.close();
+
+ ret = new String(xmlstr.toByteArray());
+
+ if ((node instanceof Document) == false) {
+ // Strip off any <?xml> header
+ int index=ret.indexOf("<?xml");
+ if (index != -1) {
+ index = ret.indexOf("<", 1);
+ if (index != -1) {
+ ret = ret.substring(index);
+ } else {
+ index = ret.indexOf("?>");
+ if (index != -1) {
+ index += 2;
+
+ // Remove any trailing whitespaces after XML header
+ while (index < ret.length() &&
+ Character.isWhitespace(ret.charAt(index))) {
+ index++;
+ }
+
+ ret = ret.substring(index);
+ }
+ }
+ }
+ }
+
+ } catch(Exception e) {
+ throw new Exception("Failed to transform DOM representation into text", e);
+ }
+ if (ret != null) {
+ return format(ret);
+ }
+ return ret;
+ }
+
+
+ /**
+ * Format the xml to well print.
+ *
+ * @param xmltext
+ * @return
+ */
+ public static final String format(String xmltext) {
+ String ret=xmltext;
+ int pos=0;
+ int prevpos=0;
+ StringBuffer buf=new StringBuffer();
+ int level=0;
+
+ while ((pos=ret.indexOf('<', prevpos)) != -1) {
+
+ if (prevpos < pos &&
+ ret.substring(prevpos, pos).trim().length() > 0 &&
+ ret.charAt(prevpos-1) != '?') {
+
+ if (ret.charAt(prevpos) == '\r' &&
+ ret.charAt(prevpos+1) == '\n') {
+ prevpos += 2;
+ }
+ for (int i=0; i < level; i++) {
+ buf.append(" ");
+ }
+
+ buf.append(ret.substring(prevpos, pos).trim());
+ buf.append("\r\n");
+ }
+
+ int endpos=ret.indexOf('>', pos);
+
+ if (endpos > 0) {
+ boolean noreturn=false;
+
+ if (pos > 0 && ret.charAt(pos+1) == '/') {
+ level--;
+ }
+
+ for (int i=0; i < level; i++) {
+ buf.append(" ");
+ }
+ buf.append(ret.substring(pos, endpos+1));
+
+ if (ret.charAt(endpos-1)== '?') {
+ //noreturn = true;
+
+ } else if (ret.charAt(endpos-1) == '/') {
+ // Ignore
+ } else if (pos > 0 && ret.charAt(pos+1) == '/') {
+ // Ignore
+
+ } else if (pos > 0 && ret.charAt(pos+1) == '!') {
+ // Ignore
+
+ } else {
+ level++;
+ }
+
+ if (noreturn == false) {
+ buf.append("\r\n");
+ }
+
+ pos = endpos+1;
+ }
+
+ prevpos = pos;
+ }
+
+ if (prevpos != -1 &&
+ ret.substring(prevpos).trim().length() > 0) {
+ buf.append(ret.substring(prevpos));
+ }
+
+ ret = buf.toString();
+
+ return(ret);
+ }
+
+ public static void main(String[] args) throws Exception {
+ String raw = "<?xml ?><books><book>The World is Flat</book></books>";
+ String pretty = format(raw);
+ System.out.println(pretty);
+ }
+
+}
+
Modified: cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java
===================================================================
--- cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java 2009-02-18 23:47:06 UTC (rev 515)
+++ cdl/trunk/tools/plugins/org.jboss.tools.overlord.cdl.bpel/src/test/org/jboss/tools/overlord/cdl/bpel/generator/GeneratorTest.java 2009-02-19 10:04:06 UTC (rev 516)
@@ -17,21 +17,18 @@
*/
package org.jboss.tools.overlord.cdl.bpel.generator;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
+import junit.framework.TestCase;
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
import org.jboss.tools.overlord.cdl.bpel.model.BPELNotation;
import org.jboss.tools.overlord.cdl.bpel.model.DefaultBPELLanguageModel;
+import org.jboss.tools.overlord.cdl.bpel.util.XMLUtils;
import org.scribble.conversation.model.ConversationNotation;
import org.scribble.extensions.RegistryFactory;
import org.scribble.model.ModelReference;
import org.scribble.model.change.ModelGenerator;
-import org.w3c.dom.Node;
-import junit.framework.*;
-
public class GeneratorTest extends TestCase {
public static TestSuite suite() {
@@ -101,8 +98,7 @@
if (target.getBPELProcess() != null) {
try {
- String text=getText(target.getBPELProcess(), true);
-
+ String text=XMLUtils.toText(target.getBPELProcess());
checkResults(result, text);
} catch(Exception e) {
result.addError(this, e);
@@ -165,171 +161,7 @@
"' not found for comparison"));
}
}
-
- /**
- * This class converts a DOM representation node to
- * text with appropriate presentation formatting.
- *
- * @param node The DOM node
- * @param pretty Whether to format the text for presentation
- * @return The text
- * @throws Exception Failed to convert
- */
- public static String getText(Node node, boolean pretty) throws Exception {
- String ret=getText(node);
-
- if (pretty) {
- ret = reformat(ret);
- }
-
- return(ret);
- }
- /**
- * This method reformats the XML text for presentation.
- *
- * @param xmltext The original XML text
- * @return The reformatted text
- */
- protected static String reformat(String xmltext) {
- String ret=xmltext;
- int pos=0;
- int prevpos=0;
- StringBuffer buf=new StringBuffer();
- int level=0;
-
- while ((pos=ret.indexOf('<', prevpos)) != -1) {
-
- if (prevpos < pos &&
- ret.substring(prevpos, pos).trim().length() > 0 &&
- ret.charAt(prevpos-1) != '?') {
-
- if (ret.charAt(prevpos) == '\r' &&
- ret.charAt(prevpos+1) == '\n') {
- prevpos += 2;
- }
- for (int i=0; i < level; i++) {
- buf.append(" ");
- }
-
- buf.append(ret.substring(prevpos, pos).trim());
- buf.append("\r\n");
- }
-
- int endpos=ret.indexOf('>', pos);
-
- if (endpos > 0) {
- boolean noreturn=false;
-
- if (pos > 0 && ret.charAt(pos+1) == '/') {
- level--;
- }
-
- for (int i=0; i < level; i++) {
- buf.append(" ");
- }
- buf.append(ret.substring(pos, endpos+1));
-
- if (ret.charAt(endpos-1)== '?') {
- //noreturn = true;
-
- } else if (ret.charAt(endpos-1) == '/') {
- // Ignore
- } else if (pos > 0 && ret.charAt(pos+1) == '/') {
- // Ignore
-
- } else if (pos > 0 && ret.charAt(pos+1) == '!') {
- // Ignore
-
- } else {
- level++;
- }
-
- if (noreturn == false) {
- buf.append("\r\n");
- }
-
- pos = endpos+1;
- }
-
- prevpos = pos;
- }
-
- if (prevpos != -1 &&
- ret.substring(prevpos).trim().length() > 0) {
- buf.append(ret.substring(prevpos));
- }
-
- ret = buf.toString();
-
- return(ret);
- }
-
- /**
- * This class converts a DOM representation node to
- * text.
- *
- * @param node The DOM node
- * @return The text
- * @throws Exception Failed to convert
- */
- public static String getText(Node node) throws Exception {
- String ret=null;
-
- try {
- // Transform the DOM represent to text
- java.io.ByteArrayOutputStream xmlstr=
- new java.io.ByteArrayOutputStream();
-
- DOMSource source=new DOMSource();
- source.setNode(node);
-
- StreamResult result=new StreamResult(xmlstr);
-
- Transformer trans=
- TransformerFactory.newInstance().newTransformer();
- trans.transform(source, result);
-
- xmlstr.close();
-
- ret = new String(xmlstr.toByteArray());
-
- if ((node instanceof org.w3c.dom.Document) == false) {
-
- // Strip off any <?xml> header
- int index=ret.indexOf("<?xml");
- if (index != -1) {
- index = ret.indexOf("<", 1);
-
- if (index != -1) {
- ret = ret.substring(index);
- } else {
- index = ret.indexOf("?>");
-
- if (index != -1) {
- index += 2;
-
- // Remove any trailing whitespaces
- // after XML header
- while (index < ret.length() &&
- Character.isWhitespace(ret.charAt(index))) {
- index++;
- }
-
- ret = ret.substring(index);
- }
- }
- }
- }
-
- } catch(Exception e) {
- throw new Exception("Failed to transform " +
- "DOM representation into text", e);
- }
-
- return(ret);
- }
-
private String m_name=null;
}
}
Modified: cdl/trunk/validator/jbossesb/pom.xml
===================================================================
--- cdl/trunk/validator/jbossesb/pom.xml 2009-02-18 23:47:06 UTC (rev 515)
+++ cdl/trunk/validator/jbossesb/pom.xml 2009-02-19 10:04:06 UTC (rev 516)
@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.soa.overlord.cdl.validator</groupId>
- <artifactId>cdl-validator-jbossesb</artifactId>
+ <artifactId>cdl-jbossesb</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Overlord::CDL::Validator::JBossESB</name>
15 years, 1 month
Overlord SVN: r515 - in cdl/trunk/distribution/eclipse: features and 1 other directories.
by overlord-commits@lists.jboss.org
Author: objectiser
Date: 2009-02-18 18:47:06 -0500 (Wed, 18 Feb 2009)
New Revision: 515
Added:
cdl/trunk/distribution/eclipse/features/org.jboss.tools.overlord.cdl.jbossesb.feature_1.0.0.200902182341.jar
cdl/trunk/distribution/eclipse/features/org.scribble.conversation.feature_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/features/org.scribble.experimental.feature_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/features/org.scribble.feature_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/features/org.scribble.java.feature_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/features/org.scribble.protocol.feature_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb_1.0.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.validator.jbossesb_1.0.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conformance_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.comparator_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.export.text_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.model_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.parser_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.projector_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.validation_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.core_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.designer_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.expression.xpath_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.comparator_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.java.parser_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.model_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.osgi_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.comparator_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.export.text_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.model_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.parser_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.projector_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.validation_0.1.0.200902182341.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.type.java_0.1.0.200902182341.jar
Removed:
cdl/trunk/distribution/eclipse/features/org.jboss.tools.overlord.cdl.jbossesb.feature_1.0.0.200902182143.jar
cdl/trunk/distribution/eclipse/features/org.scribble.conversation.feature_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/features/org.scribble.experimental.feature_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/features/org.scribble.feature_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/features/org.scribble.java.feature_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/features/org.scribble.protocol.feature_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb_1.0.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.validator.jbossesb_1.0.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conformance_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.comparator_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.export.text_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.model_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.parser_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.projector_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.validation_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.core_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.designer_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.expression.xpath_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.comparator_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.java.parser_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.model_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.osgi_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.comparator_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.export.text_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.model_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.parser_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.projector_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.validation_0.1.0.200902182143.jar
cdl/trunk/distribution/eclipse/plugins/org.scribble.type.java_0.1.0.200902182143.jar
Modified:
cdl/trunk/distribution/eclipse/site.xml
Log:
Deleted: cdl/trunk/distribution/eclipse/features/org.jboss.tools.overlord.cdl.jbossesb.feature_1.0.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/features/org.jboss.tools.overlord.cdl.jbossesb.feature_1.0.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/features/org.jboss.tools.overlord.cdl.jbossesb.feature_1.0.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/features/org.scribble.conversation.feature_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/features/org.scribble.conversation.feature_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/features/org.scribble.conversation.feature_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/features/org.scribble.experimental.feature_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/features/org.scribble.experimental.feature_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/features/org.scribble.experimental.feature_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/features/org.scribble.feature_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/features/org.scribble.feature_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/features/org.scribble.feature_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/features/org.scribble.java.feature_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/features/org.scribble.java.feature_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/features/org.scribble.java.feature_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/features/org.scribble.protocol.feature_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/features/org.scribble.protocol.feature_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/features/org.scribble.protocol.feature_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb_1.0.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb_1.0.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.runtime.jbossesb_1.0.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.validator.jbossesb_1.0.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.validator.jbossesb_1.0.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.jboss.tools.overlord.cdl.validator.jbossesb_1.0.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.conformance_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.conformance_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.conformance_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.comparator_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.comparator_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.comparator_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.export.text_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.export.text_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.export.text_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.model_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.model_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.model_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.parser_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.parser_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.parser_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.projector_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.projector_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.projector_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.validation_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.validation_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.conversation.validation_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.core_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.core_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.core_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.designer_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.designer_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.designer_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.expression.xpath_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.expression.xpath_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.expression.xpath_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.comparator_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.comparator_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.comparator_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.java.parser_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.java.parser_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.java.parser_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.model_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.model_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.lang.model_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.osgi_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.osgi_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.osgi_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.comparator_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.comparator_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.comparator_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.export.text_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.export.text_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.export.text_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.model_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.model_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.model_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.parser_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.parser_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.parser_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.projector_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.projector_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.projector_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.validation_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.validation_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.protocol.validation_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: cdl/trunk/distribution/eclipse/plugins/org.scribble.type.java_0.1.0.200902182143.jar
===================================================================
(Binary files differ)
Added: cdl/trunk/distribution/eclipse/plugins/org.scribble.type.java_0.1.0.200902182341.jar
===================================================================
(Binary files differ)
Property changes on: cdl/trunk/distribution/eclipse/plugins/org.scribble.type.java_0.1.0.200902182341.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: cdl/trunk/distribution/eclipse/site.xml
===================================================================
--- cdl/trunk/distribution/eclipse/site.xml 2009-02-18 21:46:57 UTC (rev 514)
+++ cdl/trunk/distribution/eclipse/site.xml 2009-02-18 23:47:06 UTC (rev 515)
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
- <feature url="features/org.scribble.conversation.feature_0.1.0.200902182143.jar" id="org.scribble.conversation.feature" version="0.1.0.200902182143">
+ <feature url="features/org.scribble.conversation.feature_0.1.0.200902182341.jar" id="org.scribble.conversation.feature" version="0.1.0.200902182341">
<category name="Common"/>
</feature>
- <feature url="features/org.scribble.experimental.feature_0.1.0.200902182143.jar" id="org.scribble.experimental.feature" version="0.1.0.200902182143">
+ <feature url="features/org.scribble.experimental.feature_0.1.0.200902182341.jar" id="org.scribble.experimental.feature" version="0.1.0.200902182341">
<category name="Common"/>
</feature>
- <feature url="features/org.scribble.feature_0.1.0.200902182143.jar" id="org.scribble.feature" version="0.1.0.200902182143">
+ <feature url="features/org.scribble.feature_0.1.0.200902182341.jar" id="org.scribble.feature" version="0.1.0.200902182341">
<category name="Common"/>
</feature>
- <feature url="features/org.scribble.java.feature_0.1.0.200902182143.jar" id="org.scribble.java.feature" version="0.1.0.200902182143">
+ <feature url="features/org.scribble.java.feature_0.1.0.200902182341.jar" id="org.scribble.java.feature" version="0.1.0.200902182341">
<category name="Common"/>
</feature>
- <feature url="features/org.scribble.protocol.feature_0.1.0.200902182143.jar" id="org.scribble.protocol.feature" version="0.1.0.200902182143">
+ <feature url="features/org.scribble.protocol.feature_0.1.0.200902182341.jar" id="org.scribble.protocol.feature" version="0.1.0.200902182341">
<category name="Common"/>
</feature>
- <feature url="features/org.jboss.tools.overlord.cdl.jbossesb.feature_1.0.0.200902182143.jar" id="org.jboss.tools.overlord.cdl.jbossesb.feature" version="1.0.0.200902182143">
+ <feature url="features/org.jboss.tools.overlord.cdl.jbossesb.feature_1.0.0.200902182341.jar" id="org.jboss.tools.overlord.cdl.jbossesb.feature" version="1.0.0.200902182341">
<category name="JBossESB"/>
</feature>
<category-def name="JBossESB" label="JBossESB">
15 years, 1 month