Hi,
I've posted a message to
this hbm2dao thread recently.
I think it opens a solution to your problem, too: Simply extract the delivered daohome.ftl template from hibernate-tools.jar, rename it to some meaningful name, and drop it in your <hibernatetool> classpath.
As you will see the template references a property ${sessionFactoryName} holding the JNDI lookup string. By using the generic <hbmtemplate> task it should be sufficient to add an appropriate <property> element (and a few more already mentioned properties like ejb3 and jdk5) like this:
<property key="sessionFactoryName" value="my/jndi/path"/>
Greetings
Christian