You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by th...@apache.org on 2005/09/14 13:52:32 UTC
svn commit: r280830 - in
/webservices/kandula/trunk/java/src/org/apache/kandula: context/
context/at/ coordinator/ coordinator/at/ coordinator/ba/
coordinator/context/ participant/standalone/ storage/ utility/ wscoor/
Author: thilina
Date: Wed Sep 14 04:52:02 2005
New Revision: 280830
URL: http://svn.apache.org/viewcvs?rev=280830&view=rev
Log:
Moving the context package to a higher level
Added:
webservices/kandula/trunk/java/src/org/apache/kandula/context/
webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContext.java
webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContextImpl.java
webservices/kandula/trunk/java/src/org/apache/kandula/context/ContextFactory.java
webservices/kandula/trunk/java/src/org/apache/kandula/context/Participant.java
webservices/kandula/trunk/java/src/org/apache/kandula/context/at/
webservices/kandula/trunk/java/src/org/apache/kandula/context/at/ATActivityContext.java
Removed:
webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/context/
Modified:
webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Coordinator.java
webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/CoordinatorUtils.java
webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Registerable.java
webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATCoordinator.java
webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATSubCoordinator.java
webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/ba/BACoordinator.java
webservices/kandula/trunk/java/src/org/apache/kandula/participant/standalone/TransactionManager.java
webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis1Store.java
webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis2Store.java
webservices/kandula/trunk/java/src/org/apache/kandula/storage/SimpleStore.java
webservices/kandula/trunk/java/src/org/apache/kandula/storage/Store.java
webservices/kandula/trunk/java/src/org/apache/kandula/utility/KandulaListener.java
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationCoordinatorPortTypeRawXMLStub.java
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java
webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java
Added: webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContext.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContext.java?rev=280830&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContext.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContext.java Wed Sep 14 04:52:02 2005
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.
+ *
+ */
+package org.apache.kandula.context;
+
+import java.util.Iterator;
+
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.kandula.KandulaException;
+import org.apache.kandula.typemapping.CoordinationContext;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+public interface ActivityContext {
+
+ public abstract EndpointReference addParticipant(EndpointReference participantEPR, String protocol) throws KandulaException;
+
+ public abstract Iterator getRegisteredParticipants(String protocol);
+
+ public abstract Iterator getAllParticipants();
+
+ public abstract int getStatus();
+
+ public abstract void setStatus(int value);
+
+ public abstract void lock();
+
+ public abstract void unlock();
+
+ public abstract void setProperty(Object key, Object value);
+
+ public abstract Object getProperty(Object key);
+
+ public abstract CoordinationContext getCoordinationContext();
+
+ public abstract void setCoordinationContext(CoordinationContext context);
+
+}
\ No newline at end of file
Added: webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContextImpl.java?rev=280830&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContextImpl.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/context/ActivityContextImpl.java Wed Sep 14 04:52:02 2005
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.
+ *
+ */
+package org.apache.kandula.context;
+
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.addressing.AnyContentType;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.kandula.Status.CoordinatorStatus;
+import org.apache.kandula.typemapping.CoordinationContext;
+import org.apache.kandula.utility.EndpointReferenceFactory;
+import org.apache.kandula.utility.KandulaUtils;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+public abstract class ActivityContextImpl implements ActivityContext {
+
+ private HashMap propertyBag;
+
+ protected String activityID;
+
+ private int status = CoordinatorStatus.STATUS_NONE;
+
+ private boolean locked = false;
+
+ protected CoordinationContext coordinationContext = null;
+
+ protected ActivityContextImpl() {
+ propertyBag = new HashMap();
+ }
+
+ public ActivityContextImpl(String coordinationType) {
+ propertyBag = new HashMap();
+ activityID = KandulaUtils.getRandomStringOf18Characters();
+ coordinationContext = CoordinationContext.Factory.newInstance();
+ coordinationContext.setActivityID(activityID);
+ EndpointReference registrationEpr = EndpointReferenceFactory
+ .getInstance().getRegistrationEndpoint(activityID);
+ AnyContentType referenceProp = new AnyContentType();
+ referenceProp.addReferenceValue(new QName(
+ "http://webservice.apache.org/~thilina", "myapp", "ID"),
+ activityID);
+ registrationEpr.setReferenceProperties(referenceProp);
+ coordinationContext.setRegistrationService(registrationEpr);
+ coordinationContext.setCoordinationType(coordinationType);
+ }
+
+ public CoordinationContext getCoordinationContext() {
+ return coordinationContext;
+ }
+
+ public void setCoordinationContext(CoordinationContext context) {
+ this.coordinationContext = context;
+ }
+
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(int value) {
+ status = value;
+ }
+
+ public synchronized void lock() {
+ if (locked) {
+ while (locked) {
+ try {
+ wait();
+ } catch (InterruptedException ex) {
+ // ignore
+ }
+ if (status == CoordinatorStatus.STATUS_NONE)
+ throw new IllegalStateException();
+ }
+ }
+
+ locked = true;
+ }
+
+ public synchronized void unlock() {
+ if (!locked)
+ throw new IllegalStateException();
+ locked = false;
+ notify();
+ }
+
+ public void setProperty(Object key, Object value) {
+ propertyBag.put(key, value);
+
+ }
+
+ public Object getProperty(Object key) {
+ return propertyBag.get(key);
+ }
+}
\ No newline at end of file
Added: webservices/kandula/trunk/java/src/org/apache/kandula/context/ContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/context/ContextFactory.java?rev=280830&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/context/ContextFactory.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/context/ContextFactory.java Wed Sep 14 04:52:02 2005
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.
+ *
+ */
+package org.apache.kandula.context;
+
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.kandula.KandulaException;
+import org.apache.kandula.context.at.ATActivityContext;
+import org.apache.kandula.typemapping.CoordinationContext;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+public class ContextFactory {
+ private static ContextFactory instance = new ContextFactory();
+
+ public static ContextFactory getInstance() {
+ return instance;
+ }
+
+ public ActivityContext createActivity(String protocol)
+ throws KandulaException {
+ if (org.apache.kandula.Constants.WS_AT.equalsIgnoreCase(protocol)) {
+ return new ATActivityContext();
+ } else {
+ throw new KandulaException(new IllegalArgumentException(
+ "Unsupported Protocol Type"));
+ }
+ }
+
+ public ActivityContext createActivity(String protocol,
+ EndpointReference activationEPR) throws KandulaException {
+ if (org.apache.kandula.Constants.WS_AT.equalsIgnoreCase(protocol)) {
+ return new ATActivityContext(activationEPR);
+ } else {
+ throw new KandulaException(new IllegalArgumentException(
+ "Unsupported Protocol Type"));
+ }
+ }
+
+ public ActivityContext createActivity(CoordinationContext context)
+ throws KandulaException {
+ if (org.apache.kandula.Constants.WS_AT.equalsIgnoreCase(context
+ .getCoordinationType())) {
+ return new ATActivityContext(context);
+ } else {
+ throw new KandulaException(new IllegalArgumentException(
+ "Unsupported Protocol Type"));
+ }
+ }
+}
\ No newline at end of file
Added: webservices/kandula/trunk/java/src/org/apache/kandula/context/Participant.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/context/Participant.java?rev=280830&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/context/Participant.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/context/Participant.java Wed Sep 14 04:52:02 2005
@@ -0,0 +1,54 @@
+ /*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.
+ *
+ */
+package org.apache.kandula.context;
+
+import org.apache.axis2.addressing.EndpointReference;
+
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ *
+ * Used to store the details about the participant & to store the runtime status
+ * of Participants
+ */
+public class Participant {
+ private EndpointReference epr;
+ private String protocol;
+ private int status;
+
+ /**
+ * @param epr
+ * @param protocol
+ * @param activityId
+ */
+ public Participant(EndpointReference epr, String protocol) {
+ super();
+ this.epr = epr;
+ this.protocol = protocol;
+ }
+
+ public void setStatus(int status)
+ {
+ this.status = status;
+ }
+
+ public int getStatus()
+ {
+ return status;
+ }
+
+
+}
\ No newline at end of file
Added: webservices/kandula/trunk/java/src/org/apache/kandula/context/at/ATActivityContext.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/context/at/ATActivityContext.java?rev=280830&view=auto
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/context/at/ATActivityContext.java (added)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/context/at/ATActivityContext.java Wed Sep 14 04:52:02 2005
@@ -0,0 +1,181 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * 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.
+ *
+ */
+package org.apache.kandula.context.at;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import org.apache.kandula.Constants;
+import org.apache.kandula.KandulaException;
+import org.apache.kandula.context.ActivityContext;
+import org.apache.kandula.context.ActivityContextImpl;
+import org.apache.kandula.context.Participant;
+import org.apache.kandula.typemapping.CoordinationContext;
+import org.apache.kandula.utility.EndpointReferenceFactory;
+import org.apache.kandula.utility.KandulaUtils;
+import org.apache.axis2.addressing.EndpointReference;
+/**
+ * @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
+ */
+public class ATActivityContext extends ActivityContextImpl implements
+ ActivityContext {
+
+ private int preparingParticipantsCount = 0;
+
+ private boolean subOrdinate = false;
+
+ private Hashtable volatileParticipantsTable;
+
+ private Hashtable durableParticipantsTable;
+
+ private boolean subVolatileRegistered = false;
+
+ private boolean subDurableRegistered = false;
+
+ private EndpointReference parentEPR;
+
+ public static String REQUESTER_ID = "requesterID";
+
+ public static String ACTIVATION_EPR = "activationEPR";
+
+
+ /**
+ * Used when creating new activities
+ */
+ public ATActivityContext() {
+ super(Constants.WS_AT);
+ volatileParticipantsTable = new Hashtable();
+ durableParticipantsTable = new Hashtable();
+ }
+
+ /**
+ * @param context
+ * To be used when coordinator is used as a sub ordinate to an another cooordinator
+ */
+ public ATActivityContext(CoordinationContext context) {
+ subOrdinate = true;
+ parentEPR = context.getRegistrationService();
+// context.setRegistrationService(EndpointReferenceFactory.getInstance()
+// .getRegistrationEndpoint());
+ volatileParticipantsTable = new Hashtable();
+ durableParticipantsTable = new Hashtable();
+ setCoordinationContext(context);
+ }
+ /**
+ * @param id
+ * To be used when using as the requester
+ */
+ public ATActivityContext(EndpointReference activationEPR)
+ {
+ super();
+ this.setProperty(REQUESTER_ID, KandulaUtils.getRandomStringOf18Characters());
+ this.setProperty(ACTIVATION_EPR, activationEPR);
+ }
+
+ /**
+ * @param participantEPR
+ * @param protocol
+ * @return Coordinator protocol service.
+ * @throws KandulaException
+ */
+ public EndpointReference addParticipant(EndpointReference participantEPR, String protocol)
+ throws KandulaException {
+ if (Constants.WS_AT_VOLATILE2PC.equals(protocol)) {
+ addVolatileParticipant(participantEPR);
+ return EndpointReferenceFactory.getInstance().get2PCEndpoint(this.activityID);
+ } else if (Constants.WS_AT_DURABLE2PC.equals(protocol)) {
+ addDurableParticipant(participantEPR);
+ return EndpointReferenceFactory.getInstance().get2PCEndpoint(this.activityID);
+ }else if (Constants.WS_AT_COMPLETION.equals(protocol))
+ {
+ //TODO keep track of requesters
+ return EndpointReferenceFactory.getInstance().getCompletionEndpoint(this.activityID);
+ }
+ else
+ {
+ throw new KandulaException("UnSupported Protocol");
+ }
+ }
+
+ public void addVolatileParticipant(EndpointReference participantEPR)
+ throws KandulaException {
+ if (volatileParticipantsTable.contains(participantEPR))
+ throw new KandulaException("wscoor:Already Registered");
+ volatileParticipantsTable.put(participantEPR, new Participant(
+ participantEPR, Constants.WS_AT_VOLATILE2PC));
+
+ }
+
+ public void addDurableParticipant(EndpointReference participantEPR)
+ throws KandulaException {
+ if (durableParticipantsTable.contains(participantEPR))
+ throw new KandulaException("wscoor:Already Registered");
+ durableParticipantsTable.put(participantEPR, new Participant(
+ participantEPR, Constants.WS_AT_DURABLE2PC));
+
+ }
+
+ public Iterator getRegisteredParticipants(String protocol) {
+ if (protocol.equals(Constants.WS_AT_VOLATILE2PC)) {
+ return volatileParticipantsTable.values().iterator();
+ } else if (protocol.equals(Constants.WS_AT_DURABLE2PC)) {
+ return durableParticipantsTable.values().iterator();
+ }
+ return null;
+ }
+
+ public Iterator getAllParticipants() {
+ LinkedList list = new LinkedList(volatileParticipantsTable.values());
+ list.addAll(durableParticipantsTable.values());
+ return list.iterator();
+ }
+
+ public void countPreparing() {
+ preparingParticipantsCount++;
+
+ }
+
+ public boolean hasMorePreparing() {
+ return (preparingParticipantsCount > 0);
+ }
+
+ public boolean getSubVolatileRegistered() {
+
+ return subVolatileRegistered;
+ }
+
+ public boolean getSubDurableRegistered() {
+ return subDurableRegistered;
+ }
+
+ public void setSubVolatileRegistered(boolean value) {
+ subVolatileRegistered = value;
+ }
+
+ public void setSubDurableRegistered(boolean value) {
+ subDurableRegistered = value;
+ }
+ // public void prepared(Participant participant)
+ // {
+ // if (participant.getStatus()==Status.ParticipantStatus.STATUS_ABORTED)
+ // {
+ // //throw new
+ // }
+ // }
+
+}
\ No newline at end of file
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Coordinator.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Coordinator.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Coordinator.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Coordinator.java Wed Sep 14 04:52:02 2005
@@ -19,8 +19,8 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.kandula.KandulaException;
import org.apache.kandula.coordinator.at.ATCoordinator;
-import org.apache.kandula.coordinator.context.ActivityContext;
-import org.apache.kandula.coordinator.context.ContextFactory;
+import org.apache.kandula.context.ActivityContext;
+import org.apache.kandula.context.ContextFactory;
import org.apache.kandula.storage.StorageFactory;
import org.apache.kandula.storage.Store;
import org.apache.kandula.typemapping.CoordinationContext;
@@ -33,6 +33,8 @@
public class Coordinator {
private Store store;
+ //till we be able to use refrence propoerties correctly
+ public static String ACTIVITY_ID;
public Coordinator() {
StorageFactory storageFactory = StorageFactory.getInstance();
@@ -56,13 +58,14 @@
ContextFactory factory = ContextFactory.getInstance();
ActivityContext context = factory.createActivity(coordinationType);
context.getCoordinationContext().setExpires(expires);
+ ACTIVITY_ID = context.getCoordinationContext().getActivityID();
store.putContext(context.getCoordinationContext().getActivityID(),
context);
return context;
}
/**
- * @param Coordinationcontext
+ * @param CoordinationContext
* @return the interposed Coordination Context created
*
* Participants decided to use this Coordinator as a interposed
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/CoordinatorUtils.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/CoordinatorUtils.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/CoordinatorUtils.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/CoordinatorUtils.java Wed Sep 14 04:52:02 2005
@@ -22,7 +22,7 @@
import java.security.NoSuchAlgorithmException;
import java.util.Random;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Registerable.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Registerable.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Registerable.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/Registerable.java Wed Sep 14 04:52:02 2005
@@ -1,7 +1,7 @@
package org.apache.kandula.coordinator;
import org.apache.axis2.addressing.EndpointReference;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
import org.apache.kandula.KandulaException;
/**
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATCoordinator.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATCoordinator.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATCoordinator.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATCoordinator.java Wed Sep 14 04:52:02 2005
@@ -25,8 +25,8 @@
import org.apache.kandula.Status.CoordinatorStatus;
import org.apache.kandula.coordinator.CoordinatorUtils;
import org.apache.kandula.coordinator.Registerable;
-import org.apache.kandula.coordinator.context.ActivityContext;
-import org.apache.kandula.coordinator.context.at.ATActivityContext;
+import org.apache.kandula.context.ActivityContext;
+import org.apache.kandula.context.at.ATActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATSubCoordinator.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATSubCoordinator.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATSubCoordinator.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/at/ATSubCoordinator.java Wed Sep 14 04:52:02 2005
@@ -19,8 +19,8 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.kandula.Constants;
import org.apache.kandula.KandulaException;
-import org.apache.kandula.coordinator.context.ActivityContext;
-import org.apache.kandula.coordinator.context.at.ATActivityContext;
+import org.apache.kandula.context.ActivityContext;
+import org.apache.kandula.context.at.ATActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/ba/BACoordinator.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/ba/BACoordinator.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/ba/BACoordinator.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/coordinator/ba/BACoordinator.java Wed Sep 14 04:52:02 2005
@@ -16,7 +16,7 @@
*/
package org.apache.kandula.coordinator.ba;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/participant/standalone/TransactionManager.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/participant/standalone/TransactionManager.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/participant/standalone/TransactionManager.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/participant/standalone/TransactionManager.java Wed Sep 14 04:52:02 2005
@@ -18,12 +18,11 @@
import java.rmi.RemoteException;
-import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.kandula.KandulaException;
-import org.apache.kandula.coordinator.context.ActivityContext;
-import org.apache.kandula.coordinator.context.ContextFactory;
-import org.apache.kandula.coordinator.context.at.ATActivityContext;
+import org.apache.kandula.context.ActivityContext;
+import org.apache.kandula.context.ContextFactory;
+import org.apache.kandula.context.at.ATActivityContext;
import org.apache.kandula.storage.StorageFactory;
import org.apache.kandula.storage.Store;
import org.apache.kandula.utility.EndpointReferenceFactory;
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis1Store.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis1Store.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis1Store.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis1Store.java Wed Sep 14 04:52:02 2005
@@ -16,7 +16,7 @@
*/
package org.apache.kandula.storage;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
@@ -24,7 +24,7 @@
public class Axis1Store implements Store {
/* (non-Javadoc)
- * @see org.apache.kandula.storage.Store#putContext(java.lang.String, org.apache.kandula.coordinator.context.CoordinationContext)
+ * @see org.apache.kandula.storage.Store#putContext(java.lang.String, org.apache.kandula.context.CoordinationContext)
*/
public void putContext(Object id, ActivityContext context) {
// TODO Auto-generated method stub
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis2Store.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis2Store.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis2Store.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/storage/Axis2Store.java Wed Sep 14 04:52:02 2005
@@ -16,7 +16,7 @@
*/
package org.apache.kandula.storage;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
@@ -24,7 +24,7 @@
public class Axis2Store implements Store{
/* (non-Javadoc)
- * @see org.apache.kandula.storage.Store#putContext(java.lang.String, org.apache.kandula.coordinator.context.CoordinationContext)
+ * @see org.apache.kandula.storage.Store#putContext(java.lang.String, org.apache.kandula.context.CoordinationContext)
*/
public void putContext(Object id, ActivityContext context) {
// TODO Auto-generated method stub
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/storage/SimpleStore.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/storage/SimpleStore.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/storage/SimpleStore.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/storage/SimpleStore.java Wed Sep 14 04:52:02 2005
@@ -18,7 +18,7 @@
import java.util.HashMap;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
@@ -27,7 +27,7 @@
private HashMap contextMap;
/* (non-Javadoc)
- * @see org.apache.kandula.storage.Store#putContext(java.lang.String, org.apache.kandula.coordinator.context.ActivityContext)
+ * @see org.apache.kandula.storage.Store#putContext(java.lang.String, org.apache.kandula.context.ActivityContext)
*/
public SimpleStore()
{
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/storage/Store.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/storage/Store.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/storage/Store.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/storage/Store.java Wed Sep 14 04:52:02 2005
@@ -16,7 +16,7 @@
*/
package org.apache.kandula.storage;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
/**
* @author <a href="mailto:thilina@opensource.lk"> Thilina Gunarathne </a>
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/utility/KandulaListener.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/utility/KandulaListener.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/utility/KandulaListener.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/utility/KandulaListener.java Wed Sep 14 04:52:02 2005
@@ -110,7 +110,7 @@
}
public String getHost() throws UnknownHostException {
- return "http://"+InetAddress.getLocalHost().getHostAddress() + ":" + SERVER_PORT
+ return "http://"+InetAddress.getLocalHost().getHostAddress() + ":" + 5060
+ "/axis2/services/";
}
}
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationCoordinatorPortTypeRawXMLStub.java Wed Sep 14 04:52:02 2005
@@ -112,7 +112,7 @@
AnyContentType refProperties = new AnyContentType();
refProperties.addReferenceValue(new QName(
"http://ws.apache.org/kandula", "id"), id);
- replyToEpr.setReferenceProperties(refProperties);
+ replyToEpr.setReferenceParameters(refProperties);
// messageSender.
messageSender.setReplyTo(replyToEpr);
messageSender.setTo(this.toEPR);
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationPortTypeRawXMLSkeleton.java Wed Sep 14 04:52:02 2005
@@ -5,7 +5,7 @@
import org.apache.axis2.om.OMElement;
import org.apache.kandula.KandulaException;
import org.apache.kandula.coordinator.Coordinator;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
/**
* Auto generated java skeleton for the service by the Axis code generator
@@ -15,7 +15,7 @@
/**
* Auto generated method signature
- *@param requestDoc
+ *@param requestElement
* @throws KandulaException
*/
public OMElement CreateCoordinationContextOperation(
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/ActivationRequesterPortTypeRawXMLSkeleton.java Wed Sep 14 04:52:02 2005
@@ -1,10 +1,8 @@
package org.apache.kandula.wscoor;
-import javax.xml.namespace.QName;
-
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.om.OMElement;
-import org.apache.kandula.coordinator.context.ActivityContext;
+import org.apache.kandula.context.ActivityContext;
import org.apache.kandula.participant.standalone.TransactionManager;
import org.apache.kandula.storage.StorageFactory;
import org.apache.kandula.typemapping.CoordinationContext;
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationCoordinatorPortTypeRawXMLStub.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationCoordinatorPortTypeRawXMLStub.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationCoordinatorPortTypeRawXMLStub.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationCoordinatorPortTypeRawXMLStub.java Wed Sep 14 04:52:02 2005
@@ -14,9 +14,6 @@
import org.apache.kandula.utility.KandulaListener;
import org.apache.kandula.utility.KandulaUtils;
-/*
- * Auto generated java implementation by the Axis code generator
- */
public class RegistrationCoordinatorPortTypeRawXMLStub extends
org.apache.axis2.clientapi.Stub {
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationPortTypeRawXMLSkeleton.java Wed Sep 14 04:52:02 2005
@@ -71,7 +71,7 @@
Coordinator coordinator = new Coordinator();
EndpointReference epr = coordinator.registerParticipant(
- TransactionManager.tempID, protocolIdentifier, participantEPR);
+ Coordinator.ACTIVITY_ID, protocolIdentifier, participantEPR);
System.out.println("visited registration skeleton");
return toOM(epr);
}
Modified: webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java?rev=280830&r1=280829&r2=280830&view=diff
==============================================================================
--- webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java (original)
+++ webservices/kandula/trunk/java/src/org/apache/kandula/wscoor/RegistrationRequesterPortTypeRawXMLSkeleton.java Wed Sep 14 04:52:02 2005
@@ -1,13 +1,7 @@
package org.apache.kandula.wscoor;
-import javax.xml.namespace.QName;
-
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.om.OMElement;
-import org.apache.kandula.coordinator.context.ActivityContext;
-import org.apache.kandula.participant.standalone.TransactionManager;
-import org.apache.kandula.storage.StorageFactory;
-import org.apache.kandula.typemapping.CoordinationContext;
/*
* Copyright 2004,2005 The Apache Software Foundation.
---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org