The wsreversemapping tool generates persistent class definitions and metadata from a database schema.
Before running the command, you must have a copy of persistence.xml file on the classpath, or specify it as a properties file through the -p [path_to_persistence.xml] argument.
The command syntax is as follows:
wsreversemapping [parameters][arguments]
${WAS_HOME}/bin/wsreversemapping -pkg com.xyz -d ./src schema.xml
C:\> %WAS_HOME%/bin/wsreversemapping -sa dropDB Magazine.javapkg com.reversemapped -d src -connectionDriverName=com.ibm.db2.jcc.DB2Driver -connectionURL=jdbc:db2:localhost:50000/TEST -connectionUser=db2User -connectionPassword=db2Password
For more information, consult the mapping section in the Apache OpenJPA User's Guide.