If you google a bit, you'll find different suggestion on how achieve what you're trying to do.
IMHO I'd try and use MBeans. You have to look at the documentation, but keep in mind that usually all commands
you can issue with wsadmin have a counterpart as
Java API.
By the way, why do you need to know such information ? Maybe a different solution may be approached.