Application scope has the longest lifetime compared to all the others and the lifetime of the application session is equal to the lifetime of the system. If we deploy a service in the application scope, there will be only one instance of that service and obviously there will be only one
ServiceContext for that service too. In the world of Axis2, if we consider the memory footprint and if we don't want to manage a session, then a good idea is to deploy the service in the application scope.
When we deploy a service in the application scope, a client does not need to send any additional data to use the same session.
To deploy a service in the application scope, we need to change
axis2.xml, as shown here:
<service name="foo" scope=" ...