In my scenario, I do not need access of database by another process other than jboss server, hence I want to use the embedded mode.
Everything works fine but I am wondering about 3 things:
1. Does jbossAS is able to make use of database connection pooling with embedded databases in generally? Or do I have to setup a database accessed by server (jdbc:h2:tcp://localhost/~/h2/mydb) ?
2. Should I use ;DB_CLOSE_DELAY=-1 to eliminate the need to reopen the connection again by jboss as?
3. Can I make use of Database File Locking "Socket" (jdbc:h2:~/h2/mydb;FILE_LOCK=SOCKET) to avoid the watchdog-thread of the database or does it conflicts with the database connection pooling of jboss?
By the way, I figured out, that using server mode is not considerably faster than using embedded mode. I guess, because jbossAs reopens the "database in embedded mode" everytime without making use of connection pool. But I am unsure.