Its a one to one mapping between a DataSource and a SessionFactory, so you will need three seperate configurations for your SessionFactory. So if you use hibernate.cfg.xml to do this you will need three versions, one for each DataSource.
or by getting 3 different data sources form app server using jndi.
Not sure I follow this part of your question. You can avoid this. If you have three different databases you will need three different DataSources in JNDI.