I can see from the below link
it is possible to do this. I was using Jboss JNDI for the database connectivity.
But after setting the connection details explicitly (instead of JNDI)
Th exception I got was -missing class: org.hibernate.connection.C3POConnectionProvider
I copied hibernate-c3p0-3.5.2-Final.jar to jboss-5.1.0.GA\server\default\lib\
Bu now I don't see the index creation for repository at all.
The below 2 lines do not appear (when datasource is not JNDI)
2013-12-27 14:35:42,536 INFO [org.modeshape.jcr.RepositoryQueryManager] (modeshape-start-repo-2-thread-1) Started rebuilding indexes for repository 'repository'
2013-12-27 14:35:42,560 INFO [org.modeshape.jcr.RepositoryQueryManager] (modeshape-start-repo-2-thread-1) Completed rebuilding indexes for repository 'repository'
Amy pointers on what is going wrong