diff --git a/modules/analytics/distribution/input-adapter-change.xml b/modules/analytics/distribution/input-adapter-change.xml
new file mode 100644
index 00000000..854702e0
--- /dev/null
+++ b/modules/analytics/distribution/input-adapter-change.xml
@@ -0,0 +1,29 @@
+
+
+
+ inputEventAdaptersConfig/adapterConfig[@type="jms"]
+
+ 8
+ 100
+ 20000
+ 10000
+ 2
+ 100
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}
+ admin
+ admin
+
+
+
+
+ 8
+ 100
+ 20000
+ 10000
+ 60
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.gateway.host}:${iot.gateway.https.port}/token
+ tcp://${mqtt.broker.host}:${mqtt.broker.port}
+]]>
+
+
\ No newline at end of file
diff --git a/modules/analytics/distribution/output-adapter-change.xml b/modules/analytics/distribution/output-adapter-change.xml
new file mode 100644
index 00000000..3a824330
--- /dev/null
+++ b/modules/analytics/distribution/output-adapter-change.xml
@@ -0,0 +1,40 @@
+
+
+
+ /outputEventAdaptersConfig/adapterConfig[@type="websocket"]
+
+
+ 8
+ 100
+ 20000
+ 10000
+ 60
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.gateway.host}:${iot.gateway.https.port}/token
+ tcp://${mqtt.broker.host}:${mqtt.broker.port}
+
+
+
+
+ 8
+ 100
+ 20000
+ 10000
+
+ org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.OAuthAuthenticator
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}
+ 2
+ 100
+ org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.DeviceAuthorizer
+ https://${iot.gateway.host}:${iot.gateway.https.port}/token
+ https://${iot.core.host}:${iot.core.https.port}
+ admin
+ admin
+
+
+ /permission/device-mgt/realtime_analytics
+
+ 100
+ ]]>
+
+
\ No newline at end of file
diff --git a/modules/analytics/distribution/pom.xml b/modules/analytics/distribution/pom.xml
index 6ac4ace9..6b4d246c 100644
--- a/modules/analytics/distribution/pom.xml
+++ b/modules/analytics/distribution/pom.xml
@@ -102,6 +102,40 @@
+
+ init-input-adapter-config
+ prepare-package
+
+ process
+
+
+ true
+
+
+ ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/input-event-adapters.xml
+
+ input-adapter-change.xml
+
+
+
+
+
+ init-output-adapter-config
+ prepare-package
+
+ process
+
+
+ true
+
+
+ ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/output-event-adapters.xml
+
+ output-adapter-change.xml
+
+
+
+
diff --git a/modules/analytics/distribution/src/bin/wso2server.bat b/modules/analytics/distribution/src/bin/wso2server.bat
index 999592c2..7f227e68 100644
--- a/modules/analytics/distribution/src/bin/wso2server.bat
+++ b/modules/analytics/distribution/src/bin/wso2server.bat
@@ -196,7 +196,7 @@ set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH%
set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
-set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Analytics" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8
+set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Analytics" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Diot.keymanager.host="localhost" -Diot.keymanager.https.port="9443" -Diot.gatway.host="localhost" -Diot.gateway.https.port="8243" -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8
:runJava
echo JAVA_HOME environment variable is set to %JAVA_HOME%
diff --git a/modules/analytics/distribution/src/bin/wso2server.sh b/modules/analytics/distribution/src/bin/wso2server.sh
index c99980c3..29029c30 100755
--- a/modules/analytics/distribution/src/bin/wso2server.sh
+++ b/modules/analytics/distribution/src/bin/wso2server.sh
@@ -326,6 +326,10 @@ do
-Dmqtt.broker.port="1886" \
-Diot.core.host="localhost" \
-Diot.core.https.port="9443" \
+ -Diot.keymanager.host="localhost" \
+ -Diot.keymanager.https.port="9443" \
+ -Diot.gateway.host="localhost" \
+ -Diot.gateway.https.port="8243" \
$NODE_PARAMS \
org.wso2.carbon.bootstrap.Bootstrap $*
status=$?
diff --git a/modules/core/distribution/input-adapter-change.xml b/modules/core/distribution/input-adapter-change.xml
new file mode 100644
index 00000000..854702e0
--- /dev/null
+++ b/modules/core/distribution/input-adapter-change.xml
@@ -0,0 +1,29 @@
+
+
+
+ inputEventAdaptersConfig/adapterConfig[@type="jms"]
+
+ 8
+ 100
+ 20000
+ 10000
+ 2
+ 100
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}
+ admin
+ admin
+
+
+
+
+ 8
+ 100
+ 20000
+ 10000
+ 60
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.gateway.host}:${iot.gateway.https.port}/token
+ tcp://${mqtt.broker.host}:${mqtt.broker.port}
+]]>
+
+
\ No newline at end of file
diff --git a/modules/core/distribution/output-adapter-change.xml b/modules/core/distribution/output-adapter-change.xml
new file mode 100644
index 00000000..3a824330
--- /dev/null
+++ b/modules/core/distribution/output-adapter-change.xml
@@ -0,0 +1,40 @@
+
+
+
+ /outputEventAdaptersConfig/adapterConfig[@type="websocket"]
+
+
+ 8
+ 100
+ 20000
+ 10000
+ 60
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}/client-registration/v0.11/register
+ https://${iot.gateway.host}:${iot.gateway.https.port}/token
+ tcp://${mqtt.broker.host}:${mqtt.broker.port}
+
+
+
+
+ 8
+ 100
+ 20000
+ 10000
+
+ org.wso2.carbon.device.mgt.output.adapter.websocket.authentication.OAuthAuthenticator
+ https://${iot.keymanager.host}:${iot.keymanager.https.port}
+ 2
+ 100
+ org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.DeviceAuthorizer
+ https://${iot.gateway.host}:${iot.gateway.https.port}/token
+ https://${iot.core.host}:${iot.core.https.port}
+ admin
+ admin
+
+
+ /permission/device-mgt/realtime_analytics
+
+ 100
+ ]]>
+
+
\ No newline at end of file
diff --git a/modules/core/distribution/pom.xml b/modules/core/distribution/pom.xml
index 82a6af46..4e8d95c3 100644
--- a/modules/core/distribution/pom.xml
+++ b/modules/core/distribution/pom.xml
@@ -90,6 +90,49 @@
+
+
+ com.google.code.maven-config-processor-plugin
+ config-processor-maven-plugin
+ 2.6
+
+
+ init-input-adapter-config
+ prepare-package
+
+ process
+
+
+ false
+
+
+ ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/input-event-adapters.xml
+
+ input-adapter-change.xml
+
+
+
+
+
+ init-output-adapter-config
+ prepare-package
+
+ process
+
+
+ false
+
+
+ ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/output-event-adapters.xml
+
+ output-adapter-change.xml
+
+
+
+
+
+
+
org.apache.maven.plugins
maven-antrun-plugin
diff --git a/modules/core/distribution/src/repository/bin/wso2server.bat b/modules/core/distribution/src/repository/bin/wso2server.bat
index 39cf7c63..5f7dd86e 100644
--- a/modules/core/distribution/src/repository/bin/wso2server.bat
+++ b/modules/core/distribution/src/repository/bin/wso2server.bat
@@ -162,7 +162,7 @@ set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH%
set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
-set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Core" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Dorg.wso2.ignoreHostnameVerification=true -Dorg.opensaml.httpclient.https.disableHostnameVerification=true
+set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx1024m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%CARBON_HOME%\repository\logs\heap-dump.hprof" -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dlogger.server.name="IoT-Core" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\etc\logging-bridge.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcomponents.repo="%CARBON_HOME%\repository\components" -Dconf.location="%CARBON_HOME%\repository\conf" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH% -Dfile.encoding=UTF8 -Dorg.wso2.ignoreHostnameVerification=true -Dorg.opensaml.httpclient.https.disableHostnameVerification=true -Dmqtt.broker.host="localhost" -Dmqtt.broker.port="1886" -Diot.core.host="localhost" -Diot.core.https.port="9443" -Diot.keymanager.host="localhost" -Diot.keymanager.https.port="9443" -Diot.gateway.host="localhost" -Diot.gateway.https.port="8243"
:runJava
echo JAVA_HOME environment variable is set to %JAVA_HOME%
diff --git a/modules/core/distribution/src/repository/bin/wso2server.sh b/modules/core/distribution/src/repository/bin/wso2server.sh
index 65add0f6..270aa597 100755
--- a/modules/core/distribution/src/repository/bin/wso2server.sh
+++ b/modules/core/distribution/src/repository/bin/wso2server.sh
@@ -307,6 +307,14 @@ do
-DworkerNode=false \
-Dorg.wso2.ignoreHostnameVerification=true \
-Dorg.opensaml.httpclient.https.disableHostnameVerification=true \
+ -Dmqtt.broker.host="localhost" \
+ -Dmqtt.broker.port="1886" \
+ -Diot.core.host="localhost" \
+ -Diot.core.https.port="9443" \
+ -Diot.keymanager.host="localhost" \
+ -Diot.keymanager.https.port="9443" \
+ -Diot.gateway.host="localhost" \
+ -Diot.gateway.https.port="8243" \
org.wso2.carbon.bootstrap.Bootstrap $*
status=$?
done