If you ask the engine to open a non-existent database file (using either server mode -database option or a stand-alonemode JDBC URL), the file and containing directory will be created.
I've included a main method in the TwitterSearchConnector class so you can test the class's functionality in stand-alonemode without needing to run Bonita. Listing 5 shows the main method.