synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: svn commit: r744950 - in /synapse/trunk/java/modules: core/src/main/java/org/apache/synapse/core/axis2/ core/src/main/java/org/apache/synapse/endpoints/ core/src/main/java/org/apache/synapse/mediators/builtin/ core/src/main/java/org/apache/synaps
Date Wed, 18 Feb 2009 09:40:59 GMT
-1 for this change at this time. The reason is that the corresponding
change in Axis2 is only in trunk, i.e. will go only into the next
release after Axis2 1.5. On the other hand we need to do a Synapse
release based on 1.5. Either this change needs to be reverted or the
change in Axis2 needs to be merged into the 1.5 branch.

In any case, we should change the dependencies of Synapse trunk to
Axis2 1.5 and Axiom 1.2.8 so that we can make sure that we will be
able to do a release based on these versions.

Andreas

On Mon, Feb 16, 2009 at 16:57,  <azeez@apache.org> wrote:
> Author: azeez
> Date: Mon Feb 16 15:57:48 2009
> New Revision: 744950
>
> URL: http://svn.apache.org/viewvc?rev=744950&view=rev
> Log:
> Changes to reflect clustering API enhancements
>
>
> Modified:
>    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java
>    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
>    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
>    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
>    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
>    synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
>    synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java
>
> Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java
> URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java?rev=744950&r1=744949&r2=744950&view=diff
> ==============================================================================
> --- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java
(original)
> +++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2LoadBalanceMembershipHandler.java
Mon Feb 16 15:57:48 2009
> @@ -18,9 +18,9 @@
>  */
>  package org.apache.synapse.core.axis2;
>
> -import org.apache.axis2.clustering.ClusterManager;
> -import org.apache.axis2.clustering.LoadBalanceEventHandler;
> +import org.apache.axis2.clustering.ClusteringAgent;
>  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 LoadBalanceEventHandler lbEventHandler;
> +    private GroupManagementAgent groupMgtAgent;
>     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
> -        ClusterManager clusterManager = configCtx.getAxisConfiguration().getClusterManager();
> -        if(clusterManager == null){
> +        ClusteringAgent clusteringAgent = configCtx.getAxisConfiguration().getClusteringAgent();
> +        if(clusteringAgent == 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);
>         }
> -        lbEventHandler = clusterManager.getLoadBalanceEventHandler(lbDomain);
> -        if(lbEventHandler == null){
> +        groupMgtAgent = clusteringAgent.getGroupManagementAgent(lbDomain);
> +        if(groupMgtAgent == 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(lbEventHandler.getMembers());
> +        algorithm.setApplicationMembers(groupMgtAgent.getMembers());
>         return algorithm.getNextApplicationMember(context);
>     }
>  }
>
> Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
> URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java?rev=744950&r1=744949&r2=744950&view=diff
> ==============================================================================
> --- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
(original)
> +++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AbstractEndpoint.java
Mon Feb 16 15:57:48 2009
> @@ -30,7 +30,7 @@
>  import org.apache.commons.logging.Log;
>  import org.apache.commons.logging.LogFactory;
>  import org.apache.axis2.context.ConfigurationContext;
> -import org.apache.axis2.clustering.ClusterManager;
> +import org.apache.axis2.clustering.ClusteringAgent;
>
>  import javax.management.MBeanServer;
>  import javax.management.ObjectName;
> @@ -136,8 +136,8 @@
>     public synchronized void init(ConfigurationContext cc) {
>         if (!initialized) {
>             // The check for clustering environment
> -            ClusterManager clusterManager = cc.getAxisConfiguration().getClusterManager();
> -            if (clusterManager != null && clusterManager.getContextManager()
!= null) {
> +            ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
> +            if (clusteringAgent != null && clusteringAgent.getStateManager()
!= null) {
>                 isClusteringEnabled = Boolean.TRUE;
>             } else {
>                 isClusteringEnabled = Boolean.FALSE;
>
> Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
> URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java?rev=744950&r1=744949&r2=744950&view=diff
> ==============================================================================
> --- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
(original)
> +++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CacheMediator.java
Mon Feb 16 15:57:48 2009
> @@ -21,7 +21,7 @@
>
>  import org.apache.axis2.AxisFault;
>  import org.apache.axis2.clustering.ClusteringFault;
> -import org.apache.axis2.clustering.context.Replicator;
> +import org.apache.axis2.clustering.state.Replicator;
>  import org.apache.axis2.context.ConfigurationContext;
>  import org.apache.axis2.saaj.util.SAAJUtil;
>  import org.apache.synapse.ManagedLifecycle;
>
> Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
> URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java?rev=744950&r1=744949&r2=744950&view=diff
> ==============================================================================
> --- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
(original)
> +++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/SendMediator.java
Mon Feb 16 15:57:48 2009
> @@ -19,17 +19,11 @@
>
>  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
>
> Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
> URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/Replicator.java?rev=744950&r1=744949&r2=744950&view=diff
> ==============================================================================
> --- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
(original)
> +++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/util/Replicator.java
Mon Feb 16 15:57:48 2009
> @@ -49,7 +49,7 @@
>                 }
>
>                 configCtx.removePropertyNonReplicable(key);
> -                org.apache.axis2.clustering.context.Replicator.replicate(
> +                org.apache.axis2.clustering.state.Replicator.replicate(
>                         configCtx, new String[]{key});
>
>                 if (log.isDebugEnabled()) {
> @@ -81,7 +81,7 @@
>                 }
>
>                 configCtx.setNonReplicableProperty(key, value);
> -                org.apache.axis2.clustering.context.Replicator.replicate(
> +                org.apache.axis2.clustering.state.Replicator.replicate(
>                         configCtx, new String[]{key});
>
>                 if (log.isDebugEnabled()) {
>
> Modified: synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
> URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java?rev=744950&r1=744949&r2=744950&view=diff
> ==============================================================================
> --- synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
(original)
> +++ synapse/trunk/java/modules/extensions/src/main/java/org/apache/synapse/mediators/throttle/ThrottleMediator.java
Mon Feb 16 15:57:48 2009
> @@ -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.context.Replicator;
> +import org.apache.axis2.clustering.state.Replicator;
>  import org.apache.axis2.clustering.ClusteringFault;
> -import org.apache.axis2.clustering.ClusterManager;
> +import org.apache.axis2.clustering.ClusteringAgent;
>  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)) {
> -                ClusterManager clusterManager = cc.getAxisConfiguration().getClusterManager();
> -                if (clusterManager != null &&
> -                    clusterManager.getContextManager() != null) {
> +                ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
> +                if (clusteringAgent != null &&
> +                    clusteringAgent.getStateManager() != null) {
>                     isClusteringEnable = true;
>                 }
>             }
>
> Modified: synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java
> URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java?rev=744950&r1=744949&r2=744950&view=diff
> ==============================================================================
> --- synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java
(original)
> +++ synapse/trunk/java/modules/samples/src/main/java/samples/util/SampleAxis2ServerManager.java
Mon Feb 16 15:57:48 2009
> @@ -25,7 +25,7 @@
>  import org.apache.axis2.util.CommandLineOption;
>  import org.apache.axis2.util.CommandLineOptionParser;
>  import org.apache.axis2.util.OptionsValidator;
> -import org.apache.axis2.clustering.ClusterManager;
> +import org.apache.axis2.clustering.ClusteringAgent;
>  import org.apache.commons.logging.Log;
>  import org.apache.commons.logging.LogFactory;
>
> @@ -98,11 +98,11 @@
>             // Need to initialize the cluster manager at last since we are changing the
servers
>             // HTTP/S ports above. In the axis2.xml file, we need to set the "AvoidInitiation"
param
>             // to "true"
> -            ClusterManager clusterManager =
> -                    configctx.getAxisConfiguration().getClusterManager();
> -            if(clusterManager != null) {
> -                clusterManager.setConfigurationContext(configctx);
> -                clusterManager.init();
> +            ClusteringAgent clusteringAgent =
> +                    configctx.getAxisConfiguration().getClusteringAgent();
> +            if(clusteringAgent != null) {
> +                clusteringAgent.setConfigurationContext(configctx);
> +                clusteringAgent.init();
>             }
>
>             // Finally start the transport listeners
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message