[ 
https://issues.apache.org/jira/browse/DERBY-2576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534334
 ] 

Kathey Marsden commented on DERBY-2576:
---------------------------------------

I tried this small test with EbmeddedXADataSource and it seems to create the 
database fine.
Am I doing something wrong to reproduce?

import org.apache.derby.jdbc.EmbeddedXADataSource;
import java.sql.*;
import javax.sql.*;

public class SetCreateTest {
    public static void main(String[] args) throws Exception {
        EmbeddedXADataSource ds = new EmbeddedXADataSource();
        ds.setDatabaseName("newdb");
        ds.setCreateDatabase("create");
        XAConnection xaConn = ds.getXAConnection();
        Connection conn = xaConn.getConnection();
        Statement stmt = conn.createStatement();
        stmt.close();
        conn.close();
                
    }

}


> setCreateDatabase does not work for EmbeddedXADataSource or 
> EmbeddedConnectionPoolDataSource
> --------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2576
>                 URL: https://issues.apache.org/jira/browse/DERBY-2576
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.1.4
>            Reporter: Myrna van Lunteren
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: DERBY-2576_tst.diff
>
>
> After implementing setCreateDatabase for ClientDataSource, and creating a 
> test (see DERBY-2296) I realized there was no such test for XADataSource or 
> ConnectionPoolDataSource.
> However, the test I created failed with Embedded, because the database does 
> not get created. A database *does* get created using 
> setConnectionAttributes(create=true). 
> Also, setShutdownDatabase does work (tested in XADSAuthenticationTest and 
> PoolDSAuthenticationTest).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to