Hi Vlado,
Thanks your reply. Yes, you are right the cxt.lookup only works on server running.
Actully what I want is, to do unit test for JPA connection and table operation with JUnit.
Because I have poor knowleage about this, do you have some simple or guide?
By the way, I already defined the DS in web.xml.
BR, Bruce