Notify observers when starting proxy services

When a proxy service is started the Axis2 Observers aren't notified.
This is due to the fact that the proxy services are only loaded by the
Axis2 Synapse controller and not started. Inline in, out and fault
sequences are not initialized, since that happens when a service is
started.

By starting the proxy services explicitly in the Axis2 Synapse
controller the sequences are properly initialized and the Axis2
Observers are notified.
diff --git a/modules/core/src/main/java/org/apache/synapse/Axis2SynapseController.java b/modules/core/src/main/java/org/apache/synapse/Axis2SynapseController.java
index ace8f3b..cece905 100644
--- a/modules/core/src/main/java/org/apache/synapse/Axis2SynapseController.java
+++ b/modules/core/src/main/java/org/apache/synapse/Axis2SynapseController.java
@@ -475,6 +475,18 @@
      * @return SynapseEnvironment instance
      */
     public SynapseEnvironment createSynapseEnvironment() {
+        synapseEnvironment = new Axis2SynapseEnvironment(
+            configurationContext, synapseConfiguration, serverContextInformation);
+        MessageContextCreatorForAxis2.setSynEnv(synapseEnvironment);
+
+        Parameter synapseEnvironmentParameter = new Parameter(
+            SynapseConstants.SYNAPSE_ENV, synapseEnvironment);
+        try {
+            configurationContext.getAxisConfiguration().addParameter(synapseEnvironmentParameter);
+        } catch (AxisFault e) {
+            handleFatal("Could not set parameter '" + SynapseConstants.SYNAPSE_ENV +
+                "' to the Axis2 configuration : " + e.getMessage(), e);
+        }
 
         try {
             deploySynapseService();
@@ -485,20 +497,6 @@
             throw new SynapseException("Synapse startup failed", axisFault);
         }
 
-        synapseEnvironment = new Axis2SynapseEnvironment(
-                configurationContext, synapseConfiguration, serverContextInformation);
-        MessageContextCreatorForAxis2.setSynEnv(synapseEnvironment);
-
-        Parameter synapseEnvironmentParameter = new Parameter(
-                SynapseConstants.SYNAPSE_ENV, synapseEnvironment);
-        try {
-            configurationContext.getAxisConfiguration().addParameter(synapseEnvironmentParameter);
-        } catch (AxisFault e) {
-            handleFatal("Could not set parameter '" + SynapseConstants.SYNAPSE_ENV +
-                    "' to the Axis2 configuration : " + e.getMessage(), e);
-
-        }
-
         synapseEnvironment.getTaskManager().init(taskDescriptionRepository, taskScheduler);
         synapseConfiguration.init(synapseEnvironment);
         synapseEnvironment.setInitialized(true);
@@ -778,7 +776,9 @@
                         configurationContext.getAxisConfiguration());
                 if (proxyService != null) {
                     log.info("Deployed Proxy service : " + proxy.getName());
-                    if (!proxy.isStartOnLoad()) {
+                    if (proxy.isStartOnLoad()) {
+                        proxy.start(synapseConfiguration);
+                    } else {
                         proxy.stop(synapseConfiguration);
                     }
                 } else {
diff --git a/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java b/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
index 3796295..4b500a0 100644
--- a/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
+++ b/modules/core/src/main/java/org/apache/synapse/core/axis2/ProxyService.java
@@ -577,7 +577,6 @@
                     axisCfg.addServiceToExistingServiceGroup(proxyService, serviceGroup);
                 }
             }
-            this.setRunning(true);
         } catch (AxisFault axisFault) {
             try {
                 if (axisCfg.getService(proxyService.getName()) != null) {