Mutually exclusive states are
LOADING
ACTIVE
FAILED
Which can be queried through "vdb.getStatus", Now as Steve says, every one of these states can have Errors and/or Warnings, you ask "hasErrors" to check if there are any. If you find that there are then you can call "getValidityErrors" for list of them. You can only connect using JDBC when the VDB is ACTIVE.
Now depending upon the metadata load requirements (Dynamic vdb vs Designer VDB) a data source may be required at deployment time or not, based on that a VDB may be marked as ACTIVE or LOADING is the data source is not available. Which Steve is saying it is a recoverable error, than can be fixed by supplying the data source.
So, if your application after deployment, is saying vdb is LOADING, then keep looking for "getValidityErrors", if you find it fix them, if there are no validity errors and status LOADING wait for status to change or until your next poll.
Added the above mentioned metadata load states to Model.