Yes, JMS deliberately included homages to Tolkien - that much is obvious. Another example: Sheridan and the remaining First Ones going beyond the Rim was JMS's version of Frodo and the elves sailing to the Undying Lands. Not close enough that Tolkien's estate could sue, however. And even Tolkien was riffing on old myths and tales to try to create a new folklore. Nothing new under the sun and all that...
Which makes JMS's attempts to insinuate plagiarism or theft of ideas on Paramount/DS9's part particularly ridiculous.