Jasarevic, his head bowed as he listened to the verdict being read out, had sprayed the embassy with a total of 105 bullets using an automatic weapon for almost an hour before he was shot by the police.
One police officer was injured in the attack.
In December 2012, Jasarevic had been sentenced to 18 years in prison but the verdict was annulled after his legal rights were found to have been infringed. The retrial opened in September.
"This court [now] sentences him to 15 years in prison."
Also Read
The judge said the court "took into consideration his remorse" as Jasarevic claimed he was a "victim of those who were telling me it was necessary to fight for Islam, to lead jihad".
"The court however wanted to show the international community that Bosnia is determined in its fight against terrorism and protection of its citizens," he said.
Jasarevic, "as a member of the Wahhabi movement and aiming to express his dissatisfaction with the position of Muslims in the world, demanded a withdrawal of NATO, the US and Germany from Afghanistan" in a video message recorded before the act, he added.
Jasarevic aimed "to intimidate the local population and exert pressure on the governments of other countries", he said.