database = Runtime.start("database","DatabaseConnector")
database.setDriver("com.mysql.jdbc.Driver")
database.connectionString="jdbc:mysql://localhost/sakila"
database.jdbcUser="user"
database.jdbcPassword="password"

# crawlers publish documents
def onDocument(doc):
    print(doc)

database.addListener("publishDocument","python","onDocument")

database.setIdField("actor_id")
database.setSql("select actor_id, first_name, last_name from actor")

# start crawling
database.startCrawling()

sleep(5)

database.stopCrawling()

@@ -442,16 +442,56 @@
 ctor%22)%0A%0A
+if ('virtual' in globals() and virtual)%0A
 # start 
@@ -499,16 +499,18 @@
 rawling%0A
+  
 database
@@ -526,17 +526,18 @@
 wling()%0A
-%0A
+  
 sleep(5)
@@ -537,17 +537,18 @@
 leep(5)%0A
-%0A
+  
 database

Update DatabaseConnector.py