Thursday, April 16, 2015



Multitenancy is a feature that is available throughout WSO2 products. So when loading tenants the process may consume lot of resources, inorder to minimize generating heavy loads on PC resources. carbon products has tenant unloading capabilities.

The tenant unloading will take place if the idle time exceeds the predefined threshold. So Following is how to change the tenant idle threshold.

This is basically done using a Java Property. The default tenant unloading idle time is set to 30 minutes.

Inorder to change this open <Carbon Home>/bin/wso2server.sh and add the following Java property.


-Dtenant.idle.time=<time_in_minutes>


The complete Java properties set within wso2server.sh will look like following,


$JAVA_OPTS \
    -Dcom.sun.management.jmxremote \
    -classpath "$CARBON_CLASSPATH" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CARBON_HOME/tmp" \
    -Dcatalina.base="$CARBON_HOME/lib/tomcat" \
    -Dwso2.server.standalone=true \
    -Dcarbon.registry.root=/ \
    -Djava.command="$JAVACMD" \
    -Dcarbon.home="$CARBON_HOME" \
    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
    -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/etc/logging-bridge.properties" \
    -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \
    -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \
    -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.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 \
    -Djava.security.egd=file:/dev/./urandom \
    -Dfile.encoding=UTF8 \
    -DapplyPatches \
    -Dtenant.idle.time=10 \
    org.wso2.carbon.bootstrap.Bootstrap $*
    status=$?

Thanx for reading and drop a comment if you have any queries. 

Tuesday, April 7, 2015



WSO2 App Manager and WSO2 EMM are two free and opensource product offerings from WSO2. By intergrating App-Manager with, EMM(Enterprise Mobility Manager)  or MDM you add device management capabilities to App-Manager, e.g. Installing Mobile apps etc. So when debugging App-Manager you might sometmes need to eanble DEBUG logs, Following is how to achieve this.

1. Open <AM HOME>repository/conf/log4j.properties
2. Add the following two entries to the file.

log4j.logger.org.wso2.carbon.appmgt.mobile=DEBUG
log4j.logger.org.wso2.carbon.appmgt.mdm.wso2mdm=DEBUG
log4j.logger.org.wso2.carbon.appmgt.mdm.wso2emm=DEBUG


3. Now Restart the server.

When you perform an action the logs will be logged. 
Subscribe to RSS Feed Follow me on Twitter!