org.apache.derby.jdbc.EmbeddedXADataSource Java Examples
The following examples show how to use
org.apache.derby.jdbc.EmbeddedXADataSource.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FHIRProxyXADataSourceTest.java From FHIR with Apache License 2.0 | 6 votes |
@Test public void testDerby_3() throws Exception { FHIRRequestContext.set(new FHIRRequestContext("tenant1", "derby_3")); FHIRProxyXADataSource proxyDS = new FHIRProxyXADataSource(); XADataSource xaDS = proxyDS.getDelegate(); assertNotNull(xaDS); assertTrue(xaDS instanceof EmbeddedXADataSource); EmbeddedXADataSource derbyDS = (EmbeddedXADataSource) xaDS; assertEquals("myDerbyDatabase3", derbyDS.getDatabaseName()); assertEquals("create", derbyDS.getCreateDatabase()); assertEquals("dbuser", derbyDS.getUser()); assertEquals("change-password", derbyDS.getPassword()); assertEquals("myDataSource", derbyDS.getDataSourceName()); assertEquals("shutdown", derbyDS.getShutdownDatabase()); assertEquals(1000, derbyDS.getLoginTimeout()); assertEquals("DataSource description", derbyDS.getDescription()); assertEquals("prop1=value1", derbyDS.getConnectionAttributes()); assertEquals(false, derbyDS.getAttributesAsPassword()); }
Example #2
Source File: FHIRProxyXADataSourceTest.java From FHIR with Apache License 2.0 | 5 votes |
@Test public void testDerby_1() throws Exception { FHIRRequestContext.set(new FHIRRequestContext("tenant1", "derby_1")); FHIRProxyXADataSource proxyDS = new FHIRProxyXADataSource(); XADataSource xaDS = proxyDS.getDelegate(); assertNotNull(xaDS); assertTrue(xaDS instanceof EmbeddedXADataSource); EmbeddedXADataSource derbyDS = (EmbeddedXADataSource) xaDS; assertEquals("myDerbyDatabase1", derbyDS.getDatabaseName()); }
Example #3
Source File: FHIRProxyXADataSourceTest.java From FHIR with Apache License 2.0 | 5 votes |
@Test public void testDerby_2() throws Exception { FHIRRequestContext.set(new FHIRRequestContext("tenant1", "derby_2")); FHIRProxyXADataSource proxyDS = new FHIRProxyXADataSource(); XADataSource xaDS = proxyDS.getDelegate(); assertNotNull(xaDS); assertTrue(xaDS instanceof EmbeddedXADataSource); EmbeddedXADataSource derbyDS = (EmbeddedXADataSource) xaDS; assertEquals("myDerbyDatabase2", derbyDS.getDatabaseName()); assertEquals("create", derbyDS.getCreateDatabase()); }
Example #4
Source File: FHIRProxyXADataSourceTest.java From FHIR with Apache License 2.0 | 5 votes |
@Test public void testDerby_default() throws Exception { FHIRRequestContext.set(new FHIRRequestContext("tenant1", "default_derby")); FHIRProxyXADataSource proxyDS = new FHIRProxyXADataSource(); XADataSource xaDS = proxyDS.getDelegate(); assertNotNull(xaDS); assertTrue(xaDS instanceof EmbeddedXADataSource); EmbeddedXADataSource derbyDS = (EmbeddedXADataSource) xaDS; assertEquals("myDefaultDerbyDatabase", derbyDS.getDatabaseName()); assertEquals("create", derbyDS.getCreateDatabase()); }
Example #5
Source File: JdbcXARecoveryBrokerTest.java From activemq-artemis with Apache License 2.0 | 5 votes |
@Override protected void setUp() throws Exception { dataSource = new EmbeddedXADataSource(); dataSource.setDatabaseName("derbyDb"); dataSource.setCreateDatabase("create"); super.setUp(); }
Example #6
Source File: JdbcXARecoveryBrokerTest.java From activemq-artemis with Apache License 2.0 | 5 votes |
@Override protected void restartBroker() throws Exception { broker.stop(); stopDerby(); dataSource = new EmbeddedXADataSource(); dataSource.setDatabaseName("derbyDb"); dataSource.setCreateDatabase("create"); broker = createRestartedBroker(); broker.start(); }
Example #7
Source File: TestEmbeddedXADataSource.java From FHIR with Apache License 2.0 | 4 votes |
public TestEmbeddedXADataSource() { log.entering(this.getClass().getName(), "TestEmbeddedXADataSource ctor"); this.delegate = new EmbeddedXADataSource(); log.exiting(this.getClass().getName(), "TestEmbeddedXADataSource ctor"); }
Example #8
Source File: DerbyDbMetadata.java From flink with Apache License 2.0 | 4 votes |
@Override public XADataSource buildXaDataSource() { EmbeddedXADataSource ds = new EmbeddedXADataSource(); ds.setDatabaseName(dbName); return ds; }