README

For issue 1251, there are two test cases for testing Persistence Unit (PU) loading feature in an application server.  Both test cases are similar except the way they are packaged. The issue1251-LibJar packages the PUs in a library jar file, where as the issue1251-EarJar packages the PUs in an ejb-jar. The two variants are needed because the spec defines different scope or visibility for such PUs (section #6.2.2 of the spec).  Each application defines a total of 6 PUs, out of which 2 PUs can not be loaded because of unavailability of data-sources used by those PUs. Yet, the application deploys and runs fine and can access 4 PUs with proper data-sources because the application does not reference the 2 PUs without data-sources.

Without the feature #1251, the application fails to deploy and can't access 4 PUs with the data-sources.  For example, the server.log has error, e.g.    
  javax.naming.NameNotFoundException: DOES_NOT_EXIST not found

  java.lang.RuntimeException: javax.naming.NameNotFoundException:
     DOES_NOT_EXIST not found
         at com.sun.enterprise.server.PersistenceUnitInfoImpl.
              _getJtaDataSource(PersistenceUnitInfoImpl.java:267)

To run individual test suite, e.g.
  cd  $SPS_HOME/pe/ejb/ejb30/issue/1251
  ant all
  ant -f buildLib.xml all

To run them along with ejb3.0 test suite, e.g.
  cd  $SPS_HOME/pe/ejb/ejb30
  ant all

To create test report, e.g.
  cd $SPS_HOME/pe
  ant pebase report