// get services context
final Context servicesContext = (Context) jndiTemplate.lookup("services", Context.class);
// get channel-ids context
final Context channel_idsContext = (Context) jndiTemplate.lookup("users/" + userId + "/layouts/" + layoutId + "/channel-ids", Context.class);
// get channel-obj context
final Context channel_objContext = (Context) jndiTemplate.lookup("users/" + userId + "/sessions/" + sessionId + "/channel-obj", Context.class);
cic.bind("services", servicesContext);
cic.bind("channel-ids", channel_idsContext);
cic.bind("channel-obj", channel_objContext);
cic.bind("portlet-ids", new ArrayList<Object>());