Asset comments are created through an asset's state history. You can use RAMAsset.getCurrentStateHistory() to get to the asset's state history. Comments are sent up to Rational Asset Manager when the RAMStateHistory.commet(RAMComment) method is called, the asset does not have to be put to the session.
//Get the current state history RAMStateHistory stateHistory = newAsset.getCurrentStateHistory(); //Create a new comment RAMComment comment = new RAMComment(); comment.setBody(“This asset looks great!”); //Add comment to the asset stateHistory.comment(comment);