[ 
http://jira.codehaus.org/browse/MDBUNIT-5?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kristian Koehler updated MDBUNIT-5:
-----------------------------------

    Attachment: shutdown-patch.txt

Hi

the attached file contains a patch for Shutdown functionality. I added a 
ShutdownHandler interface which can be used to shutdown databases. I also 
implemented two implementations: DefaultShutdownHandler and 
DerbyShutdownHandler.

It can be configured via configuration element:

-- 8< --

<executions>
...
 <configuration
  
<shutdownHandlerName>org.codehaus.mojo.dbunit.shutdown.DerbyShutdownHandler</shutdownHandlerName>
</configuration>
</executions>

-- 8< --

The Deafult Impl does nothing. ;-)

Kristian

> Allow shutting down embedded derby from dbunit-maven-plugin
> -----------------------------------------------------------
>
>                 Key: MDBUNIT-5
>                 URL: http://jira.codehaus.org/browse/MDBUNIT-5
>             Project: Maven DbUnit Plugin
>          Issue Type: Wish
>            Reporter: Matt Raible
>         Attachments: shutdown-patch.txt
>
>
> Related to MOJO-619:
> Currently you cannot shutdown Derby (using the JDBC URL like 
> "jdbc:derby:${project.build.directory}/db;shutdown=true"), because 
> getConnection in this case always throws exception (the explanation of this 
> behavior is here: 
> http://blog.gmane.org/gmane.comp.apache.db.derby.user/month=20060701).
> I propose adding some option (like 
> "<onConnectionError>skip</onConnectionError>") to ignore database connection 
> errors and simply to return from the mojo without raising an exception.
> This functionality could be quite handy, since in some cases you need to 
> shutdown database after executing some statements against it, just to make 
> sure all subsequent connections to this embedded Derby database will be OK. 
> For example, I use sql-maven-plugin to populate the database before running 
> integration tests against an application deployed into the embedded Jetty 
> container. And since this container runs in the same JVM, the application 
> throws exception during the database startup.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to