getDataSource

Return the primary data source to use. The data source will
automatically use the given context's user name and password on calls
to DataSource.getConnection(). If the given context is null, the
data source will use the configuration's default connection user name
and password. If those too are null and the first context has been
obtained already, then the user name and password for that context
will be used, as we know they represent a valid combination. This
method avoids casting the result of
OpenJPAConfiguration.getConnectionFactory(), and avoids having to
pass in the user name and password to obtain connections.

getDataSource2

Return the non-enlisted data source to use. If there is a valid
non-xa connection factory configured, then it will be returned. Its
default user name and password on calls to
DataSource.getConnection() will be the specificed connection 2
user name and password. If those are null and the given context is
non-null, its user name password will be used instead. If the context
is null too, then the user name and password used to retrieve the first
context will be used. If there is no second connection factory the
primary connection factory is used.