You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by ad...@apache.org on 2006/02/28 17:05:47 UTC

svn commit: r381686 [37/40] - in /incubator/ode/scratch/bpe: ./ bpelTests/ bpelTests/probeService/ bpelTests/test1/ bpelTests/test10/ bpelTests/test12/ bpelTests/test13/ bpelTests/test14/ bpelTests/test15/ bpelTests/test16/ bpelTests/test17/ bpelTests/...

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnection.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnection.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnection.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnection.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,112 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+import java.util.logging.Logger;
+
+import javax.resource.ResourceException;
+import javax.resource.cci.ConnectionMetaData;
+import javax.resource.cci.Interaction;
+import javax.resource.cci.LocalTransaction;
+import javax.resource.cci.ResultSetInfo;
+import javax.resource.spi.ConnectionEvent;
+
+
+/**
+ * A UUIDConnection is a connection to a UUID service. The UUIDConnection is used
+ * to acquire a UUID. This is a non-transactional connection.
+ * 
+ * @author waterman
+ *
+ */
+public class UUIDConnection
+	implements IUUIDConnection {
+
+	private static Logger logger = 
+				Logger.getLogger(UUIDConnection.class.getName());
+
+		
+	public UUIDConnection(UUIDManagedConnection managedConnection) {
+		this.mc = managedConnection;
+	}										
+		
+	/**
+	 * Interaction is not supported
+	 */
+	public Interaction createInteraction() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"createInteraction()"});
+	}
+
+	/**
+	 * Local Transaction is not supported
+	 */
+	public LocalTransaction getLocalTransaction() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"getLocalTransaction()"});
+	}
+
+	/**
+	 * Auto Commit is not supported
+	 */
+	public void setAutoCommit(boolean arg0) throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"setAutoCommit()"});
+	}
+
+	/**
+	 * Auto Commit is not supported
+	 */
+	public boolean getAutoCommit() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"getAutoCommit()"});
+	}
+
+	/**
+	 * This method creates connection metadata
+	 */
+	public ConnectionMetaData getMetaData() throws ResourceException {
+		return new UUIDConnectionMetadata();
+	}
+
+	/**
+	 * Result Set Info is not supported
+	 */
+	public ResultSetInfo getResultSetInfo() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"getResultSetInfo()"});
+	}
+
+	/**
+	 * This method closes the connection
+	 */
+	public void close() throws ResourceException {
+		if (mc != null) {
+			mc.sendEvent(ConnectionEvent.CONNECTION_CLOSED, null, this);
+			// set managed connection to null
+			// TODO - Cory uncomment this when EAServer JCA's work
+			//mc = null;
+		}
+	}
+
+	public String getUUID() throws ResourceException {
+		if ( mc == null ) throw new ResourceException("");
+		return mc.getUUID();
+	}
+
+	private UUIDManagedConnection mc;
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionFactory.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionFactory.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionFactory.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionFactory.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,112 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+import java.util.logging.Logger;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.resource.ResourceException;
+import javax.resource.cci.Connection;
+import javax.resource.cci.ConnectionSpec;
+import javax.resource.cci.RecordFactory;
+import javax.resource.cci.ResourceAdapterMetaData;
+import javax.resource.spi.ConnectionManager;
+
+
+/**
+ * Acquires a UUIDConnection from a ConnectionManager
+ * 
+ * @author waterman
+ *
+ */
+public class UUIDConnectionFactory implements javax.resource.cci.ConnectionFactory {
+		
+	static final long serialVersionUID = -7512179930970209326L;
+
+	public UUIDConnectionFactory(UUIDManagedConnectionFactory managedConnectionFactory,
+									ConnectionManager connectionManager) {
+		this.mcf = managedConnectionFactory;
+    	this.cm = connectionManager;
+	}											
+
+	/**
+	 * This method gets the connection
+	 */
+	public Connection getConnection() throws ResourceException {
+		Connection connection = null;
+		// call connection manager to allocate connection
+        connection = (Connection)(cm.allocateConnection(mcf,null));
+		return connection;
+	}
+
+	/**
+	 * This method gets the connection
+	 */
+	public Connection getConnection(ConnectionSpec properties)
+		throws ResourceException {
+		Connection connection = null;
+		// cast it to UUIDConnectionSpec
+        UUIDConnectionSpec info = (UUIDConnectionSpec)(properties);	 
+        // call connection manager to allocate connection by passing in
+        // the connection spec  
+        connection = (Connection)(cm.allocateConnection(mcf,info));
+		return connection;
+	}
+
+	/**
+	 * Record Factory is not supported
+	 */
+	public RecordFactory getRecordFactory() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"getRecordFactory()"});
+	}
+
+	/**
+	 * Resource Adapter Meatdata is not supported
+	 */
+	public ResourceAdapterMetaData getMetaData() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"getMetaData()"});
+	}
+	
+	/**
+	 * @see javax.resource.Referenceable#setReference(javax.naming.Reference)
+	 */
+	public void setReference(Reference arg0) {
+		ref = arg0;
+	}
+
+	/**
+	 * @see javax.naming.Referenceable#getReference()
+	 */
+	public Reference getReference() throws NamingException {
+		return ref;
+	}
+	
+
+	private UUIDManagedConnectionFactory mcf = null;
+    private ConnectionManager cm = null;
+	private Reference ref = null;
+	
+	private static Logger logger = 
+				Logger.getLogger(UUIDConnectionFactory.class.getName());
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionManager.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionManager.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionManager.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionManager.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,233 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionEvent;
+import javax.resource.spi.ConnectionEventListener;
+import javax.resource.spi.ConnectionManager;
+import javax.resource.spi.ConnectionRequestInfo;
+import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionFactory;
+import javax.security.auth.Subject;
+
+import com.sybase.bpe.pool.MinMaxObjPool;
+import com.sybase.bpe.pool.ObjPoolObject;
+import com.sybase.bpe.pool.PoolException;
+
+/**
+ * In a non-managed enviornment the UUIDConnectionManager is used to pool
+ * UUIDConnections. 
+ * <br>
+ * As the {@link #allocateConnection(ManagedConnectionFactory managedConnectionFactory,ConnectionRequestInfo info) allocateConnection}
+ * signature implies, the ConnectionManager may hold a collection
+ * of connection pools - one for each ManagedConnectionFactory.
+ * In the non-managed senario the UUIDConnectionManager is a Pool 
+ * rather than has a Pool(s).
+ * If the user needs more than one pool they must create and manage
+ * UUIDConnectionManager instances.	
+ * 
+ * @author waterman
+ *
+ */
+public class UUIDConnectionManager extends MinMaxObjPool implements ConnectionManager, ConnectionEventListener {
+
+	static final long serialVersionUID = -4273846573655733548L;
+
+	private UUIDManagedConnectionFactory m_factory;
+	private Subject m_auth;
+	private static Logger logger = 
+				Logger.getLogger(UUIDConnectionManager.class.getName());
+
+	public UUIDConnectionManager(UUIDManagedConnectionFactory factory) throws PoolException {
+		super(new HashSet(), false);
+		
+		m_factory = factory;
+		
+		//init the pool
+		Properties p = new Properties(); // Use class defaults
+		//p.setProperty("pool.maxSize","10");
+		
+		init(p,factory,m_auth,new UUIDConnectionSpec());
+
+	}
+
+	/**
+	 * This method allocates the connection
+	 */
+	public Object allocateConnection(
+		ManagedConnectionFactory managedConnectionFactory,
+		ConnectionRequestInfo info)
+		throws ResourceException {
+			
+		if ( managedConnectionFactory != m_factory ) {
+			throw new UUIDResourceException(logger,"UUID_MANAGED_FACTORY",null);
+		}
+		
+		// get a managed connection from the pool
+		ManagedConnection mc;
+		try {
+			addSupportedType(info);
+			mc = (ManagedConnection) checkout(managedConnectionFactory,m_auth,info);
+		} catch (PoolException e) {
+			throw new UUIDResourceException(logger,"UUID_POOL_EXCEPTION",null,e);
+		}
+		
+       	// get connection
+        return mc.getConnection(null, info);
+	}
+	
+	/**
+	 * @see com.sybase.bpe.pool.MinMaxObjPool#getUserIdentifiedObject(Object, Object, Object)
+	 */
+	protected ObjPoolObject getUserIdentifiedObject(
+		Object factory,
+		Object auth,
+		Object objSpec)
+		throws PoolException {
+			
+		Object ret = null;
+		
+		validateArgs(factory,auth,objSpec);
+		
+		try {
+			ret = ((UUIDManagedConnectionFactory)factory).matchManagedConnections((HashSet)pool,(Subject)auth,(ConnectionRequestInfo)objSpec);
+			
+			// if a matching object is found in the pool
+			if ( ret != null ) {
+				if ( !(ret instanceof ObjPoolObject) || !(ret instanceof UUIDManagedConnection)) {
+					PoolException pe = new PoolException("UUID_UNKOWN_OBJECT",null);
+					pe.log(logger,Level.SEVERE);
+					throw pe;
+				}
+				
+				// Register myself to receive connection events
+				((UUIDManagedConnection)ret).addConnectionEventListener(this); 
+			}
+			
+		} catch (ResourceException e) {
+			PoolException pe = new PoolException("UUID_RESOURCE_EXCEPTION",null,e);
+			pe.log(logger,Level.SEVERE);
+			throw pe;
+		}
+		
+				
+		return (ObjPoolObject)ret;
+	}
+
+	/**
+	 * @see com.sybase.bpe.pool.SimpleObjPool#checkinPoolObject(ObjPoolObject)
+	 */
+	protected void checkinPoolObject(ObjPoolObject o) throws PoolException {
+		pool.add(o);
+	}
+
+	/**
+	 * @see com.sybase.bpe.pool.SimpleObjPool#checkoutPoolObject(ObjPoolObject)
+	 */
+	protected void checkoutPoolObject(ObjPoolObject o) throws PoolException {
+		pool.remove(o);
+	}
+
+	/**
+	 * @see com.sybase.bpe.pool.SimpleObjPool#createObjPoolObject(Object, Object, Object)
+	 */
+	protected ObjPoolObject createObjPoolObject(
+		Object factory,
+		Object auth,
+		Object objectSpec)
+		throws PoolException {
+			
+		Object ret = null;
+		
+		validateArgs(factory,auth,objectSpec);
+			
+		try {
+			ret = ((UUIDManagedConnectionFactory)factory).createManagedConnection((Subject)auth,(ConnectionRequestInfo)objectSpec);
+		} catch (ResourceException e) {
+			PoolException pe = new PoolException("UUID_RESOURCE_EXCEPTION",null,e);
+			pe.log(logger,Level.SEVERE);
+			throw pe;
+		}
+		
+		return (ObjPoolObject)ret;
+	}
+
+	/**
+	 * @see javax.resource.spi.ConnectionEventListener#connectionClosed(javax.resource.spi.ConnectionEvent)
+	 */
+	public void connectionClosed(ConnectionEvent arg0) {
+		ManagedConnection mc = (ManagedConnection)arg0.getSource();
+		mc.removeConnectionEventListener(this);
+		try {
+			checkin((ObjPoolObject)mc);
+		} catch (PoolException e) {}
+	}
+
+	/**
+	 * @see javax.resource.spi.ConnectionEventListener#localTransactionStarted(javax.resource.spi.ConnectionEvent)
+	 */
+	public void localTransactionStarted(ConnectionEvent arg0) {
+	}
+
+	/**
+	 * @see javax.resource.spi.ConnectionEventListener#localTransactionCommitted(javax.resource.spi.ConnectionEvent)
+	 */
+	public void localTransactionCommitted(ConnectionEvent arg0) {
+	}
+
+	/**
+	 * @see javax.resource.spi.ConnectionEventListener#localTransactionRolledback(javax.resource.spi.ConnectionEvent)
+	 */
+	public void localTransactionRolledback(ConnectionEvent arg0) {
+	}
+
+	/**
+	 * @see javax.resource.spi.ConnectionEventListener#connectionErrorOccurred(javax.resource.spi.ConnectionEvent)
+	 */
+	public void connectionErrorOccurred(ConnectionEvent arg0) {
+	}
+	      
+	private void validateArgs(Object factory, Object auth, Object objectSpec) throws PoolException {
+		if ( (factory != null) && !(factory instanceof UUIDManagedConnectionFactory )) {
+			PoolException pe = new PoolException("UUID_CAST_EXCEPTION",new Object[] {"pool factory","UUIDManagedConnectionFactory"});
+			pe.log(logger,Level.SEVERE);
+			throw pe;
+		}
+		if ( (auth != null) && !(auth instanceof Subject)) {
+			PoolException pe = new PoolException("UUID_CAST_EXCEPTION",new Object[] {"pool auth","Subject"});
+			pe.log(logger,Level.SEVERE);
+			throw pe;
+		}
+		if ( (objectSpec != null) && !(objectSpec instanceof ConnectionRequestInfo)) {
+			PoolException pe = new PoolException("UUID_CAST_EXCEPTION",new Object[] {"pool objectSpec","ConnectionRequestInfo"}); 
+			pe.log(logger,Level.SEVERE);
+			throw pe;
+		}			
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionMetadata.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionMetadata.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionMetadata.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionMetadata.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,66 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+import javax.resource.ResourceException;
+import javax.resource.cci.ConnectionMetaData;
+
+
+/**
+ * 
+ * This is metadata is very static and I don't think anyone really cares about
+ * the type of UUID implementation.
+ * <BR>
+ * If someone really really wants to know what the implementation looks like
+ * we can go back and add in some code that gets the name of the UUID 
+ * implementation from the UUIDManagedConnection.
+ * 
+ * @author waterman
+ *
+ */
+public class UUIDConnectionMetadata implements ConnectionMetaData {
+	
+	public UUIDConnectionMetadata() {
+	}
+
+	/**
+	 * Not really that interesting
+	 */
+	public String getEISProductName() throws ResourceException {
+        return "UUID Service";
+	}
+
+	/**
+	 * Not really that interesting 
+	 */
+	public String getEISProductVersion() throws ResourceException {
+		return "Version 1.0";
+	}
+
+	/**
+	 * No user name defined 
+	 */
+	public String getUserName() throws ResourceException {
+		return "";
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionSpec.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionSpec.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionSpec.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDConnectionSpec.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,42 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+
+import javax.resource.cci.ConnectionSpec;
+import javax.resource.spi.ConnectionRequestInfo;
+
+/**
+ * There isn't any connection information needed. Clients should not be concerned
+ * with acquiring a specific connection.
+ * 
+ * @author waterman
+ *
+ */
+public class UUIDConnectionSpec
+	implements ConnectionRequestInfo, ConnectionSpec {
+
+	public UUIDConnectionSpec() {
+	}
+
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDEventListener.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDEventListener.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDEventListener.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDEventListener.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,113 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Apr 24, 2003
+ *
+ */
+package com.sybase.bpe.uuid.connector;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.resource.spi.ConnectionEvent;
+import javax.resource.spi.ConnectionEventListener;
+import javax.resource.spi.ManagedConnection;
+
+	/**
+	 * This is a helper class to the UUIDManagedConnection
+	 *
+	 * The connector architecture provides an event callback mechanism that
+	 * enables an application server to receive notifications from a
+	 * ManagedConnection instance.
+	 *
+	 * @author Lance Waterman
+	 */
+
+public class UUIDEventListener  {
+
+		private Vector listeners;
+		private ManagedConnection mc;
+
+		UUIDEventListener(ManagedConnection mc) {
+			listeners = new Vector();
+			this.mc = mc;
+		}
+
+		void sendEvent(int eventType, Exception ex,
+									  Object connectionHandle) {
+			// The vector is cloned because the act of sending an event (i.e. close )
+			// to the ConnectionManager may cause the ConnectionManager to ask to
+			// be removed from the list and thus cause a failsafe error on the listener
+			// iterator.
+			
+			Vector list = new Vector(listeners);
+			ConnectionEvent ce = null;
+			if (ex == null) {
+				ce = new ConnectionEvent(mc, eventType);
+			} else {
+				ce = new ConnectionEvent(mc, eventType, ex);
+			}
+			if (connectionHandle != null) {
+				ce.setConnectionHandle(connectionHandle);
+			}
+
+			Iterator iter = list.iterator();
+			while (iter.hasNext()) {
+			
+				ConnectionEventListener l = (ConnectionEventListener) iter.next();
+
+				switch (eventType) {
+				case ConnectionEvent.CONNECTION_CLOSED:
+					l.connectionClosed(ce);
+					break;
+				case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
+					l.localTransactionStarted(ce);
+					break;
+				case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
+					l.localTransactionCommitted(ce);
+					break;
+				case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
+					l.localTransactionRolledback(ce);
+					break;
+				case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
+					l.connectionErrorOccurred(ce);
+					break;
+				default:
+					throw new IllegalArgumentException("Illegal eventType: " +
+													   eventType);
+				}
+			}
+		}
+
+
+		void addConnectorListener(ConnectionEventListener l) {
+			if (listeners.contains(l) == false) {
+			   listeners.addElement(l);
+			}
+		}
+
+		void removeConnectorListener(ConnectionEventListener l) {
+			listeners.removeElement(l);
+		}
+	}
+
+

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnection.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnection.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnection.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnection.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,202 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+import java.io.PrintWriter;
+import java.util.logging.Logger;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionEventListener;
+import javax.resource.spi.ConnectionRequestInfo;
+import javax.resource.spi.LocalTransaction;
+import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionMetaData;
+import javax.security.auth.Subject;
+import javax.transaction.xa.XAResource;
+
+import com.sybase.bpe.pool.ObjPoolObject;
+import com.sybase.bpe.util.BPEProperties;
+import com.sybase.bpe.uuid.UUIDService;
+import com.sybase.bpe.uuid.connector.service.UUIDServiceFactory;
+
+/**
+ * @author waterman
+ *
+ */
+public class UUIDManagedConnection implements ManagedConnection, ObjPoolObject {
+	
+	public UUIDManagedConnection(	Subject subject,
+									ConnectionRequestInfo info,
+									BPEProperties props) {
+//		this.subject = subject;
+//		this.info = info;
+//		this.props = props;
+		this.listener = new UUIDEventListener(this);
+		
+		try {
+			service = UUIDServiceFactory.createUUIDService(props);
+		} catch (UUIDResourceException e) {
+			// do nothing
+		}
+	}
+	
+	/**
+	 * This method creates a UUIDConnection
+	 */
+	public Object getConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo)
+		throws ResourceException {
+			return new UUIDConnection(this);
+	}
+
+	/**
+	 * This method destroys all the contents
+	 */
+	public void destroy() throws ResourceException {
+			destroyed = true;
+	}
+
+	/**
+	 * This method cleans up the contents
+	 */
+	public void cleanup() throws ResourceException {
+
+	}
+
+	/**
+	 * Associate Connection is not supported
+	 */
+	public void associateConnection(Object connection) throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"associateConnection"});
+	}
+
+	/**
+	 * No connection event listener is defined
+	 */
+	public void addConnectionEventListener(ConnectionEventListener eventListener) {		
+		listener.addConnectorListener(eventListener);
+	}
+
+	/**
+	 * No connection event listener is defined
+	 */
+	public void removeConnectionEventListener(ConnectionEventListener eventListener) {		
+		listener.removeConnectorListener(eventListener);
+	}
+
+	/**
+	 * XSResource is not supported
+	 */
+	public XAResource getXAResource() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"getXAResource()"});
+	}
+
+	/**
+	 * Local Transaction is not supported
+	 */
+	public LocalTransaction getLocalTransaction() throws ResourceException {
+		throw new UUIDNotSupportedException(logger,"UUID_NOT_SUPPORTED",new Object[] {"getLocalTransaction()"});	}
+
+	/**
+	 * This method gets the managed connection metadata
+	 */
+	public ManagedConnectionMetaData getMetaData() throws ResourceException {
+		if (destroyed == true) {
+			// already destroyed, throw exception
+			throw new IllegalStateException();
+		}
+		return new UUIDManagedConnectionMetadata();
+	}
+
+	/**
+	 * This method records the log writer
+	 */
+	public void setLogWriter(PrintWriter out) throws ResourceException {
+		if (destroyed == true) {
+			// already destroyed, throw exception
+			throw new IllegalStateException();
+		}
+		logWriter = out;
+	}
+
+	/**
+	 * This method returns the recorded log writer
+	 */
+	public PrintWriter getLogWriter() throws ResourceException {
+		if (destroyed == true) {
+			// already destroyed, throw exception
+			throw new IllegalStateException();
+		}
+		return logWriter;
+	}
+
+	void sendEvent(int eventType, Exception ex, Object connectionHandle) {
+		listener.sendEvent(eventType,ex,connectionHandle);
+	}
+	
+	String getUUID() throws ResourceException {
+		//if ( service == null ) {
+		//	service = UUIDServiceFactory.createUUIDService(props);
+		//}
+		
+		return service.getUUID();
+	}
+
+	//****** Methods for ObjPoolObject are implemented for a non-managed enviornment	
+	
+	/**
+	 * @see com.sybase.bpe.pool.ObjPoolObject#afterObjPoolObjectCheckin()
+	 */
+	public void afterObjPoolObjectCheckin() {
+	}
+
+	/**
+	 * @see com.sybase.bpe.pool.ObjPoolObject#beforeObjPoolObjectCheckout()
+	 */
+	public void beforeObjPoolObjectCheckout() {
+	}
+
+	/**
+	 * @see com.sybase.bpe.pool.ObjPoolObject#deleteObjPoolObject()
+	 */
+	public void deleteObjPoolObject() {
+	}
+
+	/**
+	 * @see com.sybase.bpe.pool.ObjPoolObject#isObjPoolObjectValid()
+	 */
+	public boolean isObjPoolObjectValid() {
+		return true;
+	}
+
+	
+	private UUIDEventListener listener;
+	private PrintWriter logWriter;
+	private boolean destroyed = false;
+//	private ConnectionRequestInfo info;
+//	private Subject subject;
+//	private BPEProperties props;
+	private UUIDService service;
+	
+	private static Logger logger = 
+				Logger.getLogger(UUIDManagedConnection.class.getName());
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionFactory.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionFactory.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionFactory.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionFactory.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,146 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+import java.io.PrintWriter;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+import javax.resource.spi.ConnectionRequestInfo;
+import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionFactory;
+import javax.security.auth.Subject;
+
+import com.sybase.bpe.pool.PoolException;
+import com.sybase.bpe.util.BPEProperties;
+
+/**
+ * Creates a managed connection.
+ * 
+ * @author waterman
+ *
+ */
+public class UUIDManagedConnectionFactory
+	implements ManagedConnectionFactory {
+	
+	static final long serialVersionUID = 8493648046931230724L;
+
+	/**
+	 * This method creates a managed connection connection factory
+	 */
+	public Object createConnectionFactory(ConnectionManager connectionManager)
+		throws ResourceException {
+		return new UUIDConnectionFactory(this, connectionManager);
+	}
+
+	/**
+	 * This method creates an unmanaged connection factory
+	 */
+	public Object createConnectionFactory() throws ResourceException {
+		UUIDConnectionManager uuidCM = null;
+		
+		// Initialize the pool with a default connection spec and we are not using authorization credentials
+		try {
+			uuidCM = new UUIDConnectionManager(this);
+		} catch (PoolException e) {
+			throw new UUIDResourceException(logger,"UUID_POOL_EXCEPTION",null,e);
+		}
+		
+		return new UUIDConnectionFactory(this, uuidCM);
+	}
+
+	/**
+	 * This method creats the managed connection
+	 */
+	public ManagedConnection createManagedConnection(
+		Subject subject,
+		ConnectionRequestInfo info)
+		throws ResourceException {
+		return new UUIDManagedConnection(subject, info, props);
+	}
+
+	/**
+	 * This method checks for matched managed connection
+	 */
+	public ManagedConnection matchManagedConnections(
+		Set connections,
+		Subject subject,
+		ConnectionRequestInfo info)
+		throws ResourceException {
+		ManagedConnection retValue = null;
+		Iterator iter = connections.iterator();
+        while (iter.hasNext()) {
+            Object obj = iter.next();
+            if (obj instanceof UUIDManagedConnection) {
+       			retValue = (ManagedConnection)(obj);
+       			break;
+            }
+        }
+        return retValue;
+	}
+
+	/**
+	 * This method records the log writer
+	 */
+	public void setLogWriter(PrintWriter out) throws ResourceException {
+		logWriter = out;
+	}
+
+	/**
+	 * This method returns the recorded log writer
+	 */
+	public PrintWriter getLogWriter() throws ResourceException {
+		return logWriter;
+	}
+	
+	/**
+	 * Called by the appserver if found in the RAR deploy descriptor. In
+	 * an unmanaged enviorn the client is required to set this property.
+	 */
+	public void setUUIDImplClass(String impl) {
+		props.setUUIDServiceClass(impl);
+	}
+	public String getUUIDImplClass() {
+		return props.getUUIDServiceClass();
+	}
+
+	/**
+	 * Called by the appserver if found in the RAR deploy descriptor.  In
+	 * an unmanaged enviorn the client is required to set this property.
+	 */
+	public void setUUIDCacheSize(Integer size) {
+		props.setUUIDCacheSize(size.intValue());
+	}
+	public Integer getUUIDCacheSize() {
+		return new Integer(props.getUUIDCacheSize());
+	}
+	
+	private PrintWriter logWriter = null;
+	private BPEProperties props = new BPEProperties();
+
+	private static Logger logger = 
+				Logger.getLogger(UUIDManagedConnectionFactory.class.getName());	
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionMetadata.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionMetadata.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionMetadata.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDManagedConnectionMetadata.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,65 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector;
+
+import javax.resource.ResourceException;
+import javax.resource.spi.ManagedConnectionMetaData;
+
+/**
+ * @author waterman
+ *
+ */
+public class UUIDManagedConnectionMetadata
+	implements ManagedConnectionMetaData {
+		
+	public UUIDManagedConnectionMetadata() {
+	}
+
+	/**
+	 * Not really that interesting
+	 */
+	public String getEISProductName() throws ResourceException {
+		return "UUID Service";
+	}
+
+	/**
+	 * Not really that interesting
+	 */
+	public String getEISProductVersion() throws ResourceException {
+		return "Version 1.0";
+	}
+
+	/**
+	 * No max connections defined
+	 */
+	public int getMaxConnections() throws ResourceException {
+		return 0;
+	}
+
+	/**
+	 * No user name defined for metadata
+	 */
+	public String getUserName() throws ResourceException {
+		return "";
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDNotSupportedException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDNotSupportedException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDNotSupportedException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDNotSupportedException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,65 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Apr 25, 2003
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.uuid.connector;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.resource.NotSupportedException;
+
+import com.sybase.bpe.lang.ResourceGetter;
+
+/**
+ * @author waterman
+ *
+ */
+public class UUIDNotSupportedException extends NotSupportedException {
+
+	static final long serialVersionUID = 8801184414027429794L;
+
+	/**
+	 * @param arg0
+	 * @param arg1
+	 */
+	public UUIDNotSupportedException(String arg0, String arg1) {
+		super(ResourceGetter.getFormatted(arg0, null), arg1);
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public UUIDNotSupportedException(String arg0) {
+		super(ResourceGetter.getFormatted(arg0, null));
+	}
+	
+	public UUIDNotSupportedException(Logger logger, String arg0, Object[] msgParams) {
+		super(ResourceGetter.getFormatted(arg0, msgParams));
+		logger.log(Level.SEVERE,getMessage(),this);
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDResourceException.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDResourceException.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDResourceException.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/UUIDResourceException.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,71 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Apr 25, 2003
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package com.sybase.bpe.uuid.connector;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.resource.ResourceException;
+
+import com.sybase.bpe.lang.ResourceGetter;
+
+/**
+ * @author waterman
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class UUIDResourceException extends ResourceException {
+
+	static final long serialVersionUID = -3370056251816748202L;
+	/**
+	 * @param arg0
+	 * @param arg1
+	 */
+	public UUIDResourceException(String arg0, String arg1) {
+		super(ResourceGetter.getFormatted(arg0, null), arg1);
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public UUIDResourceException(String arg0) {
+		super(ResourceGetter.getFormatted(arg0, null));
+	}
+
+	public UUIDResourceException(Logger logger, String arg0, Object[] msgParams) {
+		super(ResourceGetter.getFormatted(arg0, msgParams));
+		logger.log(Level.SEVERE,getMessage(),this);
+	}
+	
+	public UUIDResourceException(Logger logger, String arg0, Object[] msgParams, Exception e) {
+		super(ResourceGetter.getFormatted(arg0, msgParams));
+		logger.log(Level.SEVERE,getMessage(),this);
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/GenUUIDService.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/GenUUIDService.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/GenUUIDService.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/GenUUIDService.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,93 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector.service;
+
+
+//import java.util.logging.Logger;
+
+// removed jug.jar import org.doomdark.uuid.UUIDGenerator;
+
+import com.sybase.bpe.util.BPEProperties;
+import com.sybase.bpe.uuid.UUIDService;
+/**
+ * @author charper
+ *
+ * Uses the native Linux implementation of uuidgen.
+ * 
+ */
+public class GenUUIDService implements UUIDService {
+	
+//	private static Logger logger = 
+//			Logger.getLogger(GenUUIDService.class.getName());
+		
+// removed jug.jar	private static UUIDGenerator g = UUIDGenerator.getInstance();
+	
+	private int UUID_CACHE_SIZE;
+	private int cacheCount = 0;
+	
+	private String[] uuidCache;
+
+	public GenUUIDService() {
+		
+	}
+	
+	public void init(BPEProperties props) {
+		UUID_CACHE_SIZE = props.getUUIDCacheSize();
+		uuidCache = uuidgen(UUID_CACHE_SIZE);
+		cacheCount = UUID_CACHE_SIZE;
+	}
+
+	/**
+	 * @see com.sybase.bpe.uuid.UUIDService#getUUID()
+	 */
+	public synchronized String getUUID() {
+		
+		cacheCount--;
+		
+		if ( cacheCount < 0 ) {
+			uuidCache = uuidgen(UUID_CACHE_SIZE);
+			cacheCount = UUID_CACHE_SIZE-1;
+		}
+		
+		return uuidCache[cacheCount];
+		
+	}
+	
+	private String[] uuidgen(int nmbr)
+  {
+	String[] uuids = new String[nmbr];
+
+	   for (int i = 0; i < nmbr; ++i) {
+		// TODO: Cory - add a service property to set the ethernet address
+		// we are using a random one right now
+// removed jug.jar		 uuids[i] = g.generateTimeBasedUUID(g.getDummyAddress()).toString();
+	}
+	return uuids;
+	}
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.uuid.UUIDService#close()
+	 */
+	public void close() {
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/LinUUIDService.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/LinUUIDService.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/LinUUIDService.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/LinUUIDService.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,103 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector.service;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.sybase.bpe.util.BPEProperties;
+import com.sybase.bpe.uuid.UUIDService;
+/**
+ * @author charper
+ *
+ * Uses the native Linux implementation of uuidgen.
+ * 
+ */
+public class LinUUIDService implements UUIDService {
+	
+private static Logger logger = 
+		Logger.getLogger(LinUUIDService.class.getName());
+	
+	private int UUID_CACHE_SIZE;
+	private int cacheCount = 0;
+	
+	private String[] uuidCache;
+
+	public LinUUIDService() {
+		
+	}
+	
+	public void init(BPEProperties props) {
+		UUID_CACHE_SIZE = props.getUUIDCacheSize();
+		uuidCache = uuidgen(UUID_CACHE_SIZE);
+		cacheCount = UUID_CACHE_SIZE;
+	}
+
+	/**
+	 * @see com.sybase.bpe.uuid.UUIDService#getUUID()
+	 */
+	public String getUUID() {
+		
+		cacheCount--;
+		
+		if ( cacheCount < 0 ) {
+			uuidCache = uuidgen(UUID_CACHE_SIZE);
+			cacheCount = UUID_CACHE_SIZE-1;
+		}
+		
+		return uuidCache[cacheCount];
+		
+	}
+	
+	private String[] uuidgen(int nmbr)
+  {
+	String[] uuids = new String[nmbr];
+
+	try
+	{
+	  Runtime r = Runtime.getRuntime();
+
+	   for (int i = 0; i < nmbr; ++i) {
+		  Process p = r.exec("uuidgen -t");
+		  BufferedReader x = new BufferedReader(new InputStreamReader(p.getInputStream()));
+		  uuids[i] = x.readLine();
+	}
+	} catch (IOException ex)
+	{
+	  logger.log(Level.SEVERE,"",ex);
+	  throw new RuntimeException(ex.getMessage());
+	}
+
+	return uuids;
+  }
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.uuid.UUIDService#close()
+	 */
+	public void close() {
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/UUIDServiceFactory.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/UUIDServiceFactory.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/UUIDServiceFactory.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/UUIDServiceFactory.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,62 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector.service;
+
+import java.util.logging.Logger;
+
+import com.sybase.bpe.util.BPEProperties;
+import com.sybase.bpe.uuid.UUIDService;
+import com.sybase.bpe.uuid.connector.UUIDResourceException;
+
+/**
+ * @author waterman
+ *
+ * Instantiates an implementation of UUIDService
+ *
+ */
+public class UUIDServiceFactory {
+
+private static Logger logger =
+		Logger.getLogger(UUIDServiceFactory.class.getName());
+
+	public static UUIDService createUUIDService(BPEProperties p)
+		throws UUIDResourceException {
+
+		UUIDService uuidService = null;
+		Class uuidClass = null;
+		try {
+			// load the UUIDGen implementation
+			uuidClass = Thread.currentThread().getContextClassLoader().loadClass( p.getUUIDServiceClass() );
+			// try to instantiate the UUIDGen subclass
+			uuidService = (UUIDService) uuidClass.newInstance();
+			uuidService.init(p);
+
+		} catch (ClassNotFoundException e) {
+			throw new UUIDResourceException(logger,"UUID_CLASS_NOT_FOUND",new Object [] {p.getUUIDServiceClass()},e);
+		} catch (Exception e) {
+			throw new UUIDResourceException(logger,"UUID_UNKNOWN_EXCEPTION",null,e);
+		}
+
+		return uuidService;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/WinUUIDService.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/WinUUIDService.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/WinUUIDService.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/uuid/connector/service/WinUUIDService.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,103 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+package com.sybase.bpe.uuid.connector.service;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.sybase.bpe.util.BPEProperties;
+import com.sybase.bpe.uuid.UUIDService;
+/**
+ * @author waterman
+ *
+ * Uses the native Win implementation of uuidgen.
+ * 
+ */
+public class WinUUIDService implements UUIDService {
+	
+private static Logger logger = 
+		Logger.getLogger(WinUUIDService.class.getName());
+	
+	private int UUID_CACHE_SIZE;
+	private int cacheCount = 0;
+	
+	private String[] uuidCache;
+
+	public WinUUIDService() {
+		
+	}
+	
+	public void init(BPEProperties props) {
+		UUID_CACHE_SIZE = props.getUUIDCacheSize();
+		uuidCache = uuidgen(UUID_CACHE_SIZE);
+		cacheCount = UUID_CACHE_SIZE;
+	}
+
+	/**
+	 * @see com.sybase.bpe.uuid.UUIDService#getUUID()
+	 */
+	public String getUUID() {
+		
+		cacheCount--;
+		
+		if ( cacheCount < 0 ) {
+			uuidCache = uuidgen(UUID_CACHE_SIZE);
+			cacheCount = UUID_CACHE_SIZE-1;
+		}
+		
+		return uuidCache[cacheCount];
+		
+	}
+	
+	private String[] uuidgen(int nmbr)
+  {
+	String[] uuids = new String[nmbr];
+
+	try
+	{
+	  Runtime r = Runtime.getRuntime();
+	  Process p = r.exec("uuidgen -n" + nmbr);
+	  BufferedReader x = new BufferedReader(new InputStreamReader(p.getInputStream()));
+
+	  for (int i = 0; i < nmbr; ++i)
+		uuids[i] = x.readLine();
+	}
+	catch (IOException ex)
+	{
+	  logger.log(Level.SEVERE,"",ex);
+	  throw new RuntimeException(ex.getMessage());
+	}
+
+	return uuids;
+  }
+
+	/* (non-Javadoc)
+	 * @see com.sybase.bpe.uuid.UUIDService#close()
+	 */
+	public void close() {
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEAction.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEAction.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEAction.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEAction.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,108 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 11, 2003
+ *
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+/**
+ * @author waterman
+ *
+ */
+public class BPEAction implements ExtensibilityElement, Serializable {
+	
+    static final long serialVersionUID = 9046821010230644881L;
+
+	private static final String BPEIMPL_DEFAULT = "com.sybase.bpe.action.bpel.ExternalServiceAction";
+
+	protected QName elementType = ExtentionConstants.Q_ELEM_BPE_ACTION;
+	protected Boolean required;
+	protected String implementation;
+	protected String bpeImplementation;
+	protected Properties props = new Properties(); 	
+	
+	/**
+	 * 
+	 */
+	public BPEAction() {
+		super();
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getElementType()
+	 */
+	public QName getElementType() {
+		return elementType;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
+	 */
+	public Boolean getRequired() {
+		return required;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName)
+	 */
+	public void setElementType(QName elementType) {
+		this.elementType = elementType;
+
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean)
+	 */
+	public void setRequired(Boolean required) {
+		this.required = required;
+	}
+	
+	public String getImplementation() {
+		return implementation;
+	}
+	public void setImplementation(String impl) {
+		implementation = impl;
+	}
+	
+	public String getBPEImplementation() {
+		return ( bpeImplementation != null ) ? bpeImplementation : BPEIMPL_DEFAULT;
+	}
+	public void setBPEImplementation(String impl) {
+		bpeImplementation = impl;
+	}
+	
+	public void addProp(String name, String value) {
+		props.setProperty(name,value);
+	}
+
+	public Properties getProps() {
+		return props;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEActionSerializer.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEActionSerializer.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEActionSerializer.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEActionSerializer.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,152 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 11, 2003
+ *
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.util.Enumeration;
+import java.util.Map;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.ExtensionDeserializer;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.extensions.ExtensionSerializer;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+import com.ibm.wsdl.Constants;
+import com.ibm.wsdl.util.xml.DOMUtils;
+
+/**
+ * @author waterman
+ *
+ */
+public class BPEActionSerializer
+	implements ExtensionDeserializer, ExtensionSerializer, Serializable {
+	
+    static final long serialVersionUID = -1551950594407801089L;
+
+	/**
+	 * 
+	 */
+	public BPEActionSerializer() {
+		super();
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensionDeserializer#unmarshall(java.lang.Class, javax.xml.namespace.QName, org.w3c.dom.Element, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry)
+	 */
+	public ExtensibilityElement unmarshall(
+		Class parentType,
+		QName elementType,
+		Element el,
+		Definition def,
+		ExtensionRegistry extReg)
+		throws WSDLException {
+			BPEAction bpeAction = (BPEAction)extReg.createExtension(parentType,elementType);
+			NamedNodeMap attrs = el.getAttributes();
+			for ( int i = 0; i < attrs.getLength(); i++ ) {
+				Node node = attrs.item(i);
+				
+				if ( node.getLocalName().equals(ExtentionConstants.ATTR_IMPL) ) {
+					bpeAction.setImplementation(node.getNodeValue());
+				} else {
+					if ( node.getLocalName().equals(ExtentionConstants.ATTR_BPEIMPL) ) {
+						bpeAction.setBPEImplementation(node.getNodeValue());
+					} else {
+						bpeAction.addProp(node.getLocalName(),node.getNodeValue());
+					}
+				}
+			}
+
+			String requiredStr = DOMUtils.getAttributeNS(el,
+														 Constants.NS_URI_WSDL,
+														 Constants.ATTR_REQUIRED);
+
+			if (requiredStr != null ) bpeAction.setRequired(new Boolean(requiredStr));
+
+			return bpeAction;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensionSerializer#marshall(java.lang.Class, javax.xml.namespace.QName, javax.wsdl.extensions.ExtensibilityElement, java.io.PrintWriter, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry)
+	 */
+	public void marshall(
+		Class parentType,
+		QName elementType,
+		ExtensibilityElement extension,
+		PrintWriter pw,
+		Definition def,
+		ExtensionRegistry extReg)
+		throws WSDLException {
+
+			if (extension != null)
+			{
+				BPEAction bpeAction = (BPEAction)extension;
+
+				
+			  String tagName =
+				DOMUtils.getQualifiedValue(ExtentionConstants.NS_URI_BPE,
+										   ExtentionConstants.ELEM_ACTION,
+										   def);
+
+			  pw.print("      <" + tagName);
+
+			  DOMUtils.printAttribute(ExtentionConstants.ATTR_IMPL,
+									  bpeAction.getImplementation(),
+									  pw);
+			  DOMUtils.printAttribute(ExtentionConstants.ATTR_BPEIMPL,
+			  						  bpeAction.getBPEImplementation(),
+			  						  pw);
+			  
+			 Enumeration enumeration = bpeAction.getProps().elements();
+			 Map.Entry prop = null;
+			 while ( enumeration.hasMoreElements() ) {
+			 	prop = (Map.Entry)enumeration.nextElement();
+			 	DOMUtils.printAttribute((String)prop.getKey(),(String)prop.getValue(),pw);
+			 }
+
+			  Boolean required = bpeAction.getRequired();
+
+			  if (required != null)
+			  {
+				DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED,
+												 required.toString(),
+												 def,
+												 pw);
+			  }
+
+			  pw.println("/>");
+			}
+
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFault.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFault.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFault.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFault.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,101 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on:	Nov 8, 2003
+ * Project:		BPEELocal
+ * Package:		com.sybase.bpe.wsdl.extensions 
+ * Author:		waterman	
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.Serializable;
+
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+/**
+ * 
+ * 
+ * @author waterman
+ */
+public class BPEFault implements ExtensibilityElement, Serializable {
+	
+    static final long serialVersionUID = 7837613923902638628L;
+
+	protected QName elementType = ExtentionConstants.Q_ELEM_BPE_FAULT;
+	protected Boolean required;
+	protected String part;
+	protected String type;
+
+	/**
+	 * 
+	 */
+	public BPEFault() {
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getElementType()
+	 */
+	public QName getElementType() {
+		return elementType;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
+	 */
+	public Boolean getRequired() {
+		return required;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName)
+	 */
+	public void setElementType(QName arg0) {
+		elementType = arg0;
+
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean)
+	 */
+	public void setRequired(Boolean arg0) {
+		required = arg0;
+
+	}
+	
+	public String getPart() {
+		return part;
+	}
+	
+	public void setPart(String arg0) {
+		part = arg0;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String arg0) {
+		type = arg0;
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFaultSerializer.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFaultSerializer.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFaultSerializer.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEFaultSerializer.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,132 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on:	Nov 8, 2003
+ * Project:		BPEELocal
+ * Package:		com.sybase.bpe.wsdl.extensions 
+ * Author:		waterman	
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.PrintWriter;
+import java.io.Serializable;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.ExtensionDeserializer;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.extensions.ExtensionSerializer;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+import com.ibm.wsdl.Constants;
+import com.ibm.wsdl.util.xml.DOMUtils;
+
+/**
+ * 
+ * 
+ * @author waterman
+ */
+public class BPEFaultSerializer
+	implements ExtensionDeserializer, ExtensionSerializer, Serializable {
+
+    static final long serialVersionUID = 5006828221540538355L;
+    
+	/**
+	 * 
+	 */
+	public BPEFaultSerializer() {
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensionDeserializer#unmarshall(java.lang.Class, javax.xml.namespace.QName, org.w3c.dom.Element, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry)
+	 */
+	public ExtensibilityElement unmarshall(
+		Class parentType,
+		QName elementType,
+		Element el,
+		Definition def,
+		ExtensionRegistry extReg)
+		throws WSDLException {
+			BPEFault bpeFault = (BPEFault)extReg.createExtension(parentType,elementType);
+			String type = DOMUtils.getAttribute(el,ExtentionConstants.ATTR_TYPE);
+			String part = DOMUtils.getAttribute(el, ExtentionConstants.ATTR_PART);
+
+			String requiredStr = DOMUtils.getAttributeNS(el,
+														 Constants.NS_URI_WSDL,
+														 Constants.ATTR_REQUIRED);
+
+			if (part != null) bpeFault.setPart(part);
+			if (type != null) bpeFault.setType(type);
+			if (requiredStr != null ) bpeFault.setRequired(new Boolean(requiredStr));
+
+			return bpeFault;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensionSerializer#marshall(java.lang.Class, javax.xml.namespace.QName, javax.wsdl.extensions.ExtensibilityElement, java.io.PrintWriter, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry)
+	 */
+	public void marshall(
+		Class parentType,
+		QName elementType,
+		ExtensibilityElement extension,
+		PrintWriter pw,
+		Definition def,
+		ExtensionRegistry extReg)
+		throws WSDLException {
+			if (extension != null)
+			{
+				BPEFault bpeFault = (BPEFault)extension;
+
+				
+			  String tagName =
+				DOMUtils.getQualifiedValue(ExtentionConstants.NS_URI_BPE,
+										   ExtentionConstants.ELEM_FAULT,
+										   def);
+
+			  pw.print("      <" + tagName);
+
+			  DOMUtils.printAttribute(ExtentionConstants.ATTR_PART,
+									  bpeFault.getPart(),
+									  pw);
+			  DOMUtils.printAttribute(ExtentionConstants.ATTR_TYPE,
+									  bpeFault.getType(),
+									  pw);
+
+			  Boolean required = bpeFault.getRequired();
+
+			  if (required != null)
+			  {
+				DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED,
+												 required.toString(),
+												 def,
+												 pw);
+			  }
+
+			  pw.println("/>");
+			}
+
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInput.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInput.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInput.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInput.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,100 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on:	Nov 8, 2003
+ * Project:		BPEELocal
+ * Package:		com.sybase.bpe.wsdl.extensions 
+ * Author:		waterman	
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.Serializable;
+
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+/**
+ * 
+ * 
+ * @author waterman
+ */
+public class BPEInput implements ExtensibilityElement, Serializable {
+    
+	static final long serialVersionUID = -4259390068360861061L;
+
+	protected QName elementType = ExtentionConstants.Q_ELEM_BPE_INPUT;
+	protected Boolean required;
+	protected String part;
+	protected String type;
+
+	/**
+	 * 
+	 */
+	public BPEInput() {
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getElementType()
+	 */
+	public QName getElementType() {
+		return elementType;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
+	 */
+	public Boolean getRequired() {
+		return required;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName)
+	 */
+	public void setElementType(QName arg0) {
+		elementType = arg0;
+
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean)
+	 */
+	public void setRequired(Boolean arg0) {
+		required = arg0;
+
+	}
+	
+	public String getPart() {
+		return part;
+	}
+	
+	public void setPart(String arg0) {
+		part = arg0;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String arg0) {
+		type = arg0;
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInputSerializer.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInputSerializer.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInputSerializer.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPEInputSerializer.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,132 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on:	Nov 8, 2003
+ * Project:		BPEELocal
+ * Package:		com.sybase.bpe.wsdl.extensions 
+ * Author:		waterman	
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.PrintWriter;
+import java.io.Serializable;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.ExtensionDeserializer;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.extensions.ExtensionSerializer;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+import com.ibm.wsdl.Constants;
+import com.ibm.wsdl.util.xml.DOMUtils;
+
+/**
+ * 
+ * 
+ * @author waterman
+ */
+public class BPEInputSerializer
+	implements ExtensionDeserializer, ExtensionSerializer, Serializable {
+
+    static final long serialVersionUID = 1445485300871213788L;
+    
+	/**
+	 * 
+	 */
+	public BPEInputSerializer() {
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensionDeserializer#unmarshall(java.lang.Class, javax.xml.namespace.QName, org.w3c.dom.Element, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry)
+	 */
+	public ExtensibilityElement unmarshall(
+		Class parentType,
+		QName elementType,
+		Element el,
+		Definition def,
+		ExtensionRegistry extReg)
+		throws WSDLException {
+			BPEInput bpeInput = (BPEInput)extReg.createExtension(parentType,elementType);
+			String type = DOMUtils.getAttribute(el,ExtentionConstants.ATTR_TYPE);
+			String part = DOMUtils.getAttribute(el, ExtentionConstants.ATTR_PART);
+
+			String requiredStr = DOMUtils.getAttributeNS(el,
+														 Constants.NS_URI_WSDL,
+														 Constants.ATTR_REQUIRED);
+
+			if (part != null) bpeInput.setPart(part);
+			if (type != null)  bpeInput.setType(type);
+			if (requiredStr != null ) bpeInput.setRequired(new Boolean(requiredStr));
+
+			return bpeInput;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensionSerializer#marshall(java.lang.Class, javax.xml.namespace.QName, javax.wsdl.extensions.ExtensibilityElement, java.io.PrintWriter, javax.wsdl.Definition, javax.wsdl.extensions.ExtensionRegistry)
+	 */
+	public void marshall(
+		Class parentType,
+		QName elementType,
+		ExtensibilityElement extension,
+		PrintWriter pw,
+		Definition def,
+		ExtensionRegistry extReg)
+		throws WSDLException {
+			if (extension != null)
+			{
+				BPEInput bpeInput = (BPEInput)extension;
+
+				
+			  String tagName =
+				DOMUtils.getQualifiedValue(ExtentionConstants.NS_URI_BPE,
+										   ExtentionConstants.ELEM_INPUT,
+										   def);
+
+			  pw.print("      <" + tagName);
+
+			  DOMUtils.printAttribute(ExtentionConstants.ATTR_PART,
+									  bpeInput.getPart(),
+									  pw);
+			  DOMUtils.printAttribute(ExtentionConstants.ATTR_TYPE,
+									  bpeInput.getType(),
+									  pw);
+
+			  Boolean required = bpeInput.getRequired();
+
+			  if (required != null)
+			  {
+				DOMUtils.printQualifiedAttribute(Constants.Q_ATTR_REQUIRED,
+												 required.toString(),
+												 def,
+												 pw);
+			  }
+
+			  pw.println("/>");
+			}
+
+	}
+
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELProperty.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELProperty.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELProperty.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELProperty.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,97 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 11, 2003
+ *
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.Serializable;
+
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+/**
+ * @author waterman
+ *
+ */
+public class BPELProperty implements ExtensibilityElement, Serializable {
+	
+    static final long serialVersionUID = 2364709458840923166L;
+
+	protected QName elementType = ExtentionConstants.Q_ELEM_BPEL_PROPERTY;
+	protected Boolean required;
+	protected String name;
+	protected QName nameType; 	
+	
+	/**
+	 * 
+	 */
+	public BPELProperty() {
+		super();
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getElementType()
+	 */
+	public QName getElementType() {
+		return elementType;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
+	 */
+	public Boolean getRequired() {
+		return required;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName)
+	 */
+	public void setElementType(QName elementType) {
+		this.elementType = elementType;
+
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean)
+	 */
+	public void setRequired(Boolean required) {
+		this.required = required;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public QName getType() {
+		return nameType;
+	}
+	
+	public void setType(QName type) {
+		nameType = type;
+	}
+}

Added: incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELPropertyAlias.java
URL: http://svn.apache.org/viewcvs/incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELPropertyAlias.java?rev=381686&view=auto
==============================================================================
--- incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELPropertyAlias.java (added)
+++ incubator/ode/scratch/bpe/src/main/java/com/sybase/bpe/wsdl/extensions/BPELPropertyAlias.java Tue Feb 28 08:02:48 2006
@@ -0,0 +1,125 @@
+/*
+* Confidential property of Sybase, Inc.
+*
+* Copyright 1987 - 2006.
+*
+* Sybase, Inc. All rights reserved.
+*
+* Unpublished rights reserved under U.S. copyright laws.
+*
+* This software contains confidential and trade secret information
+* of Sybase, Inc. Use, duplication or disclosure of the software and
+* documentation by the U.S. Government is subject to restrictions
+* set forth in a license agreement between the Government and Sybase,
+* Inc. or other written agreement specifying the Government's rights
+* to use the software and any applicable FAR provisions, for example,
+* FAR 52.227-19.
+*
+* Sybase, Inc. One Sybase Drive, Dublin, CA 94568, USA
+*
+* http://www.sybase.com
+*/
+/*
+ * Created on Aug 11, 2003
+ *
+ */
+package com.sybase.bpe.wsdl.extensions;
+
+import java.io.Serializable;
+
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+/**
+ * @author waterman
+ *
+ */
+public class BPELPropertyAlias implements ExtensibilityElement, Serializable {
+	
+    static final long serialVersionUID = -1823713536887966476L;
+
+	protected QName elementType = ExtentionConstants.Q_ELEM_BPEL_PROPERTY_ALIAS;
+	protected Boolean required;
+	protected QName propertyName;
+	protected QName messageType;
+	protected String part;
+	protected String query; 
+	protected String nsMap;
+
+	/**
+	 * 
+	 */
+	public BPELPropertyAlias() {
+		super();
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getElementType()
+	 */
+	public QName getElementType() {
+		return elementType;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#getRequired()
+	 */
+	public Boolean getRequired() {
+		return required;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setElementType(javax.xml.namespace.QName)
+	 */
+	public void setElementType(QName elementType) {
+		this.elementType = elementType;
+	}
+
+	/**
+	 * @see javax.wsdl.extensions.ExtensibilityElement#setRequired(java.lang.Boolean)
+	 */
+	public void setRequired(Boolean required) {
+ 		this.required = required;
+	}
+
+	public QName getPropertyName() {
+		return propertyName;
+	}
+	
+	public void setPropertyName(QName propertyName) {
+		this.propertyName = propertyName;
+	}
+	
+	public QName getMessageType() {
+		return messageType;
+	}
+	
+	public void setMessageType(QName messageType) {
+		this.messageType = messageType;
+	}
+	
+	public String getPart() {
+		return part;
+	}
+
+	public void setPart(String part) {
+		this.part = part;
+	}
+	
+	public String getQuery() {
+		return query;
+	}
+	
+	public void setQuery(String query) {
+		this.query = query;
+	}
+	
+	public String getNamspaceMap()
+	{
+		return nsMap;
+	}
+	
+	public void setNamespaceMap(String map)
+	{
+		nsMap = map;
+	}
+}