| org.apache.openejb.config.AutoConfigPersistenceUnitsTest
AutoConfigPersistenceUnitsTest | public class AutoConfigPersistenceUnitsTest extends TestCase (Code) | | version: $Revision: 632667 $ $Date: 2008-03-01 14:32:11 -0800 (Sat, 01 Mar 2008) $ |
Inner Class :public static class OrangeDriver extends Driver | |
Inner Class :public static class LimeDriver extends Driver | |
test | public void test() throws Exception(Code) | | Existing data source "Orange", jta managed
Existing data source "OrangeUnmanaged", not jta managed
Persistence xml like so:
Orange
OrangeUnamanged
This is the happy path.
throws: Exception - |
testEmptyUnitNoAvailableDataSources | public void testEmptyUnitNoAvailableDataSources() throws Exception(Code) | | Existing data source "Orange", not jta managed
Persistence xml like so:
The should be auto linked
to the Orange data source
We should generate a based on
the
throws: Exception - |
testEmptyUnitOneAvailableJtaDataSource | public void testEmptyUnitOneAvailableJtaDataSource() throws Exception(Code) | | Existing data source "Orange", jta managed
Persistence xml like so:
The should be auto linked
to the Orange data source
We should generate a based on
the
throws: Exception - |
testEmptyUnitOneAvailableNonJtaDataSource | public void testEmptyUnitOneAvailableNonJtaDataSource() throws Exception(Code) | | Existing data source "Orange", not jta managed
Persistence xml like so:
The should be auto linked
to the Orange data source
We should generate a based on
the
throws: Exception - |
testInvalidOptionsJta | public void testInvalidOptionsJta() throws Exception(Code) | | Existing data source "Orange", not jta managed
Existing data source "Lime", jta managed
Persistence xml like so:
Orange
We should generate a based on
the
throws: Exception - |
testInvalidOptionsNonJta | public void testInvalidOptionsNonJta() throws Exception(Code) | | Existing data source "Orange", not jta managed
Existing data source "Lime", jta managed
Persistence xml like so:
Orange
We should generate a based on
the
throws: Exception - |
testInvalidRefs | public void testInvalidRefs() throws Exception(Code) | | Existing data source "Orange", jta managed
Existing data source "OrangeUnmanaged", not jta managed
Persistence xml like so:
DoesNotExist
AlsoDoesNotExist
We should automatically hook them up to the configured
datasources that do match
throws: Exception - |
testJtaRefToContrarilyConfiguredDataSource | public void testJtaRefToContrarilyConfiguredDataSource() throws Exception(Code) | | Existing data source "OrangeOne", not jta managed
Existing data source "OrangeTwo", not jta managed
Persistence xml like so:
OrangeOne
OrangeTwo
This configuration should be rejected
throws: Exception - |
testJtaRefToContrarilyConfiguredDataSource2 | public void testJtaRefToContrarilyConfiguredDataSource2() throws Exception(Code) | | Existing data source "OrangeOne", not jta managed
Persistence xml like so:
OrangeOne
This configuration should be rejected
throws: Exception - |
testMissingJtaDataSource | public void testMissingJtaDataSource() throws Exception(Code) | | Existing data source "Orange" not jta managed
Persistence xml like so:
Orange
We should generate a based on
the
throws: Exception - |
testMissingNonJtaDataSource | public void testMissingNonJtaDataSource() throws Exception(Code) | | Existing data source "Orange" not jta managed
Persistence xml like so:
Orange
We should generate a based on
the
throws: Exception - |
testNonJtaRefToContrarilyConfiguredDataSource | public void testNonJtaRefToContrarilyConfiguredDataSource() throws Exception(Code) | | Existing data source "OrangeOne", not jta managed
Existing data source "OrangeTwo", not jta managed
Persistence xml like so:
OrangeOne
OrangeTwo
This configuration should be rejected
throws: Exception - |
testNonJtaRefToContrarilyConfiguredDataSource2 | public void testNonJtaRefToContrarilyConfiguredDataSource2() throws Exception(Code) | | Existing data source "OrangeOne", not jta managed
Persistence xml like so:
OrangeOne
This configuration should be rejected
throws: Exception - |
testPossiblyAmbiguousJtaOptions | public void testPossiblyAmbiguousJtaOptions() throws Exception(Code) | | Existing data source "Orange", not jta managed
Existing data source "Lime", jta managed
Persistence xml like so:
Orange
We should select the based on
the closest match to the
throws: Exception - |
testPossiblyAmbiguousNonJtaOptions | public void testPossiblyAmbiguousNonJtaOptions() throws Exception(Code) | | Existing data source "Orange", not jta managed
Existing data source "Lime", jta managed
Persistence xml like so:
Orange
We should select the based on
the closest match to the
throws: Exception - |
testSameDataSourceForBoth1 | public void testSameDataSourceForBoth1() throws Exception(Code) | | Existing data source "Orange", jta managed
Persistence xml like so:
Orange
Orange
They used the same data source for both the
jta-data-source and non-jta-data-source and we
can determine the data source will not work as
a non-jta-data-source
We should generate the missing data source for them
based on the one they supplied.
throws: Exception - |
testSameDataSourceForBoth2 | public void testSameDataSourceForBoth2() throws Exception(Code) | | Existing data source "Orange", not jta managed
Persistence xml like so:
Orange
Orange
They used the same data source for both the
jta-data-source and non-jta-data-source and we
can determine the data source will not work as
a jta-data-source
We should generate the missing data source for them
based on the one they supplied.
throws: Exception - |
testSameDataSourceForBoth3 | public void testSameDataSourceForBoth3() throws Exception(Code) | | Existing data source "OrangeOne", jta managed
Existing data source "OrangeTwo", not jta managed
Persistence xml like so:
OrangeOne
OrangeOne
They used the same data source for both the
jta-data-source and non-jta-data-source and we
can determine the data source will not work as
a non-jta-data-source
BUT
they have explicitly configured a data source
that nearly matches the named datasource and
would be identical to what we would auto-create
throws: Exception - |
testSameDataSourceForBoth4 | public void testSameDataSourceForBoth4() throws Exception(Code) | | Existing data source "OrangeOne", jta managed
Existing data source "OrangeTwo", not jta managed
Persistence xml like so:
OrangeTwo
OrangeTwo
They used the same data source for both the
jta-data-source and non-jta-data-source and we
can determine the data source will not work as
a jta-data-source
BUT
they have explicitly configured a data source
that nearly matches the named datasource and
would be identical to what we would auto-create
throws: Exception - |
testShortName | public void testShortName() throws Exception(Code) | | Existing data source "Orange", jta managed
Existing data source "OrangeUnmanaged", not jta managed
Persistence xml like so:
java:foo/bar/baz/Orange
java:foo/bar/baz/OrangeUnamanged
The datasources should be mapped correctly despite the
vendor specific prefix.
throws: Exception - |
testThirdPartyDataSources | public void testThirdPartyDataSources() throws Exception(Code) | | Existing data source "Orange", not controlled by us
Existing data source "OrangeUnmanaged", also not controlled by us
Persistence xml like so:
Orange
OrangeUnamanged
throws: Exception - |
testThirdPartyDataSources2 | public void testThirdPartyDataSources2() throws Exception(Code) | | Existing data source "Orange", not controlled by us
Persistence xml like so:
Orange
Here we should just let them try and get by with
just the one data source.
throws: Exception - |
testThirdPartyDataSources3 | public void testThirdPartyDataSources3() throws Exception(Code) | | Existing data source "Orange", not controlled by us
Persistence xml like so:
Orange
Here we should just let them try and get by with
just the one data source.
throws: Exception - |
testThirdPartyDataSources4 | public void testThirdPartyDataSources4() throws Exception(Code) | | Existing data source "Orange", not controlled by us
Persistence xml like so:
Orange
Orange
Here we should just let them try and get by with
both jta and non-jta references pointed at the same
data source.
throws: Exception - |
|
|