Hi Andreas/Ruwan,
Once you switch to Axis2 1.5, please apply the attached patch.
Thanks
Azeez
On Tue, Feb 24, 2009 at 4:55 PM, Afkham Azeez <[email protected]> wrote:
> I'll revert my commit to Synapse. You will see a build break. Then
> switch to Axis2 1.5 and the build failure should go away.
>
> Thanks
> Azeez
>
> On Thu, Feb 19, 2009 at 2:33 PM, Andreas Veithen
> <[email protected]> wrote:
>> The longer we wait for switching to the 1.5 branch, the more difficult
>> it will be, so we need to do this ASAP. An example of the issues we
>> will face: http://markmail.org/message/hyrlotomanmgrk5c
>>
>> Regards,
>>
>> Andreas
>>
>> On Thu, Feb 19, 2009 at 07:31, Asankha C. Perera <[email protected]> wrote:
>>> Hi Ruwan
>>>>
>>>> I think now it is the time to switch to the axis2 1.5 branch, figure out
>>>> any issues that we are facing with that branch and try to resolve them on
>>>> axis2 if there are any for getting ready to the synapse 1.3 release.
>>>>
>>>> So if there are no objections, I will switch the synapse axis2 version to
>>>> the axis2 1.5 branch.
>>>
>>> +1! Please go ahead...
>>>
>>> thanks
>>> asankha
>>>
>>> --
>>> Asankha C. Perera
>>> http://adroitlogic.org
>>>
>>> http://esbmagic.blogspot.com
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
>
> --
> Thanks
> Afkham Azeez
>
> Blog: http://afkham.org
> Developer Portal: http://www.wso2.org
> WSAS Blog: http://wso2wsas.blogspot.com
> Company: http://wso2.com
> GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
>
--
Thanks
Afkham Azeez
Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
Index: modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
===================================================================
--- modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java (revision 747347)
+++ modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java (working copy)
@@ -30,9 +30,9 @@
import org.apache.synapse.core.axis2.Axis2MessageContext;
import org.apache.synapse.mediators.AbstractMediator;
import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.clustering.state.Replicator;
+import org.apache.axis2.clustering.context.Replicator;
import org.apache.axis2.clustering.ClusteringFault;
-import org.apache.axis2.clustering.ClusteringAgent;
+import org.apache.axis2.clustering.ClusterManager;
import org.wso2.throttle.*;
@@ -120,9 +120,9 @@
//To ensure check for clustering environment only happens one time
if ((throttle == null && !isResponse) || (isResponse
&& concurrentAccessController == null)) {
- ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
- if (clusteringAgent != null &&
- clusteringAgent.getStateManager() != null) {
+ ClusterManager clusterManager = cc.getAxisConfiguration().getClusterManager();
+ if (clusterManager != null &&
+ clusterManager.getContextManager() != null) {
isClusteringEnable = true;
}
}
@@ -249,7 +249,7 @@
if (throttle != null && !isResponse && canAccess) {
canAccess = throttleByAccessRate(synCtx, axisMC, cc, synLog);
}
- // all the replication functionality of the access rate based throttling handles by itself
+ // all the replication functionality of the access rate based throttling handles by itself
// Just replicate the current state of ConcurrentAccessController
if (isClusteringEnable && concurrentAccessController != null) {
if (cc != null) {
@@ -274,7 +274,11 @@
handleException("Unable to find onAccept sequence with key : "
+ onAcceptSeqKey, synCtx);
}
- } else return onAcceptMediator == null || onAcceptMediator.mediate(synCtx);
+ } else if (onAcceptMediator != null) {
+ return onAcceptMediator.mediate(synCtx);
+ } else {
+ return true;
+ }
} else {
if (onRejectSeqKey != null) {
@@ -285,7 +289,11 @@
handleException("Unable to find onReject sequence with key : "
+ onRejectSeqKey, synCtx);
}
- } else return onRejectMediator != null && onRejectMediator.mediate(synCtx);
+ } else if (onRejectMediator != null) {
+ return onRejectMediator.mediate(synCtx);
+ } else {
+ return false;
+ }
}
synLog.traceOrDebug("End : Throttle mediator");
Index: modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java
===================================================================
--- modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java (revision 747347)
+++ modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java (working copy)
@@ -39,7 +39,7 @@
private static SampleAxis2ServerManager ourInstance = new SampleAxis2ServerManager();
- public final static int DEFAULT_PORT = 9000;
+ public static final int DEFAULT_PORT = 9000;
private ConfigurationContext configctx;
Index: modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
===================================================================
--- modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java (revision 747347)
+++ modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java (working copy)
@@ -21,7 +21,7 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.clustering.ClusteringFault;
-import org.apache.axis2.clustering.state.Replicator;
+import org.apache.axis2.clustering.context.Replicator;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.saaj.util.SAAJUtil;
import org.apache.synapse.ManagedLifecycle;
@@ -100,7 +100,6 @@
}
// if maxMessageSize is specified check for the message size before processing
-
if (maxMessageSize > 0) {
FixedByteArrayOutputStream fbaos = new FixedByteArrayOutputStream(maxMessageSize);
try {
Index: modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
===================================================================
--- modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java (revision 747347)
+++ modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java (working copy)
@@ -19,12 +19,18 @@
package org.apache.synapse.mediators.builtin;
-import org.apache.axis2.context.ConfigurationContext;
import org.apache.synapse.MessageContext;
import org.apache.synapse.SynapseLog;
+import org.apache.synapse.core.axis2.Axis2MessageContext;
import org.apache.synapse.endpoints.Endpoint;
+import org.apache.synapse.endpoints.SALoadbalanceEndpoint;
import org.apache.synapse.mediators.AbstractMediator;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.clustering.ClusterManager;
+import java.util.List;
+
/**
* SendMediator sends a message using specified semantics. If it contains an endpoint it will
* send the message to that endpoint. Once a message is sent to the endpoint further sending
@@ -56,12 +62,12 @@
if (synLog.isTraceOrDebugEnabled()) {
StringBuffer sb = new StringBuffer();
- sb.append("Sending ").append(synCtx.isResponse() ? "response" : "request").
- append(" message using implicit message properties..");
- sb.append("\nSending To: ").append(synCtx.getTo() != null ?
- synCtx.getTo().getAddress() : "null");
- sb.append("\nSOAPAction: ").append(synCtx.getWSAAction() != null ?
- synCtx.getWSAAction() : "null");
+ sb.append("Sending " + (synCtx.isResponse() ? "response" : "request")
+ + " message using implicit message properties..");
+ sb.append("\nSending To: " + (synCtx.getTo() != null ?
+ synCtx.getTo().getAddress() : "null"));
+ sb.append("\nSOAPAction: " + (synCtx.getWSAAction() != null ?
+ synCtx.getWSAAction() : "null"));
synLog.traceOrDebug(sb.toString());
}
Index: modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java
===================================================================
--- modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java (revision 747347)
+++ modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java (working copy)
@@ -18,9 +18,9 @@
*/
package org.apache.synapse.core.axis2;
-import org.apache.axis2.clustering.ClusteringAgent;
+import org.apache.axis2.clustering.ClusterManager;
+import org.apache.axis2.clustering.LoadBalanceEventHandler;
import org.apache.axis2.clustering.Member;
-import org.apache.axis2.clustering.management.GroupManagementAgent;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -38,7 +38,7 @@
private static final Log log = LogFactory.getLog(Axis2LoadBalanceMembershipHandler.class);
private String lbDomain;
- private GroupManagementAgent groupMgtAgent;
+ private LoadBalanceEventHandler lbEventHandler;
private ConfigurationContext configCtx;
private LoadbalanceAlgorithm algorithm;
@@ -59,15 +59,15 @@
this.configCtx = configCtx;
// The following code does the bridging between Axis2 and Synapse load balancing
- ClusteringAgent clusteringAgent = configCtx.getAxisConfiguration().getClusteringAgent();
- if(clusteringAgent == null){
+ ClusterManager clusterManager = configCtx.getAxisConfiguration().getClusterManager();
+ if(clusterManager == null){
String msg = "In order to enable load balancing across an Axis2 cluster, " +
"the cluster entry should be enabled in the axis2.xml file";
log.error(msg);
throw new SynapseException(msg);
}
- groupMgtAgent = clusteringAgent.getGroupManagementAgent(lbDomain);
- if(groupMgtAgent == null){
+ lbEventHandler = clusterManager.getLoadBalanceEventHandler(lbDomain);
+ if(lbEventHandler == null){
String msg =
"A LoadBalanceEventHandler has not been specified in the axis2.xml " +
"file for the domain " + lbDomain;
@@ -87,7 +87,7 @@
* @return The current member
*/
public Member getNextApplicationMember(AlgorithmContext context) {
- algorithm.setApplicationMembers(groupMgtAgent.getMembers());
+ algorithm.setApplicationMembers(lbEventHandler.getMembers());
return algorithm.getNextApplicationMember(context);
}
}
Index: modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
===================================================================
--- modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java (revision 747347)
+++ modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java (working copy)
@@ -19,23 +19,22 @@
package org.apache.synapse.endpoints;
+import org.apache.axis2.clustering.ClusterManager;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.transport.base.BaseConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.synapse.FaultHandler;
import org.apache.synapse.MessageContext;
import org.apache.synapse.SynapseConstants;
-import org.apache.synapse.FaultHandler;
import org.apache.synapse.SynapseException;
-import org.apache.synapse.commons.util.MBeanRegistrar;
import org.apache.synapse.audit.statistics.StatisticsReporter;
-import org.apache.axis2.transport.base.BaseConstants;
+import org.apache.synapse.commons.util.MBeanRegistrar;
import org.apache.synapse.core.axis2.Axis2MessageContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.clustering.ClusteringAgent;
import java.util.List;
import java.util.Stack;
-
/**
* An abstract base class for all Endpoint implementations
*/
@@ -133,8 +132,8 @@
public synchronized void init(ConfigurationContext cc) {
if (!initialized) {
// The check for clustering environment
- ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
- if (clusteringAgent != null && clusteringAgent.getStateManager() != null) {
+ ClusterManager clusterManager = cc.getAxisConfiguration().getClusterManager();
+ if (clusterManager != null && clusterManager.getContextManager() != null) {
isClusteringEnabled = Boolean.TRUE;
} else {
isClusteringEnabled = Boolean.FALSE;
@@ -193,7 +192,7 @@
/**
* Is this a leaf level endpoint? or parent endpoint that has children?
- * @return true if this is a leaf endpoint
+ * @return
*/
public boolean isLeafEndpoint() {
return children == null || children.size() == 0;
Index: modules/core/src/main/java/org/apache/synapse/util/Replicator.java
===================================================================
--- modules/core/src/main/java/org/apache/synapse/util/Replicator.java (revision 747347)
+++ modules/core/src/main/java/org/apache/synapse/util/Replicator.java (working copy)
@@ -49,7 +49,7 @@
}
configCtx.removePropertyNonReplicable(key);
- org.apache.axis2.clustering.state.Replicator.replicate(
+ org.apache.axis2.clustering.context.Replicator.replicate(
configCtx, new String[]{key});
if (log.isDebugEnabled()) {
@@ -81,7 +81,7 @@
}
configCtx.setNonReplicableProperty(key, value);
- org.apache.axis2.clustering.state.Replicator.replicate(
+ org.apache.axis2.clustering.context.Replicator.replicate(
configCtx, new String[]{key});
if (log.isDebugEnabled()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]