Please refer to the JBoss AS 7 docs about datasource configuration and use a datasource. It's the most common way, and also helps with the connection pooling to the database. I don't believe hibernate does pooling at all.
thanks Jason Porter!!!
i follow your suggest,and the error message disappeared.
next i need to face the question of jta in java-se.